@univerjs-pro/thread-comment-datasource 0.15.2-insiders.20260119-edc718c → 0.15.2-insiders.20260122-b1556b1

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 _0x256f4a=_0x5b94;(function(_0x24862e,_0x59d93d){const _0x1c8d0e=_0x5b94,_0x2f2e11=_0x24862e();while(!![]){try{const _0x1d79ab=-parseInt(_0x1c8d0e(0x111))/0x1*(parseInt(_0x1c8d0e(0x103))/0x2)+-parseInt(_0x1c8d0e(0x11f))/0x3*(parseInt(_0x1c8d0e(0xe1))/0x4)+parseInt(_0x1c8d0e(0x12f))/0x5*(parseInt(_0x1c8d0e(0x10f))/0x6)+parseInt(_0x1c8d0e(0xbc))/0x7+parseInt(_0x1c8d0e(0xbe))/0x8+parseInt(_0x1c8d0e(0xf1))/0x9*(parseInt(_0x1c8d0e(0xbf))/0xa)+parseInt(_0x1c8d0e(0xf5))/0xb*(-parseInt(_0x1c8d0e(0xdc))/0xc);if(_0x1d79ab===_0x59d93d)break;else _0x2f2e11['push'](_0x2f2e11['shift']());}catch(_0x1efed7){_0x2f2e11['push'](_0x2f2e11['shift']());}}}(_0x19e9,0xe0743));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x256f4a(0x12d)});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=_0x256f4a(0x122);var I=(_0x43ca06=>(_0x43ca06[_0x43ca06['OpenOrReOpen']=0x0]=_0x256f4a(0x10e),_0x43ca06[_0x43ca06['Solved']=0x1]='Solved',_0x43ca06[_0x43ca06[_0x256f4a(0xce)]=-0x1]=_0x256f4a(0xce),_0x43ca06))(I||{}),v=(_0x46801c=>(_0x46801c[_0x46801c[_0x256f4a(0xee)]=0x0]=_0x256f4a(0xee),_0x46801c[_0x46801c['Add']=0x1]='Add',_0x46801c[_0x46801c['Reply']=0x2]='Reply',_0x46801c[_0x46801c[_0x256f4a(0xc3)]=0x3]='Edit',_0x46801c[_0x46801c[_0x256f4a(0x100)]=0x4]=_0x256f4a(0x100),_0x46801c[_0x46801c['Solve']=0x5]=_0x256f4a(0x119),_0x46801c[_0x46801c['UNRECOGNIZED']=-0x1]=_0x256f4a(0xce),_0x46801c))(v||{});const f=_0x28a627=>c['dayjs'](new Date(+_0x28a627))[_0x256f4a(0xf8)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x301ad2,_0x2eb268)=>{const _0xdd9c12=_0x256f4a,_0x2a4be3=_0x301ad2[_0xdd9c12(0xf9)](c['UserManagerService']),_0x14c07b=_0x301ad2[_0xdd9c12(0xf9)](P[_0xdd9c12(0xdf)]);_0x2eb268[_0xdd9c12(0xd7)](_0x501b4e=>{const _0x13fe8f=_0xdd9c12;_0x2a4be3[_0x13fe8f(0xe6)](_0x501b4e)&&_0x2eb268[_0x13fe8f(0x125)](_0x501b4e);}),_0x2eb268[_0xdd9c12(0xde)]&&(await _0x14c07b[_0xdd9c12(0xf9)](_0xdd9c12(0xef),{'params':{'userIDs':[..._0x2eb268]}}))[_0xdd9c12(0xca)][_0xdd9c12(0xc2)]['forEach'](_0x4cb231=>{const _0x4b536a=_0xdd9c12;_0x4cb231&&_0x2a4be3[_0x4b536a(0xc6)](_0x4cb231);});};var $=Object[_0x256f4a(0x110)],E=(_0xb03a99,_0x4e73fb,_0x41b7c6,_0xba0e7f)=>{for(var _0x3eda9c=_0xba0e7f>0x1?void 0x0:_0xba0e7f?$(_0x4e73fb,_0x41b7c6):_0x4e73fb,_0x5152fa=_0xb03a99['length']-0x1,_0x223ac3;_0x5152fa>=0x0;_0x5152fa--)(_0x223ac3=_0xb03a99[_0x5152fa])&&(_0x3eda9c=_0x223ac3(_0x3eda9c)||_0x3eda9c);return _0x3eda9c;},S=(_0x2855c3,_0x4e5d4b)=>(_0x5c15ca,_0x34cd90)=>_0x4e5d4b(_0x5c15ca,_0x34cd90,_0x2855c3);let _=class extends c[_0x256f4a(0xd1)]{constructor(_0x4e280f,_0x4888d2,_0x4fcaad,_0x550c54){const _0x2baa63=_0x256f4a;super(),this['_commentService']=_0x4e280f,this[_0x2baa63(0xcb)]=_0x4888d2,this[_0x2baa63(0xfa)]=_0x4fcaad,this[_0x2baa63(0x126)]=_0x550c54,this[_0x2baa63(0xf0)](),this['_initUserSync']();}['_initUserSync'](){const _0x537259=_0x256f4a;this['disposeWithMe'](this[_0x537259(0xcb)][_0x537259(0x10d)][_0x537259(0xf6)](j['bufferTime'](0x10))[_0x537259(0xf4)](_0x3919df=>{const _0x5ac97f=new Set();_0x3919df['forEach'](_0x1e62c1=>{const _0x303abf=_0x5b94;if(_0x1e62c1[_0x303abf(0x109)]===_0x303abf(0x12b)){const _0x44b746=_0x1e62c1[_0x303abf(0x11d)]['personId'];_0x5ac97f[_0x303abf(0x12b)](_0x44b746);}}),R(this['_injector'],_0x5ac97f);}));}[_0x256f4a(0xf0)](){const _0x4236a1=_0x256f4a;this['disposeWithMe'](this[_0x4236a1(0x129)][_0x4236a1(0x10d)][_0x4236a1(0xf4)](async _0xc0cfe4=>{const _0x4295c6=_0x4236a1;var _0x1f478e,_0x8b5f8d,_0x208c6b,_0x35f3d8;const _0x2fb858=(_0x1f478e=this['_threadCommentModel'][_0x4295c6(0xe3)](_0xc0cfe4[_0x4295c6(0x102)])[_0x4295c6(0xcd)](_0x5c8590=>_0x5c8590['threadId']===_0xc0cfe4[_0x4295c6(0x12c)]))==null?void 0x0:_0x1f478e[_0x4295c6(0x104)];if(!_0x2fb858)return;const {unitId:_0x2c6eb9,subUnitId:_0x4ca07e}=_0x2fb858;switch(_0xc0cfe4[_0x4295c6(0xe5)]&&this[_0x4295c6(0xfa)]['addUser'](_0xc0cfe4[_0x4295c6(0xe5)]),_0xc0cfe4['type']){case v[_0x4295c6(0x101)]:break;case v[_0x4295c6(0xc5)]:{this[_0x4295c6(0xcb)][_0x4295c6(0xc8)](_0x2c6eb9,_0x4ca07e,{'unitId':_0x2c6eb9,'subUnitId':_0x4ca07e,'ref':'','id':_0xc0cfe4['replyId'],'dT':f(+_0xc0cfe4[_0x4295c6(0xbb)]),'threadId':_0xc0cfe4[_0x4295c6(0x12c)],'personId':(_0x208c6b=(_0x8b5f8d=_0xc0cfe4['user'])==null?void 0x0:_0x8b5f8d[_0x4295c6(0x114)])!=null?_0x208c6b:_0xc0cfe4[_0x4295c6(0xe7)],'text':JSON[_0x4295c6(0xfc)](_0xc0cfe4[_0x4295c6(0x10b)]),'parentId':_0x2fb858['id']});break;}case v[_0x4295c6(0x100)]:{const _0x2493c1=this['_threadCommentModel'][_0x4295c6(0xd4)](_0x2c6eb9,_0x4ca07e,_0xc0cfe4[_0x4295c6(0xd9)]);_0x2493c1&&_0x2493c1[_0x4295c6(0xea)]&&this['_threadCommentModel'][_0x4295c6(0x11e)](_0x2c6eb9,_0x4ca07e,_0xc0cfe4[_0x4295c6(0xd9)]);break;}case v[_0x4295c6(0xc3)]:{this[_0x4295c6(0xcb)][_0x4295c6(0x12a)](_0x2c6eb9,_0x4ca07e,{'commentId':_0xc0cfe4[_0x4295c6(0xd9)],'text':JSON[_0x4295c6(0xfc)](_0xc0cfe4[_0x4295c6(0x10b)])});break;}case v['Solve']:{const _0x2cb5d2=(_0x35f3d8=this['_threadCommentModel']['getUnit'](_0xc0cfe4[_0x4295c6(0x102)])[_0x4295c6(0xcd)](_0xa99c95=>_0xa99c95['threadId']===_0xc0cfe4[_0x4295c6(0x12c)]))==null?void 0x0:_0x35f3d8[_0x4295c6(0x104)];_0x2cb5d2&&this['_threadCommentModel'][_0x4295c6(0xf2)](_0x2c6eb9,_0x4ca07e,_0x2cb5d2['id'],_0xc0cfe4['solved']===I[_0x4295c6(0xe9)]);break;}}}));}};_=E([S(0x0,c[_0x256f4a(0xec)](b['CommentService'])),S(0x1,c[_0x256f4a(0xec)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x256f4a(0xec)](c[_0x256f4a(0x10a)]))],_);function _0x5b94(_0x105d91,_0x142a8e){_0x105d91=_0x105d91-0xba;const _0x19e9c2=_0x19e9();let _0x5b9483=_0x19e9c2[_0x105d91];return _0x5b9483;}const q=_0x256f4a(0x124),D={};function _0x19e9(){const _0x576046=['users','Edit','solved','Reply','addUser','/edit','addComment','merge','body','_threadCommentModel','YYYY/MM/DD\x20HH:mm','find','UNRECOGNIZED','onReady','UniverCollaborationClientPlugin','Disposable','reply','UniverInstanceType','getComment','DependentOn','_initDataSource','forEach','pluginName','replyId','setConfig','stringify','20628aeoXSX','getMemberID','size','HTTPService','/delete','399772PlEBcd','post','getUnit','dataSource','user','getUser','userId','customRanges','Solved','parentId','/universer-api/comment/unit/','Inject','requireSession','Unknown','/universer-api/user/list','_init','19755AYOisL','resolveComment','dayjs','subscribe','9504nKxnek','pipe','_sessionService','format','get','_userService','rangeId','parse','/list','onStarting','CustomRangeType','Delete','Add','unitId','3070VORDxg','root','UniverLicensePlugin','length','map','rangeType','type','Injector','content','replies','commentUpdate$','OpenOrReOpen','388002XWPOJq','getOwnPropertyDescriptor','525SyFriQ','UNIVER_UNKNOWN','/solved','userID','values','filter','_httpService','/add','Solve','listComments','_config','comment','payload','deleteComment','21YdGaje','UniverThreadCommentDataSourcePlugin','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','thread-comment-data-source.config','delete','_injector','IConfigService','code','_commentService','updateComment','add','threadId','Module','CollaborationSessionService','45NabeRq','_threadCommentDataSource','error','createTimestamp','11258240JcyYiq','getCurrentUser','2431656YEUOBx','6450JusDIO','Plugin','COMMENT'];_0x19e9=function(){return _0x576046;};return _0x19e9();}var A=Object['getOwnPropertyDescriptor'],x=(_0x2b1073,_0x38f16f,_0x478054,_0x126fb5)=>{const _0x2fa4ca=_0x256f4a;for(var _0x2c2d0c=_0x126fb5>0x1?void 0x0:_0x126fb5?A(_0x38f16f,_0x478054):_0x38f16f,_0x4d4cef=_0x2b1073[_0x2fa4ca(0x106)]-0x1,_0x50ec44;_0x4d4cef>=0x0;_0x4d4cef--)(_0x50ec44=_0x2b1073[_0x4d4cef])&&(_0x2c2d0c=_0x50ec44(_0x2c2d0c)||_0x2c2d0c);return _0x2c2d0c;},C=(_0x1978c6,_0x105c32)=>(_0x517980,_0x3b3733)=>_0x105c32(_0x517980,_0x3b3733,_0x1978c6);function Y(_0x17e307,_0x5883dd){const _0x462436=_0x256f4a,_0xa0a4ed=_0x17e307['replies'][0x0];return{..._0x5883dd,'id':_0xa0a4ed[_0x462436(0xd9)],'resolved':_0x17e307['solved']===0x1,'dT':f(_0xa0a4ed[_0x462436(0xbb)]),'personId':_0xa0a4ed[_0x462436(0xe7)],'threadId':_0xa0a4ed['threadId']};}function G(_0x5b7c11,_0x535b56,_0x47aea9){const _0x19e36a=_0x256f4a;var _0x7e8402,_0x313251;if(((_0x313251=(_0x7e8402=_0x5b7c11==null?void 0x0:_0x5b7c11[_0x19e36a(0x10c)])==null?void 0x0:_0x7e8402['length'])!=null?_0x313251:0x0)>0x0){const _0x25f6d5=(_0x160ccb,_0x49572e)=>({'id':_0x160ccb[_0x19e36a(0xd9)],'threadId':_0x160ccb[_0x19e36a(0x12c)],'dT':f(_0x160ccb[_0x19e36a(0xbb)]),'personId':_0x160ccb[_0x19e36a(0xe7)],'resolved':_0x5b7c11[_0x19e36a(0xc4)]===I[_0x19e36a(0xe9)],'unitId':_0x535b56,'subUnitId':_0x47aea9,'text':JSON[_0x19e36a(0xfc)](_0x160ccb[_0x19e36a(0x10b)]),'parentId':_0x49572e}),_0x5dd3fe=_0x25f6d5(_0x5b7c11[_0x19e36a(0x10c)][0x0]);return{..._0x5dd3fe,'children':_0x5b7c11[_0x19e36a(0x10c)]['slice'](0x1)[_0x19e36a(0x107)](_0x5882f7=>_0x25f6d5(_0x5882f7,_0x5dd3fe['id']))};}return null;}let p=class{constructor(_0x5855fe,_0x1b10e5,_0x188070){const _0x1be65d=_0x256f4a;this[_0x1be65d(0x117)]=_0x5855fe,this['_userService']=_0x1b10e5,this['_sessionService']=_0x188070;}async[_0x256f4a(0xc8)](_0x44c45d){const _0x44be44=_0x256f4a;var _0x1bcb60,_0x5cedd6;const {parentId:_0x6206f1,unitId:_0x5ab41c,text:_0x2f3081,threadId:_0x356f66}=_0x44c45d,_0x9f141c=(_0x5cedd6=(_0x1bcb60=_0x2f3081[_0x44be44(0xe8)])==null?void 0x0:_0x1bcb60['filter'](_0x2d2435=>_0x2d2435['rangeType']===c[_0x44be44(0xff)][_0x44be44(0xc1)])[_0x44be44(0x107)](_0x241bab=>_0x241bab[_0x44be44(0xfb)]))!=null?_0x5cedd6:[],_0x14f6bd=JSON[_0x44be44(0xdb)](_0x2f3081),_0x3efc73=(await this['_sessionService'][_0x44be44(0xed)](_0x5ab41c))[_0x44be44(0xdd)]();if(_0x6206f1){const _0x343e96={'memberId':_0x3efc73,'unitId':_0x5ab41c,'content':_0x14f6bd,'mention':_0x9f141c,'threadId':_0x356f66},_0x459011=(await this[_0x44be44(0x117)]['post'](_0x44be44(0xeb)+_0x5ab41c+'/reply',{'body':_0x343e96}))[_0x44be44(0xca)][_0x44be44(0xd2)];return{..._0x44c45d,'id':_0x459011[_0x44be44(0xd9)],'dT':c[_0x44be44(0xf3)](+_0x459011[_0x44be44(0xbb)])[_0x44be44(0xf8)](_0x44be44(0xcc)),'personId':_0x459011[_0x44be44(0xe7)]};}else{const _0x2176bc={'memberId':_0x3efc73,'unitId':_0x5ab41c,'content':_0x14f6bd,'mention':_0x9f141c},_0x4ddb83=await this[_0x44be44(0x117)][_0x44be44(0xe2)](_0x44be44(0xeb)+_0x5ab41c+_0x44be44(0x118),{'body':_0x2176bc});return Y(_0x4ddb83[_0x44be44(0xca)][_0x44be44(0x11c)],_0x44c45d);}}async[_0x256f4a(0x12a)](_0x1ea15c){const _0x29c37c=_0x256f4a;var _0xf62995,_0x2127b2;const {text:_0x1742b3,unitId:_0x225323}=_0x1ea15c,_0x6417e8=(_0x2127b2=(_0xf62995=_0x1742b3[_0x29c37c(0xe8)])==null?void 0x0:_0xf62995[_0x29c37c(0x116)](_0x2cf8a8=>_0x2cf8a8[_0x29c37c(0x108)]===c['CustomRangeType'][_0x29c37c(0xc1)])[_0x29c37c(0x107)](_0x42786e=>_0x42786e[_0x29c37c(0xfb)]))!=null?_0x2127b2:[],_0x2e00f1=JSON[_0x29c37c(0xdb)](_0x1742b3),_0x1808e2=_0x1ea15c['threadId'],_0x2b0365=_0x1ea15c['id'],_0x3354ac={'memberId':(await this[_0x29c37c(0xf7)]['requireSession'](_0x225323))[_0x29c37c(0xdd)](),'unitId':_0x225323,'threadId':_0x1808e2,'mention':_0x6417e8,'content':_0x2e00f1,'replyId':_0x2b0365},_0x3b7a9c=await this['_httpService'][_0x29c37c(0xe2)](_0x29c37c(0xeb)+_0x225323+_0x29c37c(0xc7),{'body':_0x3354ac});return!_0x3b7a9c['body'][_0x29c37c(0xba)]||_0x3b7a9c[_0x29c37c(0xca)][_0x29c37c(0xba)][_0x29c37c(0x128)]===0x1;}async['resolveComment'](_0x319a95){const _0x5245a8=_0x256f4a,{unitId:_0x2b2640}=_0x319a95,_0x53fffc=_0x319a95[_0x5245a8(0x12c)],_0x1bfe2f={'memberId':this[_0x5245a8(0xfa)][_0x5245a8(0xbd)]()[_0x5245a8(0x114)],'unitId':_0x2b2640,'threadId':_0x53fffc,'solved':_0x319a95['resolved']?I['Solved']:I[_0x5245a8(0x10e)]},_0x3903b5=await this[_0x5245a8(0x117)][_0x5245a8(0xe2)]('/universer-api/comment/unit/'+_0x2b2640+_0x5245a8(0x113),{'body':_0x1bfe2f});return!_0x3903b5['body'][_0x5245a8(0xba)]||_0x3903b5['body'][_0x5245a8(0xba)]['code']===0x1;}async[_0x256f4a(0x11e)](_0x5a6cb3,_0x2256ee,_0x1a0aa5,_0x1fa8cd){const _0x3f000c=_0x256f4a,_0x21c5e2={'memberId':(await this[_0x3f000c(0xf7)][_0x3f000c(0xed)](_0x5a6cb3))[_0x3f000c(0xdd)](),'threadId':_0x1a0aa5,'replyId':_0x1fa8cd,'unitId':_0x5a6cb3},_0xaebe57=await this[_0x3f000c(0x117)][_0x3f000c(0xe2)](_0x3f000c(0xeb)+_0x5a6cb3+_0x3f000c(0xe0),{'body':_0x21c5e2});return!_0xaebe57[_0x3f000c(0xca)][_0x3f000c(0xba)]||_0xaebe57[_0x3f000c(0xca)][_0x3f000c(0xba)]['code']===0x1;}async[_0x256f4a(0x11a)](_0x58d789,_0x52b29b,_0xa09282){const _0x27c14b=_0x256f4a,_0x1141b7={'unitId':_0x58d789,'threadId':_0xa09282},_0x1ffeaa=await this[_0x27c14b(0x117)][_0x27c14b(0xe2)](_0x27c14b(0xeb)+_0x58d789+_0x27c14b(0xfd),{'body':_0x1141b7}),_0xc0a8bf=_0xa09282['map'](_0x18ebf8=>G(_0x1ffeaa[_0x27c14b(0xca)]['comments'][_0x18ebf8],_0x58d789,_0x52b29b))['filter'](Boolean);return Object[_0x27c14b(0x115)](_0x1ffeaa[_0x27c14b(0xca)][_0x27c14b(0xc2)])[_0x27c14b(0xd7)](_0x44fa65=>{const _0x3c99e8=_0x27c14b;this[_0x3c99e8(0xfa)][_0x3c99e8(0xc6)](_0x44fa65);}),_0xc0a8bf;}['saveCommentToSnapshot'](_0x1e443f){const _0x37bec1=_0x256f4a;return{'id':_0x1e443f['id'],'threadId':_0x1e443f[_0x37bec1(0x12c)],'ref':_0x1e443f['ref']};}};p=x([C(0x0,c[_0x256f4a(0xec)](P[_0x256f4a(0xdf)])),C(0x1,c[_0x256f4a(0xec)](c['UserManagerService'])),C(0x2,c[_0x256f4a(0xec)](b[_0x256f4a(0x12e)]))],p);var H=Object[_0x256f4a(0x110)],J=(_0x5bbc13,_0x25628b,_0x1c6ed2,_0xf70dde)=>{for(var _0x34d013=_0xf70dde>0x1?void 0x0:_0xf70dde?H(_0x25628b,_0x1c6ed2):_0x25628b,_0x1599e0=_0x5bbc13['length']-0x1,_0x129e09;_0x1599e0>=0x0;_0x1599e0--)(_0x129e09=_0x5bbc13[_0x1599e0])&&(_0x34d013=_0x129e09(_0x34d013)||_0x34d013);return _0x34d013;},y=(_0x4b96fe,_0x491d7c)=>(_0x5181c2,_0x1258ff)=>_0x491d7c(_0x5181c2,_0x1258ff,_0x4b96fe);let g=class extends c['Disposable']{constructor(_0x1a0c30,_0x1fd6d6){const _0x185ade=_0x256f4a;super(),this['_threadCommentDataSourceService']=_0x1a0c30,this['_threadCommentDataSource']=_0x1fd6d6,this[_0x185ade(0xd6)]();}[_0x256f4a(0xd6)](){const _0xb0c7bc=_0x256f4a;this[_0xb0c7bc(0x121)][_0xb0c7bc(0xe4)]=this[_0xb0c7bc(0x130)],this[_0xb0c7bc(0x121)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x49c425,_0x2688b7,_0x511b0c)=>_0x2688b7 in _0x49c425?F(_0x49c425,_0x2688b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x511b0c}):_0x49c425[_0x2688b7]=_0x511b0c,W=(_0x2783c2,_0x1cae5e,_0x38a5ba,_0x346ba1)=>{const _0x275659=_0x256f4a;for(var _0x3596f2=_0x346ba1>0x1?void 0x0:_0x346ba1?L(_0x1cae5e,_0x38a5ba):_0x1cae5e,_0x1021cd=_0x2783c2[_0x275659(0x106)]-0x1,_0x48b285;_0x1021cd>=0x0;_0x1021cd--)(_0x48b285=_0x2783c2[_0x1021cd])&&(_0x3596f2=_0x48b285(_0x3596f2)||_0x3596f2);return _0x3596f2;},O=(_0x112355,_0x4f83eb)=>(_0x1953a4,_0xfe2934)=>_0x4f83eb(_0x1953a4,_0xfe2934,_0x112355),N=(_0x492664,_0x281d18,_0x59a8c6)=>Z(_0x492664,typeof _0x281d18!='symbol'?_0x281d18+'':_0x281d18,_0x59a8c6);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x256f4a(0xc0)]{constructor(_0x6e1dd7=D,_0x1c1b71,_0x578f3f){const _0x689528=_0x256f4a;super(),this[_0x689528(0x11b)]=_0x6e1dd7,this[_0x689528(0x126)]=_0x1c1b71,this[_0x689528(0x123)]=_0x578f3f;const {..._0x1faa41}=c[_0x689528(0xc9)]({},D,this[_0x689528(0x11b)]);this[_0x689528(0x123)][_0x689528(0xda)](q,_0x1faa41);}[_0x256f4a(0xfe)](){[[p],[g],[_]]['forEach'](_0x8b487a=>{const _0x567c5c=_0x5b94;this['_injector'][_0x567c5c(0x12b)](_0x8b487a);});}[_0x256f4a(0xcf)](){const _0x3febb4=_0x256f4a;this[_0x3febb4(0x126)]['get'](g),this['_injector']['get'](_);}},N(exports[_0x256f4a(0x120)],_0x256f4a(0xd8),U),N(exports[_0x256f4a(0x120)],'type',c[_0x256f4a(0xd3)][_0x256f4a(0x112)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x256f4a(0xd5)](w['UniverThreadCommentUIPlugin'],b[_0x256f4a(0xd0)],T[_0x256f4a(0x105)]),O(0x1,c[_0x256f4a(0xec)](c['Injector'])),O(0x2,c[_0x256f4a(0x127)])],exports['UniverThreadCommentDataSourcePlugin']);
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
+ function _0x2182(_0x5da843,_0x40ea69){_0x5da843=_0x5da843-0xd8;const _0x6cf6a7=_0x6cf6();let _0x2182e4=_0x6cf6a7[_0x5da843];return _0x2182e4;}const _0x2f1a88=_0x2182;(function(_0x17c204,_0x4589fd){const _0x3dd332=_0x2182,_0x3425cb=_0x17c204();while(!![]){try{const _0x430978=parseInt(_0x3dd332(0xee))/0x1*(-parseInt(_0x3dd332(0x109))/0x2)+-parseInt(_0x3dd332(0xfb))/0x3*(-parseInt(_0x3dd332(0x113))/0x4)+parseInt(_0x3dd332(0x136))/0x5*(parseInt(_0x3dd332(0x135))/0x6)+parseInt(_0x3dd332(0x138))/0x7*(parseInt(_0x3dd332(0x134))/0x8)+parseInt(_0x3dd332(0xdb))/0x9*(-parseInt(_0x3dd332(0x100))/0xa)+-parseInt(_0x3dd332(0x110))/0xb+parseInt(_0x3dd332(0x128))/0xc;if(_0x430978===_0x4589fd)break;else _0x3425cb['push'](_0x3425cb['shift']());}catch(_0x3dfcaf){_0x3425cb['push'](_0x3425cb['shift']());}}}(_0x6cf6,0x6d4f8));import{CommentService as _0x4824e3,CollaborationSessionService as _0x41dd94,UniverCollaborationClientPlugin as _0x424de7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38080a}from'@univerjs-pro/license';import{dayjs as _0x151d20,UserManagerService as _0xead225,Inject as _0xde01ec,Injector as _0x337246,Disposable as _0x324ec9,CustomRangeType as _0x3b8245,UniverInstanceType as _0x25d2ac,DependentOn as _0x28793a,IConfigService as _0x21f661,Plugin as _0x51869c,merge as _0x15954c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xcae651}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x6dff5f,IThreadCommentDataSourceService as _0xb4d94}from'@univerjs/thread-comment';import{bufferTime as _0x208a30}from'rxjs';import{HTTPService as _0x20faf4}from'@univerjs/network';const W=_0x2f1a88(0xe0);function _0x6cf6(){const _0x2de172=['UNRECOGNIZED','_httpService','user','forEach','subscribe','filter','replies','delete','/solved','rangeId','368XLgomY','3852zlyZIs','4265xjUFSE','users','61187tbrvFG','/add','size','comments','get','createTimestamp','_threadCommentDataSource','getComment','Reply','userID','threadId','Solve','post','225TJdphT','getUnit','unitId','values','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','disposeWithMe','_threadCommentModel','add','OpenOrReOpen','onReady','Add','_injector','customRanges','/edit','code','root','parentId','29kgSLdL','Delete','defineProperty','body','_init','error','thread-comment-data-source.config','syncUpdateMutationToColla','length','deleteComment','parse','setConfig','/reply','256617zuVgYM','reply','resolveComment','payload','onStarting','201020uXdnVE','COMMENT','format','Solved','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','addComment','listComments','saveCommentToSnapshot','43370RCcDDP','addUser','/universer-api/comment/unit/','type','content','_config','updateComment','6563304QeGRkB','replyId','_initUserSync','12ZCzSeP','comment','_commentService','slice','requireSession','map','_sessionService','resolved','_userService','/universer-api/user/list','userId','solved','stringify','pluginName','getOwnPropertyDescriptor','_initDataSource','_configService','commentUpdate$','find','rangeType','/delete','11633832IJiMxl','getMemberID'];_0x6cf6=function(){return _0x2de172;};return _0x6cf6();}var I=(_0x1a9792=>(_0x1a9792[_0x1a9792[_0x2f1a88(0xe5)]=0x0]=_0x2f1a88(0xe5),_0x1a9792[_0x1a9792['Solved']=0x1]=_0x2f1a88(0x103),_0x1a9792[_0x1a9792[_0x2f1a88(0x12a)]=-0x1]=_0x2f1a88(0x12a),_0x1a9792))(I||{}),v=(_0x5d229a=>(_0x5d229a[_0x5d229a['Unknown']=0x0]='Unknown',_0x5d229a[_0x5d229a['Add']=0x1]=_0x2f1a88(0xe7),_0x5d229a[_0x5d229a[_0x2f1a88(0x140)]=0x2]='Reply',_0x5d229a[_0x5d229a[_0x2f1a88(0xe1)]=0x3]='Edit',_0x5d229a[_0x5d229a[_0x2f1a88(0xef)]=0x4]=_0x2f1a88(0xef),_0x5d229a[_0x5d229a[_0x2f1a88(0xd9)]=0x5]='Solve',_0x5d229a[_0x5d229a[_0x2f1a88(0x12a)]=-0x1]='UNRECOGNIZED',_0x5d229a))(v||{});const y=_0x2bb0cb=>_0x151d20(new Date(+_0x2bb0cb))[_0x2f1a88(0x102)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3a1856,_0x2a4797)=>{const _0x2a3f79=_0x2f1a88,_0x19e52b=_0x3a1856[_0x2a3f79(0x13c)](_0xead225),_0x128efe=_0x3a1856['get'](_0x20faf4);_0x2a4797[_0x2a3f79(0x12d)](_0x2bf24f=>{const _0x216792=_0x2a3f79;_0x19e52b['getUser'](_0x2bf24f)&&_0x2a4797[_0x216792(0x131)](_0x2bf24f);}),_0x2a4797[_0x2a3f79(0x13a)]&&(await _0x128efe[_0x2a3f79(0x13c)](_0x2a3f79(0x11c),{'params':{'userIDs':[..._0x2a4797]}}))[_0x2a3f79(0xf1)][_0x2a3f79(0x137)][_0x2a3f79(0x12d)](_0x5b06b2=>{_0x5b06b2&&_0x19e52b['addUser'](_0x5b06b2);});};var K=Object[_0x2f1a88(0x121)],V=(_0x2a5aa5,_0x5ecc29,_0x161f1e,_0x1402ea)=>{const _0x2227d3=_0x2f1a88;for(var _0x492226=_0x1402ea>0x1?void 0x0:_0x1402ea?K(_0x5ecc29,_0x161f1e):_0x5ecc29,_0x5f2ecc=_0x2a5aa5[_0x2227d3(0xf6)]-0x1,_0x559f7e;_0x5f2ecc>=0x0;_0x5f2ecc--)(_0x559f7e=_0x2a5aa5[_0x5f2ecc])&&(_0x492226=_0x559f7e(_0x492226)||_0x492226);return _0x492226;},p=(_0x4d5b3b,_0x89758f)=>(_0x13710f,_0x178950)=>_0x89758f(_0x13710f,_0x178950,_0x4d5b3b);let _=class extends _0x324ec9{constructor(_0x542791,_0x45f29f,_0x4e5dbb,_0x2eef95){const _0x5f384a=_0x2f1a88;super(),this[_0x5f384a(0x115)]=_0x542791,this[_0x5f384a(0xe3)]=_0x45f29f,this[_0x5f384a(0x11b)]=_0x4e5dbb,this[_0x5f384a(0xe8)]=_0x2eef95,this['_init'](),this[_0x5f384a(0x112)]();}[_0x2f1a88(0x112)](){const _0x4be93e=_0x2f1a88;this[_0x4be93e(0xe2)](this[_0x4be93e(0xe3)][_0x4be93e(0x124)]['pipe'](_0x208a30(0x10))[_0x4be93e(0x12e)](_0x5e630b=>{const _0x513df3=new Set();_0x5e630b['forEach'](_0x4b0557=>{const _0x50ba7b=_0x2182;if(_0x4b0557[_0x50ba7b(0x10c)]===_0x50ba7b(0xe4)){const _0xbb385=_0x4b0557[_0x50ba7b(0xfe)]['personId'];_0x513df3['add'](_0xbb385);}}),B(this['_injector'],_0x513df3);}));}[_0x2f1a88(0xf2)](){const _0x2183db=_0x2f1a88;this[_0x2183db(0xe2)](this['_commentService'][_0x2183db(0x124)][_0x2183db(0x12e)](async _0x3c4f5a=>{const _0x14ed1b=_0x2183db;var _0xcd595d,_0x26bb9e,_0x13fb12,_0x1eee73;const _0x41c199=(_0xcd595d=this[_0x14ed1b(0xe3)][_0x14ed1b(0xdc)](_0x3c4f5a[_0x14ed1b(0xdd)])[_0x14ed1b(0x125)](_0x528d27=>_0x528d27[_0x14ed1b(0xd8)]===_0x3c4f5a[_0x14ed1b(0xd8)]))==null?void 0x0:_0xcd595d['root'];if(!_0x41c199)return;const {unitId:_0x1d712f,subUnitId:_0x3a9a92}=_0x41c199;switch(_0x3c4f5a[_0x14ed1b(0x12c)]&&this['_userService'][_0x14ed1b(0x10a)](_0x3c4f5a['user']),_0x3c4f5a[_0x14ed1b(0x10c)]){case v['Add']:break;case v['Reply']:{this[_0x14ed1b(0xe3)][_0x14ed1b(0x106)](_0x1d712f,_0x3a9a92,{'unitId':_0x1d712f,'subUnitId':_0x3a9a92,'ref':'','id':_0x3c4f5a[_0x14ed1b(0x111)],'dT':y(+_0x3c4f5a['createTimestamp']),'threadId':_0x3c4f5a[_0x14ed1b(0xd8)],'personId':(_0x13fb12=(_0x26bb9e=_0x3c4f5a['user'])==null?void 0x0:_0x26bb9e['userID'])!=null?_0x13fb12:_0x3c4f5a[_0x14ed1b(0x11d)],'text':JSON[_0x14ed1b(0xf8)](_0x3c4f5a[_0x14ed1b(0x10d)]),'parentId':_0x41c199['id']});break;}case v[_0x14ed1b(0xef)]:{const _0x4a6002=this[_0x14ed1b(0xe3)][_0x14ed1b(0x13f)](_0x1d712f,_0x3a9a92,_0x3c4f5a[_0x14ed1b(0x111)]);_0x4a6002&&_0x4a6002[_0x14ed1b(0xed)]&&this['_threadCommentModel'][_0x14ed1b(0xf7)](_0x1d712f,_0x3a9a92,_0x3c4f5a[_0x14ed1b(0x111)]);break;}case v[_0x14ed1b(0xe1)]:{this['_threadCommentModel'][_0x14ed1b(0x10f)](_0x1d712f,_0x3a9a92,{'commentId':_0x3c4f5a[_0x14ed1b(0x111)],'text':JSON[_0x14ed1b(0xf8)](_0x3c4f5a[_0x14ed1b(0x10d)])});break;}case v['Solve']:{const _0x119b95=(_0x1eee73=this[_0x14ed1b(0xe3)][_0x14ed1b(0xdc)](_0x3c4f5a[_0x14ed1b(0xdd)])[_0x14ed1b(0x125)](_0x50fb86=>_0x50fb86[_0x14ed1b(0xd8)]===_0x3c4f5a[_0x14ed1b(0xd8)]))==null?void 0x0:_0x1eee73[_0x14ed1b(0xec)];_0x119b95&&this[_0x14ed1b(0xe3)][_0x14ed1b(0xfd)](_0x1d712f,_0x3a9a92,_0x119b95['id'],_0x3c4f5a[_0x14ed1b(0x11e)]===I[_0x14ed1b(0x103)]);break;}}}));}};_=V([p(0x0,_0xde01ec(_0x4824e3)),p(0x1,_0xde01ec(_0x6dff5f)),p(0x2,_0xde01ec(_0xead225)),p(0x3,_0xde01ec(_0x337246))],_);const z=_0x2f1a88(0xf4),O={};var k=Object[_0x2f1a88(0x121)],Q=(_0x219f08,_0x551dc1,_0x424714,_0x33f78b)=>{const _0x3da0e1=_0x2f1a88;for(var _0x20fc8c=_0x33f78b>0x1?void 0x0:_0x33f78b?k(_0x551dc1,_0x424714):_0x551dc1,_0x4efd6=_0x219f08[_0x3da0e1(0xf6)]-0x1,_0x219b70;_0x4efd6>=0x0;_0x4efd6--)(_0x219b70=_0x219f08[_0x4efd6])&&(_0x20fc8c=_0x219b70(_0x20fc8c)||_0x20fc8c);return _0x20fc8c;},b=(_0xd220dc,_0x19035b)=>(_0x3bf4fc,_0x5f377d)=>_0x19035b(_0x3bf4fc,_0x5f377d,_0xd220dc);function X(_0x344129,_0x4aa577){const _0x49ef2d=_0x2f1a88,_0x1cb909=_0x344129['replies'][0x0];return{..._0x4aa577,'id':_0x1cb909[_0x49ef2d(0x111)],'resolved':_0x344129['solved']===0x1,'dT':y(_0x1cb909[_0x49ef2d(0x13d)]),'personId':_0x1cb909[_0x49ef2d(0x11d)],'threadId':_0x1cb909[_0x49ef2d(0xd8)]};}function ee(_0x175ded,_0x517526,_0x28ffb4){const _0x1c57a2=_0x2f1a88;var _0x170239,_0x3cd318;if(((_0x3cd318=(_0x170239=_0x175ded==null?void 0x0:_0x175ded['replies'])==null?void 0x0:_0x170239[_0x1c57a2(0xf6)])!=null?_0x3cd318:0x0)>0x0){const _0x571960=(_0x42fecd,_0x5c43b4)=>({'id':_0x42fecd[_0x1c57a2(0x111)],'threadId':_0x42fecd[_0x1c57a2(0xd8)],'dT':y(_0x42fecd['createTimestamp']),'personId':_0x42fecd[_0x1c57a2(0x11d)],'resolved':_0x175ded[_0x1c57a2(0x11e)]===I[_0x1c57a2(0x103)],'unitId':_0x517526,'subUnitId':_0x28ffb4,'text':JSON[_0x1c57a2(0xf8)](_0x42fecd['content']),'parentId':_0x5c43b4}),_0x3bc53a=_0x571960(_0x175ded[_0x1c57a2(0x130)][0x0]);return{..._0x3bc53a,'children':_0x175ded[_0x1c57a2(0x130)][_0x1c57a2(0x116)](0x1)[_0x1c57a2(0x118)](_0x2d56bb=>_0x571960(_0x2d56bb,_0x3bc53a['id']))};}return null;}let S=class{constructor(_0xa0fa62,_0x2f921c,_0x203122){this['_httpService']=_0xa0fa62,this['_userService']=_0x2f921c,this['_sessionService']=_0x203122;}async[_0x2f1a88(0x106)](_0x7407b9){const _0x20d734=_0x2f1a88;var _0x146719,_0x5d1069;const {parentId:_0x35a17c,unitId:_0x1651c2,text:_0x44116d,threadId:_0x208d90}=_0x7407b9,_0x29afc1=(_0x5d1069=(_0x146719=_0x44116d[_0x20d734(0xe9)])==null?void 0x0:_0x146719[_0x20d734(0x12f)](_0x5c97b4=>_0x5c97b4[_0x20d734(0x126)]===_0x3b8245[_0x20d734(0x101)])['map'](_0x771333=>_0x771333[_0x20d734(0x133)]))!=null?_0x5d1069:[],_0x296bf3=JSON[_0x20d734(0x11f)](_0x44116d),_0x1ef6d7=(await this['_sessionService'][_0x20d734(0x117)](_0x1651c2))[_0x20d734(0x129)]();if(_0x35a17c){const _0x197234={'memberId':_0x1ef6d7,'unitId':_0x1651c2,'content':_0x296bf3,'mention':_0x29afc1,'threadId':_0x208d90},_0x1d9e13=(await this['_httpService']['post'](_0x20d734(0x10b)+_0x1651c2+_0x20d734(0xfa),{'body':_0x197234}))[_0x20d734(0xf1)][_0x20d734(0xfc)];return{..._0x7407b9,'id':_0x1d9e13[_0x20d734(0x111)],'dT':_0x151d20(+_0x1d9e13[_0x20d734(0x13d)])[_0x20d734(0x102)](_0x20d734(0x104)),'personId':_0x1d9e13[_0x20d734(0x11d)]};}else{const _0x2cf6f9={'memberId':_0x1ef6d7,'unitId':_0x1651c2,'content':_0x296bf3,'mention':_0x29afc1},_0x5f1eae=await this['_httpService'][_0x20d734(0xda)]('/universer-api/comment/unit/'+_0x1651c2+_0x20d734(0x139),{'body':_0x2cf6f9});return X(_0x5f1eae[_0x20d734(0xf1)][_0x20d734(0x114)],_0x7407b9);}}async[_0x2f1a88(0x10f)](_0xff4e35){const _0x5e7039=_0x2f1a88;var _0x2e3252,_0x2649f4;const {text:_0x3e0a52,unitId:_0x1dec09}=_0xff4e35,_0x38524e=(_0x2649f4=(_0x2e3252=_0x3e0a52['customRanges'])==null?void 0x0:_0x2e3252[_0x5e7039(0x12f)](_0x302888=>_0x302888[_0x5e7039(0x126)]===_0x3b8245[_0x5e7039(0x101)])[_0x5e7039(0x118)](_0x12af07=>_0x12af07['rangeId']))!=null?_0x2649f4:[],_0x42b6bc=JSON[_0x5e7039(0x11f)](_0x3e0a52),_0x14bb7c=_0xff4e35['threadId'],_0x4e602e=_0xff4e35['id'],_0x115e2f={'memberId':(await this[_0x5e7039(0x119)]['requireSession'](_0x1dec09))['getMemberID'](),'unitId':_0x1dec09,'threadId':_0x14bb7c,'mention':_0x38524e,'content':_0x42b6bc,'replyId':_0x4e602e},_0xa145d9=await this['_httpService'][_0x5e7039(0xda)](_0x5e7039(0x10b)+_0x1dec09+_0x5e7039(0xea),{'body':_0x115e2f});return!_0xa145d9[_0x5e7039(0xf1)][_0x5e7039(0xf3)]||_0xa145d9[_0x5e7039(0xf1)]['error']['code']===0x1;}async[_0x2f1a88(0xfd)](_0x2318bb){const _0x3b917f=_0x2f1a88,{unitId:_0x2b8517}=_0x2318bb,_0x196399=_0x2318bb[_0x3b917f(0xd8)],_0x360aeb={'memberId':this[_0x3b917f(0x11b)]['getCurrentUser']()[_0x3b917f(0x141)],'unitId':_0x2b8517,'threadId':_0x196399,'solved':_0x2318bb[_0x3b917f(0x11a)]?I[_0x3b917f(0x103)]:I[_0x3b917f(0xe5)]},_0xb3120d=await this[_0x3b917f(0x12b)]['post'](_0x3b917f(0x10b)+_0x2b8517+_0x3b917f(0x132),{'body':_0x360aeb});return!_0xb3120d[_0x3b917f(0xf1)]['error']||_0xb3120d[_0x3b917f(0xf1)][_0x3b917f(0xf3)][_0x3b917f(0xeb)]===0x1;}async[_0x2f1a88(0xf7)](_0x23cdeb,_0x4a01e8,_0x518012,_0x4f2742){const _0x42a456=_0x2f1a88,_0x3cf2bb={'memberId':(await this['_sessionService'][_0x42a456(0x117)](_0x23cdeb))['getMemberID'](),'threadId':_0x518012,'replyId':_0x4f2742,'unitId':_0x23cdeb},_0x39322a=await this[_0x42a456(0x12b)][_0x42a456(0xda)]('/universer-api/comment/unit/'+_0x23cdeb+_0x42a456(0x127),{'body':_0x3cf2bb});return!_0x39322a['body'][_0x42a456(0xf3)]||_0x39322a[_0x42a456(0xf1)][_0x42a456(0xf3)][_0x42a456(0xeb)]===0x1;}async[_0x2f1a88(0x107)](_0x471fec,_0x2399bc,_0x489975){const _0x123191=_0x2f1a88,_0x1d9998={'unitId':_0x471fec,'threadId':_0x489975},_0x299da1=await this[_0x123191(0x12b)][_0x123191(0xda)](_0x123191(0x10b)+_0x471fec+'/list',{'body':_0x1d9998}),_0x58e566=_0x489975[_0x123191(0x118)](_0x46e4f3=>ee(_0x299da1[_0x123191(0xf1)][_0x123191(0x13b)][_0x46e4f3],_0x471fec,_0x2399bc))[_0x123191(0x12f)](Boolean);return Object[_0x123191(0xde)](_0x299da1['body'][_0x123191(0x137)])['forEach'](_0x5a5b43=>{const _0x241356=_0x123191;this[_0x241356(0x11b)][_0x241356(0x10a)](_0x5a5b43);}),_0x58e566;}[_0x2f1a88(0x108)](_0x2726e7){const _0x3a8a90=_0x2f1a88;return{'id':_0x2726e7['id'],'threadId':_0x2726e7[_0x3a8a90(0xd8)],'ref':_0x2726e7['ref']};}};S=Q([b(0x0,_0xde01ec(_0x20faf4)),b(0x1,_0xde01ec(_0xead225)),b(0x2,_0xde01ec(_0x41dd94))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x6e991b,_0x7c54ca,_0x286569,_0x14e5b8)=>{for(var _0x572fb0=_0x14e5b8>0x1?void 0x0:_0x14e5b8?re(_0x7c54ca,_0x286569):_0x7c54ca,_0x10f0d0=_0x6e991b['length']-0x1,_0x371419;_0x10f0d0>=0x0;_0x10f0d0--)(_0x371419=_0x6e991b[_0x10f0d0])&&(_0x572fb0=_0x371419(_0x572fb0)||_0x572fb0);return _0x572fb0;},M=(_0x5300e7,_0xc85266)=>(_0x56c9f2,_0x221d57)=>_0xc85266(_0x56c9f2,_0x221d57,_0x5300e7);let f=class extends _0x324ec9{constructor(_0x439f53,_0x1c5a5e){const _0x3886e0=_0x2f1a88;super(),this[_0x3886e0(0xdf)]=_0x439f53,this[_0x3886e0(0x13e)]=_0x1c5a5e,this['_initDataSource']();}[_0x2f1a88(0x122)](){const _0xb95b6e=_0x2f1a88;this['_threadCommentDataSourceService']['dataSource']=this[_0xb95b6e(0x13e)],this[_0xb95b6e(0xdf)][_0xb95b6e(0xf5)]=!0x1;}};f=te([M(0x0,_0xb4d94),M(0x1,_0xde01ec(S))],f);var se=Object[_0x2f1a88(0xf0)],oe=Object[_0x2f1a88(0x121)],ne=(_0x5a13b4,_0x136103,_0x2395c6)=>_0x136103 in _0x5a13b4?se(_0x5a13b4,_0x136103,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2395c6}):_0x5a13b4[_0x136103]=_0x2395c6,ie=(_0x695702,_0x68d41b,_0x288351,_0x359c76)=>{const _0x32664c=_0x2f1a88;for(var _0x24182a=_0x359c76>0x1?void 0x0:_0x359c76?oe(_0x68d41b,_0x288351):_0x68d41b,_0x35fb10=_0x695702[_0x32664c(0xf6)]-0x1,_0x380a14;_0x35fb10>=0x0;_0x35fb10--)(_0x380a14=_0x695702[_0x35fb10])&&(_0x24182a=_0x380a14(_0x24182a)||_0x24182a);return _0x24182a;},N=(_0x5c9009,_0x69265)=>(_0x32e668,_0x1c5d3f)=>_0x69265(_0x32e668,_0x1c5d3f,_0x5c9009),$=(_0x32b7e5,_0xa92254,_0x1caefa)=>ne(_0x32b7e5,typeof _0xa92254!='symbol'?_0xa92254+'':_0xa92254,_0x1caefa);let g=class extends _0x51869c{constructor(_0x3eb225=O,_0x6c9bac,_0x20bf46){const _0x35743f=_0x2f1a88;super(),this[_0x35743f(0x10e)]=_0x3eb225,this['_injector']=_0x6c9bac,this['_configService']=_0x20bf46;const {..._0x302091}=_0x15954c({},O,this[_0x35743f(0x10e)]);this[_0x35743f(0x123)][_0x35743f(0xf9)](z,_0x302091);}[_0x2f1a88(0xff)](){[[S],[f],[_]]['forEach'](_0x4644a2=>{const _0x2b8508=_0x2182;this[_0x2b8508(0xe8)][_0x2b8508(0xe4)](_0x4644a2);});}[_0x2f1a88(0xe6)](){const _0x181bba=_0x2f1a88;this[_0x181bba(0xe8)][_0x181bba(0x13c)](f),this[_0x181bba(0xe8)]['get'](_);}};$(g,_0x2f1a88(0x120),W),$(g,_0x2f1a88(0x10c),_0x25d2ac[_0x2f1a88(0x105)]),g=ie([_0x28793a(_0xcae651,_0x424de7,_0x38080a),N(0x1,_0xde01ec(_0x337246)),N(0x2,_0x21f661)],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
+ function _0x2182(_0x5da843,_0x40ea69){_0x5da843=_0x5da843-0xd8;const _0x6cf6a7=_0x6cf6();let _0x2182e4=_0x6cf6a7[_0x5da843];return _0x2182e4;}const _0x2f1a88=_0x2182;(function(_0x17c204,_0x4589fd){const _0x3dd332=_0x2182,_0x3425cb=_0x17c204();while(!![]){try{const _0x430978=parseInt(_0x3dd332(0xee))/0x1*(-parseInt(_0x3dd332(0x109))/0x2)+-parseInt(_0x3dd332(0xfb))/0x3*(-parseInt(_0x3dd332(0x113))/0x4)+parseInt(_0x3dd332(0x136))/0x5*(parseInt(_0x3dd332(0x135))/0x6)+parseInt(_0x3dd332(0x138))/0x7*(parseInt(_0x3dd332(0x134))/0x8)+parseInt(_0x3dd332(0xdb))/0x9*(-parseInt(_0x3dd332(0x100))/0xa)+-parseInt(_0x3dd332(0x110))/0xb+parseInt(_0x3dd332(0x128))/0xc;if(_0x430978===_0x4589fd)break;else _0x3425cb['push'](_0x3425cb['shift']());}catch(_0x3dfcaf){_0x3425cb['push'](_0x3425cb['shift']());}}}(_0x6cf6,0x6d4f8));import{CommentService as _0x4824e3,CollaborationSessionService as _0x41dd94,UniverCollaborationClientPlugin as _0x424de7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38080a}from'@univerjs-pro/license';import{dayjs as _0x151d20,UserManagerService as _0xead225,Inject as _0xde01ec,Injector as _0x337246,Disposable as _0x324ec9,CustomRangeType as _0x3b8245,UniverInstanceType as _0x25d2ac,DependentOn as _0x28793a,IConfigService as _0x21f661,Plugin as _0x51869c,merge as _0x15954c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xcae651}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x6dff5f,IThreadCommentDataSourceService as _0xb4d94}from'@univerjs/thread-comment';import{bufferTime as _0x208a30}from'rxjs';import{HTTPService as _0x20faf4}from'@univerjs/network';const W=_0x2f1a88(0xe0);function _0x6cf6(){const _0x2de172=['UNRECOGNIZED','_httpService','user','forEach','subscribe','filter','replies','delete','/solved','rangeId','368XLgomY','3852zlyZIs','4265xjUFSE','users','61187tbrvFG','/add','size','comments','get','createTimestamp','_threadCommentDataSource','getComment','Reply','userID','threadId','Solve','post','225TJdphT','getUnit','unitId','values','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','disposeWithMe','_threadCommentModel','add','OpenOrReOpen','onReady','Add','_injector','customRanges','/edit','code','root','parentId','29kgSLdL','Delete','defineProperty','body','_init','error','thread-comment-data-source.config','syncUpdateMutationToColla','length','deleteComment','parse','setConfig','/reply','256617zuVgYM','reply','resolveComment','payload','onStarting','201020uXdnVE','COMMENT','format','Solved','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','addComment','listComments','saveCommentToSnapshot','43370RCcDDP','addUser','/universer-api/comment/unit/','type','content','_config','updateComment','6563304QeGRkB','replyId','_initUserSync','12ZCzSeP','comment','_commentService','slice','requireSession','map','_sessionService','resolved','_userService','/universer-api/user/list','userId','solved','stringify','pluginName','getOwnPropertyDescriptor','_initDataSource','_configService','commentUpdate$','find','rangeType','/delete','11633832IJiMxl','getMemberID'];_0x6cf6=function(){return _0x2de172;};return _0x6cf6();}var I=(_0x1a9792=>(_0x1a9792[_0x1a9792[_0x2f1a88(0xe5)]=0x0]=_0x2f1a88(0xe5),_0x1a9792[_0x1a9792['Solved']=0x1]=_0x2f1a88(0x103),_0x1a9792[_0x1a9792[_0x2f1a88(0x12a)]=-0x1]=_0x2f1a88(0x12a),_0x1a9792))(I||{}),v=(_0x5d229a=>(_0x5d229a[_0x5d229a['Unknown']=0x0]='Unknown',_0x5d229a[_0x5d229a['Add']=0x1]=_0x2f1a88(0xe7),_0x5d229a[_0x5d229a[_0x2f1a88(0x140)]=0x2]='Reply',_0x5d229a[_0x5d229a[_0x2f1a88(0xe1)]=0x3]='Edit',_0x5d229a[_0x5d229a[_0x2f1a88(0xef)]=0x4]=_0x2f1a88(0xef),_0x5d229a[_0x5d229a[_0x2f1a88(0xd9)]=0x5]='Solve',_0x5d229a[_0x5d229a[_0x2f1a88(0x12a)]=-0x1]='UNRECOGNIZED',_0x5d229a))(v||{});const y=_0x2bb0cb=>_0x151d20(new Date(+_0x2bb0cb))[_0x2f1a88(0x102)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3a1856,_0x2a4797)=>{const _0x2a3f79=_0x2f1a88,_0x19e52b=_0x3a1856[_0x2a3f79(0x13c)](_0xead225),_0x128efe=_0x3a1856['get'](_0x20faf4);_0x2a4797[_0x2a3f79(0x12d)](_0x2bf24f=>{const _0x216792=_0x2a3f79;_0x19e52b['getUser'](_0x2bf24f)&&_0x2a4797[_0x216792(0x131)](_0x2bf24f);}),_0x2a4797[_0x2a3f79(0x13a)]&&(await _0x128efe[_0x2a3f79(0x13c)](_0x2a3f79(0x11c),{'params':{'userIDs':[..._0x2a4797]}}))[_0x2a3f79(0xf1)][_0x2a3f79(0x137)][_0x2a3f79(0x12d)](_0x5b06b2=>{_0x5b06b2&&_0x19e52b['addUser'](_0x5b06b2);});};var K=Object[_0x2f1a88(0x121)],V=(_0x2a5aa5,_0x5ecc29,_0x161f1e,_0x1402ea)=>{const _0x2227d3=_0x2f1a88;for(var _0x492226=_0x1402ea>0x1?void 0x0:_0x1402ea?K(_0x5ecc29,_0x161f1e):_0x5ecc29,_0x5f2ecc=_0x2a5aa5[_0x2227d3(0xf6)]-0x1,_0x559f7e;_0x5f2ecc>=0x0;_0x5f2ecc--)(_0x559f7e=_0x2a5aa5[_0x5f2ecc])&&(_0x492226=_0x559f7e(_0x492226)||_0x492226);return _0x492226;},p=(_0x4d5b3b,_0x89758f)=>(_0x13710f,_0x178950)=>_0x89758f(_0x13710f,_0x178950,_0x4d5b3b);let _=class extends _0x324ec9{constructor(_0x542791,_0x45f29f,_0x4e5dbb,_0x2eef95){const _0x5f384a=_0x2f1a88;super(),this[_0x5f384a(0x115)]=_0x542791,this[_0x5f384a(0xe3)]=_0x45f29f,this[_0x5f384a(0x11b)]=_0x4e5dbb,this[_0x5f384a(0xe8)]=_0x2eef95,this['_init'](),this[_0x5f384a(0x112)]();}[_0x2f1a88(0x112)](){const _0x4be93e=_0x2f1a88;this[_0x4be93e(0xe2)](this[_0x4be93e(0xe3)][_0x4be93e(0x124)]['pipe'](_0x208a30(0x10))[_0x4be93e(0x12e)](_0x5e630b=>{const _0x513df3=new Set();_0x5e630b['forEach'](_0x4b0557=>{const _0x50ba7b=_0x2182;if(_0x4b0557[_0x50ba7b(0x10c)]===_0x50ba7b(0xe4)){const _0xbb385=_0x4b0557[_0x50ba7b(0xfe)]['personId'];_0x513df3['add'](_0xbb385);}}),B(this['_injector'],_0x513df3);}));}[_0x2f1a88(0xf2)](){const _0x2183db=_0x2f1a88;this[_0x2183db(0xe2)](this['_commentService'][_0x2183db(0x124)][_0x2183db(0x12e)](async _0x3c4f5a=>{const _0x14ed1b=_0x2183db;var _0xcd595d,_0x26bb9e,_0x13fb12,_0x1eee73;const _0x41c199=(_0xcd595d=this[_0x14ed1b(0xe3)][_0x14ed1b(0xdc)](_0x3c4f5a[_0x14ed1b(0xdd)])[_0x14ed1b(0x125)](_0x528d27=>_0x528d27[_0x14ed1b(0xd8)]===_0x3c4f5a[_0x14ed1b(0xd8)]))==null?void 0x0:_0xcd595d['root'];if(!_0x41c199)return;const {unitId:_0x1d712f,subUnitId:_0x3a9a92}=_0x41c199;switch(_0x3c4f5a[_0x14ed1b(0x12c)]&&this['_userService'][_0x14ed1b(0x10a)](_0x3c4f5a['user']),_0x3c4f5a[_0x14ed1b(0x10c)]){case v['Add']:break;case v['Reply']:{this[_0x14ed1b(0xe3)][_0x14ed1b(0x106)](_0x1d712f,_0x3a9a92,{'unitId':_0x1d712f,'subUnitId':_0x3a9a92,'ref':'','id':_0x3c4f5a[_0x14ed1b(0x111)],'dT':y(+_0x3c4f5a['createTimestamp']),'threadId':_0x3c4f5a[_0x14ed1b(0xd8)],'personId':(_0x13fb12=(_0x26bb9e=_0x3c4f5a['user'])==null?void 0x0:_0x26bb9e['userID'])!=null?_0x13fb12:_0x3c4f5a[_0x14ed1b(0x11d)],'text':JSON[_0x14ed1b(0xf8)](_0x3c4f5a[_0x14ed1b(0x10d)]),'parentId':_0x41c199['id']});break;}case v[_0x14ed1b(0xef)]:{const _0x4a6002=this[_0x14ed1b(0xe3)][_0x14ed1b(0x13f)](_0x1d712f,_0x3a9a92,_0x3c4f5a[_0x14ed1b(0x111)]);_0x4a6002&&_0x4a6002[_0x14ed1b(0xed)]&&this['_threadCommentModel'][_0x14ed1b(0xf7)](_0x1d712f,_0x3a9a92,_0x3c4f5a[_0x14ed1b(0x111)]);break;}case v[_0x14ed1b(0xe1)]:{this['_threadCommentModel'][_0x14ed1b(0x10f)](_0x1d712f,_0x3a9a92,{'commentId':_0x3c4f5a[_0x14ed1b(0x111)],'text':JSON[_0x14ed1b(0xf8)](_0x3c4f5a[_0x14ed1b(0x10d)])});break;}case v['Solve']:{const _0x119b95=(_0x1eee73=this[_0x14ed1b(0xe3)][_0x14ed1b(0xdc)](_0x3c4f5a[_0x14ed1b(0xdd)])[_0x14ed1b(0x125)](_0x50fb86=>_0x50fb86[_0x14ed1b(0xd8)]===_0x3c4f5a[_0x14ed1b(0xd8)]))==null?void 0x0:_0x1eee73[_0x14ed1b(0xec)];_0x119b95&&this[_0x14ed1b(0xe3)][_0x14ed1b(0xfd)](_0x1d712f,_0x3a9a92,_0x119b95['id'],_0x3c4f5a[_0x14ed1b(0x11e)]===I[_0x14ed1b(0x103)]);break;}}}));}};_=V([p(0x0,_0xde01ec(_0x4824e3)),p(0x1,_0xde01ec(_0x6dff5f)),p(0x2,_0xde01ec(_0xead225)),p(0x3,_0xde01ec(_0x337246))],_);const z=_0x2f1a88(0xf4),O={};var k=Object[_0x2f1a88(0x121)],Q=(_0x219f08,_0x551dc1,_0x424714,_0x33f78b)=>{const _0x3da0e1=_0x2f1a88;for(var _0x20fc8c=_0x33f78b>0x1?void 0x0:_0x33f78b?k(_0x551dc1,_0x424714):_0x551dc1,_0x4efd6=_0x219f08[_0x3da0e1(0xf6)]-0x1,_0x219b70;_0x4efd6>=0x0;_0x4efd6--)(_0x219b70=_0x219f08[_0x4efd6])&&(_0x20fc8c=_0x219b70(_0x20fc8c)||_0x20fc8c);return _0x20fc8c;},b=(_0xd220dc,_0x19035b)=>(_0x3bf4fc,_0x5f377d)=>_0x19035b(_0x3bf4fc,_0x5f377d,_0xd220dc);function X(_0x344129,_0x4aa577){const _0x49ef2d=_0x2f1a88,_0x1cb909=_0x344129['replies'][0x0];return{..._0x4aa577,'id':_0x1cb909[_0x49ef2d(0x111)],'resolved':_0x344129['solved']===0x1,'dT':y(_0x1cb909[_0x49ef2d(0x13d)]),'personId':_0x1cb909[_0x49ef2d(0x11d)],'threadId':_0x1cb909[_0x49ef2d(0xd8)]};}function ee(_0x175ded,_0x517526,_0x28ffb4){const _0x1c57a2=_0x2f1a88;var _0x170239,_0x3cd318;if(((_0x3cd318=(_0x170239=_0x175ded==null?void 0x0:_0x175ded['replies'])==null?void 0x0:_0x170239[_0x1c57a2(0xf6)])!=null?_0x3cd318:0x0)>0x0){const _0x571960=(_0x42fecd,_0x5c43b4)=>({'id':_0x42fecd[_0x1c57a2(0x111)],'threadId':_0x42fecd[_0x1c57a2(0xd8)],'dT':y(_0x42fecd['createTimestamp']),'personId':_0x42fecd[_0x1c57a2(0x11d)],'resolved':_0x175ded[_0x1c57a2(0x11e)]===I[_0x1c57a2(0x103)],'unitId':_0x517526,'subUnitId':_0x28ffb4,'text':JSON[_0x1c57a2(0xf8)](_0x42fecd['content']),'parentId':_0x5c43b4}),_0x3bc53a=_0x571960(_0x175ded[_0x1c57a2(0x130)][0x0]);return{..._0x3bc53a,'children':_0x175ded[_0x1c57a2(0x130)][_0x1c57a2(0x116)](0x1)[_0x1c57a2(0x118)](_0x2d56bb=>_0x571960(_0x2d56bb,_0x3bc53a['id']))};}return null;}let S=class{constructor(_0xa0fa62,_0x2f921c,_0x203122){this['_httpService']=_0xa0fa62,this['_userService']=_0x2f921c,this['_sessionService']=_0x203122;}async[_0x2f1a88(0x106)](_0x7407b9){const _0x20d734=_0x2f1a88;var _0x146719,_0x5d1069;const {parentId:_0x35a17c,unitId:_0x1651c2,text:_0x44116d,threadId:_0x208d90}=_0x7407b9,_0x29afc1=(_0x5d1069=(_0x146719=_0x44116d[_0x20d734(0xe9)])==null?void 0x0:_0x146719[_0x20d734(0x12f)](_0x5c97b4=>_0x5c97b4[_0x20d734(0x126)]===_0x3b8245[_0x20d734(0x101)])['map'](_0x771333=>_0x771333[_0x20d734(0x133)]))!=null?_0x5d1069:[],_0x296bf3=JSON[_0x20d734(0x11f)](_0x44116d),_0x1ef6d7=(await this['_sessionService'][_0x20d734(0x117)](_0x1651c2))[_0x20d734(0x129)]();if(_0x35a17c){const _0x197234={'memberId':_0x1ef6d7,'unitId':_0x1651c2,'content':_0x296bf3,'mention':_0x29afc1,'threadId':_0x208d90},_0x1d9e13=(await this['_httpService']['post'](_0x20d734(0x10b)+_0x1651c2+_0x20d734(0xfa),{'body':_0x197234}))[_0x20d734(0xf1)][_0x20d734(0xfc)];return{..._0x7407b9,'id':_0x1d9e13[_0x20d734(0x111)],'dT':_0x151d20(+_0x1d9e13[_0x20d734(0x13d)])[_0x20d734(0x102)](_0x20d734(0x104)),'personId':_0x1d9e13[_0x20d734(0x11d)]};}else{const _0x2cf6f9={'memberId':_0x1ef6d7,'unitId':_0x1651c2,'content':_0x296bf3,'mention':_0x29afc1},_0x5f1eae=await this['_httpService'][_0x20d734(0xda)]('/universer-api/comment/unit/'+_0x1651c2+_0x20d734(0x139),{'body':_0x2cf6f9});return X(_0x5f1eae[_0x20d734(0xf1)][_0x20d734(0x114)],_0x7407b9);}}async[_0x2f1a88(0x10f)](_0xff4e35){const _0x5e7039=_0x2f1a88;var _0x2e3252,_0x2649f4;const {text:_0x3e0a52,unitId:_0x1dec09}=_0xff4e35,_0x38524e=(_0x2649f4=(_0x2e3252=_0x3e0a52['customRanges'])==null?void 0x0:_0x2e3252[_0x5e7039(0x12f)](_0x302888=>_0x302888[_0x5e7039(0x126)]===_0x3b8245[_0x5e7039(0x101)])[_0x5e7039(0x118)](_0x12af07=>_0x12af07['rangeId']))!=null?_0x2649f4:[],_0x42b6bc=JSON[_0x5e7039(0x11f)](_0x3e0a52),_0x14bb7c=_0xff4e35['threadId'],_0x4e602e=_0xff4e35['id'],_0x115e2f={'memberId':(await this[_0x5e7039(0x119)]['requireSession'](_0x1dec09))['getMemberID'](),'unitId':_0x1dec09,'threadId':_0x14bb7c,'mention':_0x38524e,'content':_0x42b6bc,'replyId':_0x4e602e},_0xa145d9=await this['_httpService'][_0x5e7039(0xda)](_0x5e7039(0x10b)+_0x1dec09+_0x5e7039(0xea),{'body':_0x115e2f});return!_0xa145d9[_0x5e7039(0xf1)][_0x5e7039(0xf3)]||_0xa145d9[_0x5e7039(0xf1)]['error']['code']===0x1;}async[_0x2f1a88(0xfd)](_0x2318bb){const _0x3b917f=_0x2f1a88,{unitId:_0x2b8517}=_0x2318bb,_0x196399=_0x2318bb[_0x3b917f(0xd8)],_0x360aeb={'memberId':this[_0x3b917f(0x11b)]['getCurrentUser']()[_0x3b917f(0x141)],'unitId':_0x2b8517,'threadId':_0x196399,'solved':_0x2318bb[_0x3b917f(0x11a)]?I[_0x3b917f(0x103)]:I[_0x3b917f(0xe5)]},_0xb3120d=await this[_0x3b917f(0x12b)]['post'](_0x3b917f(0x10b)+_0x2b8517+_0x3b917f(0x132),{'body':_0x360aeb});return!_0xb3120d[_0x3b917f(0xf1)]['error']||_0xb3120d[_0x3b917f(0xf1)][_0x3b917f(0xf3)][_0x3b917f(0xeb)]===0x1;}async[_0x2f1a88(0xf7)](_0x23cdeb,_0x4a01e8,_0x518012,_0x4f2742){const _0x42a456=_0x2f1a88,_0x3cf2bb={'memberId':(await this['_sessionService'][_0x42a456(0x117)](_0x23cdeb))['getMemberID'](),'threadId':_0x518012,'replyId':_0x4f2742,'unitId':_0x23cdeb},_0x39322a=await this[_0x42a456(0x12b)][_0x42a456(0xda)]('/universer-api/comment/unit/'+_0x23cdeb+_0x42a456(0x127),{'body':_0x3cf2bb});return!_0x39322a['body'][_0x42a456(0xf3)]||_0x39322a[_0x42a456(0xf1)][_0x42a456(0xf3)][_0x42a456(0xeb)]===0x1;}async[_0x2f1a88(0x107)](_0x471fec,_0x2399bc,_0x489975){const _0x123191=_0x2f1a88,_0x1d9998={'unitId':_0x471fec,'threadId':_0x489975},_0x299da1=await this[_0x123191(0x12b)][_0x123191(0xda)](_0x123191(0x10b)+_0x471fec+'/list',{'body':_0x1d9998}),_0x58e566=_0x489975[_0x123191(0x118)](_0x46e4f3=>ee(_0x299da1[_0x123191(0xf1)][_0x123191(0x13b)][_0x46e4f3],_0x471fec,_0x2399bc))[_0x123191(0x12f)](Boolean);return Object[_0x123191(0xde)](_0x299da1['body'][_0x123191(0x137)])['forEach'](_0x5a5b43=>{const _0x241356=_0x123191;this[_0x241356(0x11b)][_0x241356(0x10a)](_0x5a5b43);}),_0x58e566;}[_0x2f1a88(0x108)](_0x2726e7){const _0x3a8a90=_0x2f1a88;return{'id':_0x2726e7['id'],'threadId':_0x2726e7[_0x3a8a90(0xd8)],'ref':_0x2726e7['ref']};}};S=Q([b(0x0,_0xde01ec(_0x20faf4)),b(0x1,_0xde01ec(_0xead225)),b(0x2,_0xde01ec(_0x41dd94))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x6e991b,_0x7c54ca,_0x286569,_0x14e5b8)=>{for(var _0x572fb0=_0x14e5b8>0x1?void 0x0:_0x14e5b8?re(_0x7c54ca,_0x286569):_0x7c54ca,_0x10f0d0=_0x6e991b['length']-0x1,_0x371419;_0x10f0d0>=0x0;_0x10f0d0--)(_0x371419=_0x6e991b[_0x10f0d0])&&(_0x572fb0=_0x371419(_0x572fb0)||_0x572fb0);return _0x572fb0;},M=(_0x5300e7,_0xc85266)=>(_0x56c9f2,_0x221d57)=>_0xc85266(_0x56c9f2,_0x221d57,_0x5300e7);let f=class extends _0x324ec9{constructor(_0x439f53,_0x1c5a5e){const _0x3886e0=_0x2f1a88;super(),this[_0x3886e0(0xdf)]=_0x439f53,this[_0x3886e0(0x13e)]=_0x1c5a5e,this['_initDataSource']();}[_0x2f1a88(0x122)](){const _0xb95b6e=_0x2f1a88;this['_threadCommentDataSourceService']['dataSource']=this[_0xb95b6e(0x13e)],this[_0xb95b6e(0xdf)][_0xb95b6e(0xf5)]=!0x1;}};f=te([M(0x0,_0xb4d94),M(0x1,_0xde01ec(S))],f);var se=Object[_0x2f1a88(0xf0)],oe=Object[_0x2f1a88(0x121)],ne=(_0x5a13b4,_0x136103,_0x2395c6)=>_0x136103 in _0x5a13b4?se(_0x5a13b4,_0x136103,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2395c6}):_0x5a13b4[_0x136103]=_0x2395c6,ie=(_0x695702,_0x68d41b,_0x288351,_0x359c76)=>{const _0x32664c=_0x2f1a88;for(var _0x24182a=_0x359c76>0x1?void 0x0:_0x359c76?oe(_0x68d41b,_0x288351):_0x68d41b,_0x35fb10=_0x695702[_0x32664c(0xf6)]-0x1,_0x380a14;_0x35fb10>=0x0;_0x35fb10--)(_0x380a14=_0x695702[_0x35fb10])&&(_0x24182a=_0x380a14(_0x24182a)||_0x24182a);return _0x24182a;},N=(_0x5c9009,_0x69265)=>(_0x32e668,_0x1c5d3f)=>_0x69265(_0x32e668,_0x1c5d3f,_0x5c9009),$=(_0x32b7e5,_0xa92254,_0x1caefa)=>ne(_0x32b7e5,typeof _0xa92254!='symbol'?_0xa92254+'':_0xa92254,_0x1caefa);let g=class extends _0x51869c{constructor(_0x3eb225=O,_0x6c9bac,_0x20bf46){const _0x35743f=_0x2f1a88;super(),this[_0x35743f(0x10e)]=_0x3eb225,this['_injector']=_0x6c9bac,this['_configService']=_0x20bf46;const {..._0x302091}=_0x15954c({},O,this[_0x35743f(0x10e)]);this[_0x35743f(0x123)][_0x35743f(0xf9)](z,_0x302091);}[_0x2f1a88(0xff)](){[[S],[f],[_]]['forEach'](_0x4644a2=>{const _0x2b8508=_0x2182;this[_0x2b8508(0xe8)][_0x2b8508(0xe4)](_0x4644a2);});}[_0x2f1a88(0xe6)](){const _0x181bba=_0x2f1a88;this[_0x181bba(0xe8)][_0x181bba(0x13c)](f),this[_0x181bba(0xe8)]['get'](_);}};$(g,_0x2f1a88(0x120),W),$(g,_0x2f1a88(0x10c),_0x25d2ac[_0x2f1a88(0x105)]),g=ie([_0x28793a(_0xcae651,_0x424de7,_0x38080a),N(0x1,_0xde01ec(_0x337246)),N(0x2,_0x21f661)],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(_0x4e96b5,_0x5701b0){const _0x56b3d2=_0x3b2e,_0x435010=_0x4e96b5();while(!![]){try{const _0x5538b6=parseInt(_0x56b3d2(0x154))/0x1+parseInt(_0x56b3d2(0x10c))/0x2+parseInt(_0x56b3d2(0x140))/0x3*(parseInt(_0x56b3d2(0x15b))/0x4)+parseInt(_0x56b3d2(0x103))/0x5*(-parseInt(_0x56b3d2(0x130))/0x6)+-parseInt(_0x56b3d2(0x112))/0x7+-parseInt(_0x56b3d2(0x10a))/0x8+parseInt(_0x56b3d2(0x145))/0x9*(-parseInt(_0x56b3d2(0xf7))/0xa);if(_0x5538b6===_0x5701b0)break;else _0x435010['push'](_0x435010['shift']());}catch(_0x3c35c6){_0x435010['push'](_0x435010['shift']());}}}(_0x2590,0xb5f4b),function(_0x3edc63,_0x4bdb2c){const _0x4ca370=_0x3b2e;typeof exports==_0x4ca370(0x122)&&typeof module<'u'?_0x4bdb2c(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==_0x4ca370(0x15e)&&define[_0x4ca370(0x10b)]?define([_0x4ca370(0x147),_0x4ca370(0x16c),'@univerjs-pro/license','@univerjs/core',_0x4ca370(0x110),_0x4ca370(0x119),_0x4ca370(0x148),_0x4ca370(0x14c)],_0x4bdb2c):(_0x3edc63=typeof globalThis<'u'?globalThis:_0x3edc63||self,_0x4bdb2c(_0x3edc63[_0x4ca370(0xfd)]={},_0x3edc63['UniverProCollaborationClient'],_0x3edc63[_0x4ca370(0x124)],_0x3edc63['UniverCore'],_0x3edc63[_0x4ca370(0xf6)],_0x3edc63[_0x4ca370(0x150)],_0x3edc63[_0x4ca370(0x148)],_0x3edc63[_0x4ca370(0x151)]));}(this,function(_0x4e57e6,_0x3f2754,_0x27f76b,_0x2565dc,_0x320c74,_0x4402ca,_0x106224,_0xa42d9a){'use strict';const _0x4278cb=_0x3b2e;const _0x5e429c=_0x4278cb(0x128);var _0x21b6cb=(_0x166f83=>(_0x166f83[_0x166f83['OpenOrReOpen']=0x0]=_0x4278cb(0x168),_0x166f83[_0x166f83['Solved']=0x1]='Solved',_0x166f83[_0x166f83[_0x4278cb(0x139)]=-0x1]=_0x4278cb(0x139),_0x166f83))(_0x21b6cb||{}),_0x2b9fd0=(_0x51af04=>(_0x51af04[_0x51af04[_0x4278cb(0x12d)]=0x0]=_0x4278cb(0x12d),_0x51af04[_0x51af04['Add']=0x1]=_0x4278cb(0x14d),_0x51af04[_0x51af04[_0x4278cb(0x16f)]=0x2]=_0x4278cb(0x16f),_0x51af04[_0x51af04['Edit']=0x3]=_0x4278cb(0xf4),_0x51af04[_0x51af04[_0x4278cb(0x121)]=0x4]=_0x4278cb(0x121),_0x51af04[_0x51af04['Solve']=0x5]=_0x4278cb(0x16d),_0x51af04[_0x51af04[_0x4278cb(0x139)]=-0x1]=_0x4278cb(0x139),_0x51af04))(_0x2b9fd0||{});const _0x17ff52=_0x11e6d6=>_0x2565dc['dayjs'](new Date(+_0x11e6d6))['format'](_0x4278cb(0x141)),_0x2f9f1c=async(_0x17c269,_0x5e5f10)=>{const _0x3e1d53=_0x4278cb,_0x9f6c19=_0x17c269['get'](_0x2565dc['UserManagerService']),_0x5b6c39=_0x17c269[_0x3e1d53(0xf5)](_0xa42d9a['HTTPService']);_0x5e5f10[_0x3e1d53(0x159)](_0x446491=>{const _0x468a59=_0x3e1d53;_0x9f6c19[_0x468a59(0x127)](_0x446491)&&_0x5e5f10['delete'](_0x446491);}),_0x5e5f10[_0x3e1d53(0x14e)]&&(await _0x5b6c39[_0x3e1d53(0xf5)](_0x3e1d53(0x125),{'params':{'userIDs':[..._0x5e5f10]}}))[_0x3e1d53(0x120)][_0x3e1d53(0x13a)][_0x3e1d53(0x159)](_0x2bf19a=>{const _0x2fe9ee=_0x3e1d53;_0x2bf19a&&_0x9f6c19[_0x2fe9ee(0x167)](_0x2bf19a);});};var _0x2629d7=Object[_0x4278cb(0x134)],_0x2b028d=(_0x4ab453,_0x5bf7e5,_0x8e4212,_0x6483ec)=>{const _0x2b685b=_0x4278cb;for(var _0x48f098=_0x6483ec>0x1?void 0x0:_0x6483ec?_0x2629d7(_0x5bf7e5,_0x8e4212):_0x5bf7e5,_0x1684a3=_0x4ab453[_0x2b685b(0x16b)]-0x1,_0x58b0c1;_0x1684a3>=0x0;_0x1684a3--)(_0x58b0c1=_0x4ab453[_0x1684a3])&&(_0x48f098=_0x58b0c1(_0x48f098)||_0x48f098);return _0x48f098;},_0x150fe2=(_0x3ec38c,_0x5eba94)=>(_0x2ef4ca,_0x15dc3f)=>_0x5eba94(_0x2ef4ca,_0x15dc3f,_0x3ec38c);let _0x1231f8=class extends _0x2565dc['Disposable']{constructor(_0x3112b1,_0x295d70,_0x5e170a,_0x50231d){const _0x33c284=_0x4278cb;super(),this[_0x33c284(0x12f)]=_0x3112b1,this[_0x33c284(0x172)]=_0x295d70,this[_0x33c284(0x158)]=_0x5e170a,this[_0x33c284(0x163)]=_0x50231d,this['_init'](),this['_initUserSync']();}[_0x4278cb(0x10f)](){const _0x4e27ae=_0x4278cb;this[_0x4e27ae(0x14b)](this[_0x4e27ae(0x172)][_0x4e27ae(0x12c)][_0x4e27ae(0x12a)](_0x106224['bufferTime'](0x10))[_0x4e27ae(0x142)](_0x4c7100=>{const _0x1f0876=_0x4e27ae,_0x17d5e2=new Set();_0x4c7100[_0x1f0876(0x159)](_0x1c4704=>{const _0x4cd712=_0x1f0876;if(_0x1c4704['type']===_0x4cd712(0x156)){const _0x3a91ba=_0x1c4704['payload'][_0x4cd712(0x157)];_0x17d5e2['add'](_0x3a91ba);}}),_0x2f9f1c(this[_0x1f0876(0x163)],_0x17d5e2);}));}[_0x4278cb(0x160)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x35116f=>{const _0xf6f136=_0x3b2e;var _0x1dcdf8,_0x25a080,_0x201328,_0x27604d;const _0x281178=(_0x1dcdf8=this[_0xf6f136(0x172)][_0xf6f136(0xf1)](_0x35116f['unitId'])[_0xf6f136(0x155)](_0x1f144d=>_0x1f144d[_0xf6f136(0x165)]===_0x35116f[_0xf6f136(0x165)]))==null?void 0x0:_0x1dcdf8[_0xf6f136(0x13d)];if(!_0x281178)return;const {unitId:_0x1084ca,subUnitId:_0x203bcf}=_0x281178;switch(_0x35116f[_0xf6f136(0x12e)]&&this[_0xf6f136(0x158)]['addUser'](_0x35116f[_0xf6f136(0x12e)]),_0x35116f[_0xf6f136(0x10e)]){case _0x2b9fd0[_0xf6f136(0x14d)]:break;case _0x2b9fd0[_0xf6f136(0x16f)]:{this[_0xf6f136(0x172)][_0xf6f136(0x16e)](_0x1084ca,_0x203bcf,{'unitId':_0x1084ca,'subUnitId':_0x203bcf,'ref':'','id':_0x35116f[_0xf6f136(0xec)],'dT':_0x17ff52(+_0x35116f['createTimestamp']),'threadId':_0x35116f[_0xf6f136(0x165)],'personId':(_0x201328=(_0x25a080=_0x35116f[_0xf6f136(0x12e)])==null?void 0x0:_0x25a080[_0xf6f136(0xf3)])!=null?_0x201328:_0x35116f['userId'],'text':JSON[_0xf6f136(0x114)](_0x35116f['content']),'parentId':_0x281178['id']});break;}case _0x2b9fd0[_0xf6f136(0x121)]:{const _0x324e80=this['_threadCommentModel'][_0xf6f136(0x102)](_0x1084ca,_0x203bcf,_0x35116f[_0xf6f136(0xec)]);_0x324e80&&_0x324e80[_0xf6f136(0x101)]&&this[_0xf6f136(0x172)][_0xf6f136(0x149)](_0x1084ca,_0x203bcf,_0x35116f[_0xf6f136(0xec)]);break;}case _0x2b9fd0['Edit']:{this[_0xf6f136(0x172)][_0xf6f136(0x123)](_0x1084ca,_0x203bcf,{'commentId':_0x35116f[_0xf6f136(0xec)],'text':JSON[_0xf6f136(0x114)](_0x35116f[_0xf6f136(0xed)])});break;}case _0x2b9fd0[_0xf6f136(0x16d)]:{const _0x3b4048=(_0x27604d=this[_0xf6f136(0x172)][_0xf6f136(0xf1)](_0x35116f[_0xf6f136(0x100)])[_0xf6f136(0x155)](_0xf9ab3=>_0xf9ab3[_0xf6f136(0x165)]===_0x35116f[_0xf6f136(0x165)]))==null?void 0x0:_0x27604d['root'];_0x3b4048&&this['_threadCommentModel'][_0xf6f136(0x132)](_0x1084ca,_0x203bcf,_0x3b4048['id'],_0x35116f[_0xf6f136(0x105)]===_0x21b6cb[_0xf6f136(0x129)]);break;}}}));}};_0x1231f8=_0x2b028d([_0x150fe2(0x0,_0x2565dc[_0x4278cb(0x11e)](_0x3f2754[_0x4278cb(0x116)])),_0x150fe2(0x1,_0x2565dc[_0x4278cb(0x11e)](_0x4402ca[_0x4278cb(0x115)])),_0x150fe2(0x2,_0x2565dc[_0x4278cb(0x11e)](_0x2565dc[_0x4278cb(0x170)])),_0x150fe2(0x3,_0x2565dc[_0x4278cb(0x11e)](_0x2565dc[_0x4278cb(0x13e)]))],_0x1231f8);const _0x3c136d=_0x4278cb(0x14f),_0x18308d={};var _0x50a52b=Object['getOwnPropertyDescriptor'],_0x2187da=(_0x11838d,_0x4d94d8,_0x4f7888,_0x14af78)=>{const _0x5528c5=_0x4278cb;for(var _0x53b89b=_0x14af78>0x1?void 0x0:_0x14af78?_0x50a52b(_0x4d94d8,_0x4f7888):_0x4d94d8,_0x925862=_0x11838d[_0x5528c5(0x16b)]-0x1,_0x10c86b;_0x925862>=0x0;_0x925862--)(_0x10c86b=_0x11838d[_0x925862])&&(_0x53b89b=_0x10c86b(_0x53b89b)||_0x53b89b);return _0x53b89b;},_0x350610=(_0x3e38d6,_0x12c69f)=>(_0x1f3122,_0x253d83)=>_0x12c69f(_0x1f3122,_0x253d83,_0x3e38d6);function _0x29d2bc(_0x37aa3d,_0x3da123){const _0x931f3=_0x4278cb,_0x37325a=_0x37aa3d[_0x931f3(0x14a)][0x0];return{..._0x3da123,'id':_0x37325a[_0x931f3(0xec)],'resolved':_0x37aa3d['solved']===0x1,'dT':_0x17ff52(_0x37325a[_0x931f3(0x131)]),'personId':_0x37325a[_0x931f3(0x15a)],'threadId':_0x37325a[_0x931f3(0x165)]};}function _0xa68946(_0x5b8063,_0x4b46f9,_0x3ea943){const _0x43ed3f=_0x4278cb;var _0x585287,_0x12168;if(((_0x12168=(_0x585287=_0x5b8063==null?void 0x0:_0x5b8063[_0x43ed3f(0x14a)])==null?void 0x0:_0x585287[_0x43ed3f(0x16b)])!=null?_0x12168:0x0)>0x0){const _0x6987ad=(_0x4edf13,_0x270df0)=>({'id':_0x4edf13[_0x43ed3f(0xec)],'threadId':_0x4edf13[_0x43ed3f(0x165)],'dT':_0x17ff52(_0x4edf13['createTimestamp']),'personId':_0x4edf13[_0x43ed3f(0x15a)],'resolved':_0x5b8063['solved']===_0x21b6cb[_0x43ed3f(0x129)],'unitId':_0x4b46f9,'subUnitId':_0x3ea943,'text':JSON[_0x43ed3f(0x114)](_0x4edf13['content']),'parentId':_0x270df0}),_0x304324=_0x6987ad(_0x5b8063['replies'][0x0]);return{..._0x304324,'children':_0x5b8063[_0x43ed3f(0x14a)]['slice'](0x1)['map'](_0x3ac0c6=>_0x6987ad(_0x3ac0c6,_0x304324['id']))};}return null;}let _0x470775=class{constructor(_0x4df437,_0x2c3a6d,_0x231a20){const _0x3d63d3=_0x4278cb;this['_httpService']=_0x4df437,this[_0x3d63d3(0x158)]=_0x2c3a6d,this[_0x3d63d3(0x13c)]=_0x231a20;}async[_0x4278cb(0x16e)](_0x410d86){const _0x421a4f=_0x4278cb;var _0x56cf35,_0xbb8e11;const {parentId:_0x76fcb,unitId:_0x479777,text:_0x1785f3,threadId:_0x5304a7}=_0x410d86,_0x19779b=(_0xbb8e11=(_0x56cf35=_0x1785f3[_0x421a4f(0x16a)])==null?void 0x0:_0x56cf35[_0x421a4f(0x161)](_0x3dfaf5=>_0x3dfaf5[_0x421a4f(0xf2)]===_0x2565dc[_0x421a4f(0x136)][_0x421a4f(0x104)])[_0x421a4f(0x162)](_0x4adff1=>_0x4adff1['rangeId']))!=null?_0xbb8e11:[],_0x41224e=JSON[_0x421a4f(0x106)](_0x1785f3),_0x3e0616=(await this[_0x421a4f(0x13c)]['requireSession'](_0x479777))[_0x421a4f(0x13f)]();if(_0x76fcb){const _0x47a4f7={'memberId':_0x3e0616,'unitId':_0x479777,'content':_0x41224e,'mention':_0x19779b,'threadId':_0x5304a7},_0x57b1c9=(await this[_0x421a4f(0x118)][_0x421a4f(0x10d)](_0x421a4f(0x109)+_0x479777+'/reply',{'body':_0x47a4f7}))[_0x421a4f(0x120)][_0x421a4f(0x11a)];return{..._0x410d86,'id':_0x57b1c9[_0x421a4f(0xec)],'dT':_0x2565dc['dayjs'](+_0x57b1c9[_0x421a4f(0x131)])[_0x421a4f(0xf0)](_0x421a4f(0x141)),'personId':_0x57b1c9[_0x421a4f(0x15a)]};}else{const _0xc71c0={'memberId':_0x3e0616,'unitId':_0x479777,'content':_0x41224e,'mention':_0x19779b},_0x18e28d=await this[_0x421a4f(0x118)][_0x421a4f(0x10d)](_0x421a4f(0x109)+_0x479777+'/add',{'body':_0xc71c0});return _0x29d2bc(_0x18e28d[_0x421a4f(0x120)][_0x421a4f(0x13b)],_0x410d86);}}async[_0x4278cb(0x123)](_0x171d5f){const _0x1ed5a8=_0x4278cb;var _0x3f48a2,_0x1de28f;const {text:_0x43c8fa,unitId:_0x56a733}=_0x171d5f,_0xe59c38=(_0x1de28f=(_0x3f48a2=_0x43c8fa[_0x1ed5a8(0x16a)])==null?void 0x0:_0x3f48a2[_0x1ed5a8(0x161)](_0x42cd62=>_0x42cd62['rangeType']===_0x2565dc[_0x1ed5a8(0x136)][_0x1ed5a8(0x104)])[_0x1ed5a8(0x162)](_0x56d529=>_0x56d529['rangeId']))!=null?_0x1de28f:[],_0x9dcf71=JSON['stringify'](_0x43c8fa),_0x36a25e=_0x171d5f['threadId'],_0x2341ba=_0x171d5f['id'],_0x555e29={'memberId':(await this[_0x1ed5a8(0x13c)][_0x1ed5a8(0xf9)](_0x56a733))[_0x1ed5a8(0x13f)](),'unitId':_0x56a733,'threadId':_0x36a25e,'mention':_0xe59c38,'content':_0x9dcf71,'replyId':_0x2341ba},_0x4b97e9=await this['_httpService']['post'](_0x1ed5a8(0x109)+_0x56a733+_0x1ed5a8(0x11f),{'body':_0x555e29});return!_0x4b97e9[_0x1ed5a8(0x120)][_0x1ed5a8(0x15f)]||_0x4b97e9['body'][_0x1ed5a8(0x15f)]['code']===0x1;}async[_0x4278cb(0x132)](_0x55a853){const _0x3ea50d=_0x4278cb,{unitId:_0x2f306a}=_0x55a853,_0x1f132c=_0x55a853[_0x3ea50d(0x165)],_0x3c97f9={'memberId':this[_0x3ea50d(0x158)][_0x3ea50d(0x153)]()[_0x3ea50d(0xf3)],'unitId':_0x2f306a,'threadId':_0x1f132c,'solved':_0x55a853[_0x3ea50d(0x11d)]?_0x21b6cb[_0x3ea50d(0x129)]:_0x21b6cb[_0x3ea50d(0x168)]},_0x56ba4d=await this[_0x3ea50d(0x118)][_0x3ea50d(0x10d)](_0x3ea50d(0x109)+_0x2f306a+_0x3ea50d(0x11c),{'body':_0x3c97f9});return!_0x56ba4d[_0x3ea50d(0x120)][_0x3ea50d(0x15f)]||_0x56ba4d[_0x3ea50d(0x120)][_0x3ea50d(0x15f)][_0x3ea50d(0x143)]===0x1;}async[_0x4278cb(0x149)](_0x51543f,_0x26b44c,_0x82cf1e,_0x2d62f4){const _0x3c457f=_0x4278cb,_0x4475e5={'memberId':(await this[_0x3c457f(0x13c)][_0x3c457f(0xf9)](_0x51543f))[_0x3c457f(0x13f)](),'threadId':_0x82cf1e,'replyId':_0x2d62f4,'unitId':_0x51543f},_0x4d3f12=await this[_0x3c457f(0x118)][_0x3c457f(0x10d)](_0x3c457f(0x109)+_0x51543f+_0x3c457f(0x107),{'body':_0x4475e5});return!_0x4d3f12[_0x3c457f(0x120)][_0x3c457f(0x15f)]||_0x4d3f12[_0x3c457f(0x120)]['error']['code']===0x1;}async[_0x4278cb(0x113)](_0x377ad1,_0x15ab8,_0x34c2ed){const _0x20d011=_0x4278cb,_0x1acc06={'unitId':_0x377ad1,'threadId':_0x34c2ed},_0x5e019a=await this[_0x20d011(0x118)][_0x20d011(0x10d)](_0x20d011(0x109)+_0x377ad1+_0x20d011(0x144),{'body':_0x1acc06}),_0x16b57a=_0x34c2ed[_0x20d011(0x162)](_0x2c8666=>_0xa68946(_0x5e019a[_0x20d011(0x120)]['comments'][_0x2c8666],_0x377ad1,_0x15ab8))[_0x20d011(0x161)](Boolean);return Object[_0x20d011(0xf8)](_0x5e019a['body'][_0x20d011(0x13a)])[_0x20d011(0x159)](_0x8269fc=>{const _0x41d381=_0x20d011;this['_userService'][_0x41d381(0x167)](_0x8269fc);}),_0x16b57a;}['saveCommentToSnapshot'](_0x2deaf1){const _0xd44b6e=_0x4278cb;return{'id':_0x2deaf1['id'],'threadId':_0x2deaf1[_0xd44b6e(0x165)],'ref':_0x2deaf1[_0xd44b6e(0xee)]};}};_0x470775=_0x2187da([_0x350610(0x0,_0x2565dc['Inject'](_0xa42d9a[_0x4278cb(0xfa)])),_0x350610(0x1,_0x2565dc[_0x4278cb(0x11e)](_0x2565dc[_0x4278cb(0x170)])),_0x350610(0x2,_0x2565dc[_0x4278cb(0x11e)](_0x3f2754[_0x4278cb(0x166)]))],_0x470775);var _0x4e92c2=Object[_0x4278cb(0x134)],_0x57034b=(_0x2bf78f,_0x41a0eb,_0x489815,_0xa83d72)=>{const _0x3db992=_0x4278cb;for(var _0x530593=_0xa83d72>0x1?void 0x0:_0xa83d72?_0x4e92c2(_0x41a0eb,_0x489815):_0x41a0eb,_0x783f25=_0x2bf78f[_0x3db992(0x16b)]-0x1,_0x21120a;_0x783f25>=0x0;_0x783f25--)(_0x21120a=_0x2bf78f[_0x783f25])&&(_0x530593=_0x21120a(_0x530593)||_0x530593);return _0x530593;},_0x2202f2=(_0xa38a3a,_0xe27932)=>(_0x1de2b4,_0x5df256)=>_0xe27932(_0x1de2b4,_0x5df256,_0xa38a3a);let _0x52a555=class extends _0x2565dc[_0x4278cb(0xfc)]{constructor(_0x147016,_0x66ca85){const _0x2a30d8=_0x4278cb;super(),this['_threadCommentDataSourceService']=_0x147016,this['_threadCommentDataSource']=_0x66ca85,this[_0x2a30d8(0x137)]();}[_0x4278cb(0x137)](){const _0x502c66=_0x4278cb;this[_0x502c66(0xef)][_0x502c66(0x152)]=this[_0x502c66(0x135)],this[_0x502c66(0xef)][_0x502c66(0x12b)]=!0x1;}};_0x52a555=_0x57034b([_0x2202f2(0x0,_0x4402ca[_0x4278cb(0x11b)]),_0x2202f2(0x1,_0x2565dc[_0x4278cb(0x11e)](_0x470775))],_0x52a555);var _0x19a0a0=Object[_0x4278cb(0x138)],_0x30527f=Object[_0x4278cb(0x134)],_0x27b260=(_0x1648d9,_0x2fb0cb,_0x508659)=>_0x2fb0cb in _0x1648d9?_0x19a0a0(_0x1648d9,_0x2fb0cb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x508659}):_0x1648d9[_0x2fb0cb]=_0x508659,_0x5022d0=(_0x3010e9,_0x2961c0,_0x5672eb,_0x12ebb8)=>{const _0x26659d=_0x4278cb;for(var _0xbdd4f3=_0x12ebb8>0x1?void 0x0:_0x12ebb8?_0x30527f(_0x2961c0,_0x5672eb):_0x2961c0,_0x35eb52=_0x3010e9[_0x26659d(0x16b)]-0x1,_0x31f473;_0x35eb52>=0x0;_0x35eb52--)(_0x31f473=_0x3010e9[_0x35eb52])&&(_0xbdd4f3=_0x31f473(_0xbdd4f3)||_0xbdd4f3);return _0xbdd4f3;},_0x14b975=(_0x59f8d0,_0x1a8c14)=>(_0x4abe07,_0x218401)=>_0x1a8c14(_0x4abe07,_0x218401,_0x59f8d0),_0x2f3c2d=(_0x2d7bef,_0x3e7f16,_0x1ccf6d)=>_0x27b260(_0x2d7bef,typeof _0x3e7f16!='symbol'?_0x3e7f16+'':_0x3e7f16,_0x1ccf6d);_0x4e57e6['UniverThreadCommentDataSourcePlugin']=class extends _0x2565dc[_0x4278cb(0x133)]{constructor(_0x2ba469=_0x18308d,_0x2b52cd,_0x5365a4){const _0x6f3959=_0x4278cb;super(),this[_0x6f3959(0x15c)]=_0x2ba469,this[_0x6f3959(0x163)]=_0x2b52cd,this[_0x6f3959(0x108)]=_0x5365a4;const {..._0x3aa05e}=_0x2565dc[_0x6f3959(0x146)]({},_0x18308d,this['_config']);this['_configService'][_0x6f3959(0xfe)](_0x3c136d,_0x3aa05e);}['onStarting'](){[[_0x470775],[_0x52a555],[_0x1231f8]]['forEach'](_0x41b0cd=>{const _0x4f5c21=_0x3b2e;this[_0x4f5c21(0x163)]['add'](_0x41b0cd);});}[_0x4278cb(0x111)](){const _0x220fe9=_0x4278cb;this['_injector'][_0x220fe9(0xf5)](_0x52a555),this[_0x220fe9(0x163)]['get'](_0x1231f8);}},_0x2f3c2d(_0x4e57e6[_0x4278cb(0x164)],_0x4278cb(0x171),_0x5e429c),_0x2f3c2d(_0x4e57e6[_0x4278cb(0x164)],'type',_0x2565dc[_0x4278cb(0x117)]['UNIVER_UNKNOWN']),_0x4e57e6[_0x4278cb(0x164)]=_0x5022d0([_0x2565dc['DependentOn'](_0x320c74[_0x4278cb(0x126)],_0x3f2754[_0x4278cb(0x15d)],_0x27f76b[_0x4278cb(0xff)]),_0x14b975(0x1,_0x2565dc['Inject'](_0x2565dc[_0x4278cb(0x13e)])),_0x14b975(0x2,_0x2565dc['IConfigService'])],_0x4e57e6[_0x4278cb(0x164)]),Object[_0x4278cb(0x138)](_0x4e57e6,Symbol[_0x4278cb(0xfb)],{'value':_0x4278cb(0x169)});}));function _0x3b2e(_0x36409a,_0x4978eb){_0x36409a=_0x36409a-0xec;const _0x2590fa=_0x2590();let _0x3b2e18=_0x2590fa[_0x36409a];return _0x3b2e18;}function _0x2590(){const _0x31d1c6=['UserManagerService','pluginName','_threadCommentModel','replyId','content','ref','_threadCommentDataSourceService','format','getUnit','rangeType','userID','Edit','get','UniverThreadCommentUi','3400QpzHBb','values','requireSession','HTTPService','toStringTag','Disposable','UniverProThreadCommentDatasource','setConfig','UniverLicensePlugin','unitId','parentId','getComment','98555UirDZh','COMMENT','solved','stringify','/delete','_configService','/universer-api/comment/unit/','9038112UYFSQK','amd','2542456IOAZeN','post','type','_initUserSync','@univerjs/thread-comment-ui','onReady','1853187AVkTTE','listComments','parse','ThreadCommentModel','CommentService','UniverInstanceType','_httpService','@univerjs/thread-comment','reply','IThreadCommentDataSourceService','/solved','resolved','Inject','/edit','body','Delete','object','updateComment','UniverProLicense','/universer-api/user/list','UniverThreadCommentUIPlugin','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','pipe','syncUpdateMutationToColla','commentUpdate$','Unknown','user','_commentService','102nskYls','createTimestamp','resolveComment','Plugin','getOwnPropertyDescriptor','_threadCommentDataSource','CustomRangeType','_initDataSource','defineProperty','UNRECOGNIZED','users','comment','_sessionService','root','Injector','getMemberID','1017sBssRP','YYYY/MM/DD\x20HH:mm','subscribe','code','/list','10377LFbuIW','merge','exports','rxjs','deleteComment','replies','disposeWithMe','@univerjs/network','Add','size','thread-comment-data-source.config','UniverThreadComment','UniverNetwork','dataSource','getCurrentUser','978356WFuaXN','find','add','personId','_userService','forEach','userId','7284vmBbrO','_config','UniverCollaborationClientPlugin','function','error','_init','filter','map','_injector','UniverThreadCommentDataSourcePlugin','threadId','CollaborationSessionService','addUser','OpenOrReOpen','Module','customRanges','length','@univerjs-pro/collaboration-client','Solve','addComment','Reply'];_0x2590=function(){return _0x31d1c6;};return _0x2590();}
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.20260122-b1556b1",
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.20260122-b1556b1",
49
+ "@univerjs-pro/license": "0.15.2-insiders.20260122-b1556b1",
52
50
  "@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"
51
+ "@univerjs/core": "0.15.2-insiders.20260122-b1556b1",
52
+ "@univerjs/thread-comment-ui": "0.15.2-insiders.20260122-b1556b1",
53
+ "@univerjs/thread-comment": "0.15.2-insiders.20260122-b1556b1",
54
+ "@univerjs/network": "0.15.2-insiders.20260122-b1556b1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",