@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-fa407d3 → 0.6.7-experimental.20250401-9542b43

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 _0x595a0c=_0x161a;(function(_0x238ccc,_0x2888c0){const _0xdb17e5=_0x161a,_0x411936=_0x238ccc();while(!![]){try{const _0xfd7506=-parseInt(_0xdb17e5(0x10a))/0x1+-parseInt(_0xdb17e5(0xee))/0x2+parseInt(_0xdb17e5(0xda))/0x3+-parseInt(_0xdb17e5(0x12b))/0x4*(-parseInt(_0xdb17e5(0xfc))/0x5)+parseInt(_0xdb17e5(0x12d))/0x6*(parseInt(_0xdb17e5(0xf0))/0x7)+-parseInt(_0xdb17e5(0x126))/0x8+-parseInt(_0xdb17e5(0x11a))/0x9*(-parseInt(_0xdb17e5(0xd5))/0xa);if(_0xfd7506===_0x2888c0)break;else _0x411936['push'](_0x411936['shift']());}catch(_0x58de1f){_0x411936['push'](_0x411936['shift']());}}}(_0x3f85,0xa7ff7));Object[_0x595a0c(0x129)](exports,Symbol[_0x595a0c(0xfa)],{'value':_0x595a0c(0x133)});const b=require(_0x595a0c(0x11e)),T=require(_0x595a0c(0x104)),c=require(_0x595a0c(0xef)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x595a0c(0x128)),U=_0x595a0c(0x100);var I=(_0x21bce0=>(_0x21bce0[_0x21bce0['OpenOrReOpen']=0x0]=_0x595a0c(0x139),_0x21bce0[_0x21bce0['Solved']=0x1]=_0x595a0c(0xde),_0x21bce0[_0x21bce0['UNRECOGNIZED']=-0x1]=_0x595a0c(0xd1),_0x21bce0))(I||{}),v=(_0x3e9c05=>(_0x3e9c05[_0x3e9c05[_0x595a0c(0x12a)]=0x0]=_0x595a0c(0x12a),_0x3e9c05[_0x3e9c05[_0x595a0c(0x127)]=0x1]=_0x595a0c(0x127),_0x3e9c05[_0x3e9c05[_0x595a0c(0xc4)]=0x2]=_0x595a0c(0xc4),_0x3e9c05[_0x3e9c05[_0x595a0c(0xe5)]=0x3]=_0x595a0c(0xe5),_0x3e9c05[_0x3e9c05[_0x595a0c(0x115)]=0x4]=_0x595a0c(0x115),_0x3e9c05[_0x3e9c05['Solve']=0x5]=_0x595a0c(0xfe),_0x3e9c05[_0x3e9c05['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e9c05))(v||{});const f=_0x40d61f=>c[_0x595a0c(0x124)](new Date(+_0x40d61f))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5a055a,_0x2d2025)=>{const _0x2c101a=_0x595a0c,_0x56c2d3=_0x5a055a[_0x2c101a(0xff)](c['UserManagerService']),_0x712f2c=_0x5a055a['get'](P['HTTPService']);_0x2d2025[_0x2c101a(0xcf)](_0x2331ac=>{const _0x16c30f=_0x2c101a;_0x56c2d3[_0x16c30f(0xf4)](_0x2331ac)&&_0x2d2025['delete'](_0x2331ac);}),_0x2d2025[_0x2c101a(0xdd)]&&(await _0x712f2c[_0x2c101a(0xff)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2d2025]}}))['body'][_0x2c101a(0xf9)][_0x2c101a(0xcf)](_0x24cc89=>{const _0x37d737=_0x2c101a;_0x24cc89&&_0x56c2d3[_0x37d737(0xca)](_0x24cc89);});};var $=Object[_0x595a0c(0x116)],E=(_0xfc5e59,_0x1a7d0a,_0x1b7032,_0x5b3293)=>{const _0x3d44b4=_0x595a0c;for(var _0x20d214=_0x5b3293>0x1?void 0x0:_0x5b3293?$(_0x1a7d0a,_0x1b7032):_0x1a7d0a,_0x256b84=_0xfc5e59[_0x3d44b4(0x102)]-0x1,_0xac0ed4;_0x256b84>=0x0;_0x256b84--)(_0xac0ed4=_0xfc5e59[_0x256b84])&&(_0x20d214=_0xac0ed4(_0x20d214)||_0x20d214);return _0x20d214;},S=(_0x473526,_0x55ca53)=>(_0x425236,_0x5469ef)=>_0x55ca53(_0x425236,_0x5469ef,_0x473526);let p=class extends c[_0x595a0c(0xe8)]{constructor(_0x2ec0d2,_0x2f7bf1,_0x1fe6d6,_0x38d930){const _0x32b00b=_0x595a0c;super(),this['_commentService']=_0x2ec0d2,this['_threadCommentModel']=_0x2f7bf1,this[_0x32b00b(0xd8)]=_0x1fe6d6,this['_injector']=_0x38d930,this[_0x32b00b(0x106)](),this[_0x32b00b(0x140)]();}[_0x595a0c(0x140)](){const _0x504ea0=_0x595a0c;this[_0x504ea0(0xf8)](this[_0x504ea0(0x101)][_0x504ea0(0xcc)][_0x504ea0(0x123)](w[_0x504ea0(0x12f)](0x10))[_0x504ea0(0x117)](_0x233d8b=>{const _0x2f49af=_0x504ea0,_0x57305b=new Set();_0x233d8b[_0x2f49af(0xcf)](_0x30b453=>{const _0x240745=_0x2f49af;switch(_0x30b453['type']){case _0x240745(0xc7):{const _0x4bfea0=_0x30b453[_0x240745(0xe3)]['personId'];_0x57305b[_0x240745(0xc7)](_0x4bfea0);break;}}}),R(this[_0x2f49af(0x130)],_0x57305b);}));}[_0x595a0c(0x106)](){const _0x539075=_0x595a0c;this[_0x539075(0xf8)](this[_0x539075(0xed)][_0x539075(0xcc)][_0x539075(0x117)](async _0x30d945=>{const _0x529cd3=_0x539075;var _0x14439b,_0x3fd795,_0x5a19c4,_0x3746a5;const _0x4ca142=(_0x14439b=this[_0x529cd3(0x101)][_0x529cd3(0x134)](_0x30d945[_0x529cd3(0x125)])[_0x529cd3(0xd3)](_0x19ed0f=>_0x19ed0f[_0x529cd3(0xe6)]===_0x30d945['threadId']))==null?void 0x0:_0x14439b['root'];if(!_0x4ca142)return;const {unitId:_0xea1ef6,subUnitId:_0x3e266a}=_0x4ca142;switch(_0x30d945['user']&&this['_userService'][_0x529cd3(0xca)](_0x30d945[_0x529cd3(0xe7)]),_0x30d945['type']){case v[_0x529cd3(0x127)]:break;case v[_0x529cd3(0xc4)]:{this[_0x529cd3(0x101)]['addComment'](_0xea1ef6,_0x3e266a,{'unitId':_0xea1ef6,'subUnitId':_0x3e266a,'ref':'','id':_0x30d945[_0x529cd3(0xfd)],'dT':f(+_0x30d945['createTimestamp']),'threadId':_0x30d945[_0x529cd3(0xe6)],'personId':(_0x5a19c4=(_0x3fd795=_0x30d945[_0x529cd3(0xe7)])==null?void 0x0:_0x3fd795[_0x529cd3(0x136)])!=null?_0x5a19c4:_0x30d945['userId'],'text':JSON[_0x529cd3(0x135)](_0x30d945['content']),'parentId':_0x4ca142['id']});break;}case v['Delete']:{const _0x4f929b=this['_threadCommentModel'][_0x529cd3(0xce)](_0xea1ef6,_0x3e266a,_0x30d945[_0x529cd3(0xfd)]);_0x4f929b&&_0x4f929b['parentId']&&this[_0x529cd3(0x101)][_0x529cd3(0x13f)](_0xea1ef6,_0x3e266a,_0x30d945['replyId']);break;}case v[_0x529cd3(0xe5)]:{this['_threadCommentModel']['updateComment'](_0xea1ef6,_0x3e266a,{'commentId':_0x30d945[_0x529cd3(0xfd)],'text':JSON[_0x529cd3(0x135)](_0x30d945[_0x529cd3(0xf2)])});break;}case v['Solve']:{const _0x1cf8bb=(_0x3746a5=this[_0x529cd3(0x101)][_0x529cd3(0x134)](_0x30d945[_0x529cd3(0x125)])[_0x529cd3(0xd3)](_0x3c0232=>_0x3c0232[_0x529cd3(0xe6)]===_0x30d945[_0x529cd3(0xe6)]))==null?void 0x0:_0x3746a5[_0x529cd3(0xf7)];_0x1cf8bb&&this[_0x529cd3(0x101)][_0x529cd3(0xf1)](_0xea1ef6,_0x3e266a,_0x1cf8bb['id'],_0x30d945[_0x529cd3(0x10b)]===I[_0x529cd3(0xde)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x595a0c(0xf3)])),S(0x1,c['Inject'](M[_0x595a0c(0xec)])),S(0x2,c['Inject'](c[_0x595a0c(0x141)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x595a0c(0xd2),D={};var A=Object[_0x595a0c(0x116)],x=(_0x1ffd83,_0x187136,_0x104856,_0x32fe96)=>{for(var _0x5c4e3f=_0x32fe96>0x1?void 0x0:_0x32fe96?A(_0x187136,_0x104856):_0x187136,_0x33e2cf=_0x1ffd83['length']-0x1,_0x381ce2;_0x33e2cf>=0x0;_0x33e2cf--)(_0x381ce2=_0x1ffd83[_0x33e2cf])&&(_0x5c4e3f=_0x381ce2(_0x5c4e3f)||_0x5c4e3f);return _0x5c4e3f;},_=(_0x5cfc9e,_0x2c5a08)=>(_0x40928a,_0x205a82)=>_0x2c5a08(_0x40928a,_0x205a82,_0x5cfc9e);function Y(_0x5098aa,_0x6cc7ad){const _0x42b187=_0x595a0c,_0x1e5576=_0x5098aa['replies'][0x0];return{..._0x6cc7ad,'id':_0x1e5576[_0x42b187(0xfd)],'resolved':_0x5098aa[_0x42b187(0x10b)]===0x1,'dT':f(_0x1e5576[_0x42b187(0xc8)]),'personId':_0x1e5576['userId'],'threadId':_0x1e5576['threadId']};}function G(_0x127280,_0x2a207d,_0x54b5dc){const _0x2d7aa0=_0x595a0c;var _0x420208,_0x30f809;if(((_0x30f809=(_0x420208=_0x127280==null?void 0x0:_0x127280[_0x2d7aa0(0x13c)])==null?void 0x0:_0x420208['length'])!=null?_0x30f809:0x0)>0x0){const _0x1131ed=(_0x3b650d,_0x168424)=>({'id':_0x3b650d[_0x2d7aa0(0xfd)],'threadId':_0x3b650d[_0x2d7aa0(0xe6)],'dT':f(_0x3b650d['createTimestamp']),'personId':_0x3b650d[_0x2d7aa0(0x132)],'resolved':_0x127280['solved']===I[_0x2d7aa0(0xde)],'unitId':_0x2a207d,'subUnitId':_0x54b5dc,'text':JSON[_0x2d7aa0(0x135)](_0x3b650d[_0x2d7aa0(0xf2)]),'parentId':_0x168424}),_0x26acf2=_0x1131ed(_0x127280[_0x2d7aa0(0x13c)][0x0]);return{..._0x26acf2,'children':_0x127280[_0x2d7aa0(0x13c)][_0x2d7aa0(0x109)](0x1)['map'](_0x106fd1=>_0x1131ed(_0x106fd1,_0x26acf2['id']))};}return null;}let g=class{constructor(_0x2ef76a,_0x23ae84,_0x1ad920,_0x258122){const _0x187032=_0x595a0c;this[_0x187032(0xc5)]=_0x2ef76a,this[_0x187032(0xd8)]=_0x23ae84,this[_0x187032(0xc9)]=_0x1ad920,this['_injector']=_0x258122;}async[_0x595a0c(0xea)](_0x3970af){const _0x520092=_0x595a0c;var _0x3fc90c,_0x650187;const {parentId:_0x113888,unitId:_0x53a5e8,text:_0x47411a,threadId:_0x5ee29e}=_0x3970af,_0x51c080=(_0x650187=(_0x3fc90c=_0x47411a[_0x520092(0x10d)])==null?void 0x0:_0x3fc90c['filter'](_0xa79f97=>_0xa79f97[_0x520092(0x113)]===c[_0x520092(0xcb)][_0x520092(0x13a)])[_0x520092(0xdc)](_0x5670a3=>_0x5670a3[_0x520092(0x10f)]))!=null?_0x650187:[],_0x2d40d3=JSON[_0x520092(0xd6)](_0x47411a),_0x523de2=(await this[_0x520092(0xc9)][_0x520092(0xe0)](_0x53a5e8))[_0x520092(0x10e)]();if(_0x113888){const _0x39580b={'memberId':_0x523de2,'unitId':_0x53a5e8,'content':_0x2d40d3,'mention':_0x51c080,'threadId':_0x5ee29e},_0x137c51=(await this[_0x520092(0xc5)][_0x520092(0x12e)](_0x520092(0xe4)+_0x53a5e8+_0x520092(0x13d),{'body':_0x39580b}))[_0x520092(0x11f)][_0x520092(0xe1)];return{..._0x3970af,'id':_0x137c51['replyId'],'dT':c[_0x520092(0x124)](+_0x137c51['createTimestamp'])[_0x520092(0x114)](_0x520092(0x138)),'personId':_0x137c51[_0x520092(0x132)]};}else{const _0x26cf0a={'memberId':_0x523de2,'unitId':_0x53a5e8,'content':_0x2d40d3,'mention':_0x51c080},_0xd2557b=await this[_0x520092(0xc5)][_0x520092(0x12e)](_0x520092(0xe4)+_0x53a5e8+_0x520092(0x12c),{'body':_0x26cf0a});return Y(_0xd2557b[_0x520092(0x11f)][_0x520092(0x108)],_0x3970af);}}async[_0x595a0c(0x110)](_0x4e7bb1){const _0x2340db=_0x595a0c;var _0x42dc1c,_0x5c6967;const {text:_0x11ba1d,unitId:_0x43f8e8}=_0x4e7bb1,_0x5b4d8f=(_0x5c6967=(_0x42dc1c=_0x11ba1d[_0x2340db(0x10d)])==null?void 0x0:_0x42dc1c[_0x2340db(0xf6)](_0x1413fe=>_0x1413fe[_0x2340db(0x113)]===c[_0x2340db(0xcb)][_0x2340db(0x13a)])[_0x2340db(0xdc)](_0x4f51fd=>_0x4f51fd[_0x2340db(0x10f)]))!=null?_0x5c6967:[],_0x3ff45b=JSON[_0x2340db(0xd6)](_0x11ba1d),_0x995034=_0x4e7bb1[_0x2340db(0xe6)],_0x338d88=_0x4e7bb1['id'],_0x284b3e={'memberId':(await this[_0x2340db(0xc9)][_0x2340db(0xe0)](_0x43f8e8))[_0x2340db(0x10e)](),'unitId':_0x43f8e8,'threadId':_0x995034,'mention':_0x5b4d8f,'content':_0x3ff45b,'replyId':_0x338d88},_0xec899f=await this['_httpService'][_0x2340db(0x12e)](_0x2340db(0xe4)+_0x43f8e8+'/edit',{'body':_0x284b3e});return!_0xec899f['body']['error']||_0xec899f[_0x2340db(0x11f)][_0x2340db(0xf5)]['code']===0x1;}async[_0x595a0c(0xf1)](_0x177b6e){const _0x15a949=_0x595a0c,{unitId:_0x23bb9e}=_0x177b6e,_0x11610e=_0x177b6e[_0x15a949(0xe6)],_0x3e3894={'memberId':this[_0x15a949(0xd8)]['getCurrentUser']()[_0x15a949(0x136)],'unitId':_0x23bb9e,'threadId':_0x11610e,'solved':_0x177b6e[_0x15a949(0xd7)]?I[_0x15a949(0xde)]:I['OpenOrReOpen']},_0x5a0af5=await this[_0x15a949(0xc5)][_0x15a949(0x12e)](_0x15a949(0xe4)+_0x23bb9e+_0x15a949(0xe2),{'body':_0x3e3894});return!_0x5a0af5[_0x15a949(0x11f)]['error']||_0x5a0af5[_0x15a949(0x11f)][_0x15a949(0xf5)][_0x15a949(0x11c)]===0x1;}async[_0x595a0c(0x13f)](_0x2cf966,_0x3b9787,_0x4ba94b,_0x59b6d3){const _0x78a53a=_0x595a0c,_0x50872b={'memberId':(await this['_sessionService'][_0x78a53a(0xe0)](_0x2cf966))[_0x78a53a(0x10e)](),'threadId':_0x4ba94b,'replyId':_0x59b6d3,'unitId':_0x2cf966},_0x428aa1=await this[_0x78a53a(0xc5)][_0x78a53a(0x12e)](_0x78a53a(0xe4)+_0x2cf966+_0x78a53a(0x111),{'body':_0x50872b});return!_0x428aa1[_0x78a53a(0x11f)][_0x78a53a(0xf5)]||_0x428aa1['body'][_0x78a53a(0xf5)][_0x78a53a(0x11c)]===0x1;}async['listComments'](_0x516880,_0x5ae597,_0x30ce48){const _0x4158e2=_0x595a0c,_0x135a68={'unitId':_0x516880,'threadId':_0x30ce48},_0x4fb56b=await this[_0x4158e2(0xc5)][_0x4158e2(0x12e)](_0x4158e2(0xe4)+_0x516880+_0x4158e2(0x112),{'body':_0x135a68}),_0x1d6813=_0x30ce48[_0x4158e2(0xdc)](_0x2daa1c=>G(_0x4fb56b[_0x4158e2(0x11f)]['comments'][_0x2daa1c],_0x516880,_0x5ae597))[_0x4158e2(0xf6)](Boolean);return Object[_0x4158e2(0x10c)](_0x4fb56b[_0x4158e2(0x11f)][_0x4158e2(0xf9)])[_0x4158e2(0xcf)](_0x58cdf6=>{const _0x1f2813=_0x4158e2;this[_0x1f2813(0xd8)]['addUser'](_0x58cdf6);}),_0x1d6813;}[_0x595a0c(0x13b)](_0x2ab3e5){const _0x55b823=_0x595a0c;return{'id':_0x2ab3e5['id'],'threadId':_0x2ab3e5[_0x55b823(0xe6)],'ref':_0x2ab3e5[_0x55b823(0x121)]};}};g=x([_(0x0,c['Inject'](P[_0x595a0c(0x122)])),_(0x1,c['Inject'](c[_0x595a0c(0x141)])),_(0x2,c[_0x595a0c(0xd4)](b[_0x595a0c(0xd9)])),_(0x3,c['Inject'](c['Injector']))],g);function _0x3f85(){const _0x5a4474=['syncUpdateMutationToColla','deleteComment','_initUserSync','UserManagerService','Reply','_httpService','_configService','add','createTimestamp','_sessionService','addUser','CustomRangeType','commentUpdate$','UNIVER_UNKNOWN','getComment','forEach','IThreadCommentDataSourceService','UNRECOGNIZED','thread-comment-data-source.config','find','Inject','10IWwoHG','stringify','resolved','_userService','CollaborationSessionService','236832nbsyBv','merge','map','size','Solved','symbol','requireSession','reply','/solved','payload','/universer-api/comment/unit/','Edit','threadId','user','Disposable','_threadCommentDataSourceService','addComment','UniverInstanceType','ThreadCommentModel','_commentService','2678408ItGEwL','@univerjs/core','1239ZwmFWr','resolveComment','content','CommentService','getUser','error','filter','root','disposeWithMe','users','toStringTag','DependentOn','1908070EITljP','replyId','Solve','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','length','UniverThreadCommentDataSourcePlugin','@univerjs-pro/license','UniverLicensePlugin','_init','onStarting','comment','slice','1293723CoMVhE','solved','values','customRanges','getMemberID','rangeId','updateComment','/delete','/list','rangeType','format','Delete','getOwnPropertyDescriptor','subscribe','_threadCommentDataSource','dataSource','22456863UHVUcA','onReady','code','IConfigService','@univerjs-pro/collaboration-client','body','setConfig','ref','HTTPService','pipe','dayjs','unitId','9432384OntXGT','Add','@univerjs/network','defineProperty','Unknown','12MMKvlk','/add','26478lzDjlm','post','bufferTime','_injector','type','userId','Module','getUnit','parse','userID','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','COMMENT','saveCommentToSnapshot','replies','/reply'];_0x3f85=function(){return _0x5a4474;};return _0x3f85();}var H=Object[_0x595a0c(0x116)],J=(_0xd3122f,_0xf06eae,_0x341764,_0x38737d)=>{for(var _0x49cd9e=_0x38737d>0x1?void 0x0:_0x38737d?H(_0xf06eae,_0x341764):_0xf06eae,_0x49825e=_0xd3122f['length']-0x1,_0x33cf08;_0x49825e>=0x0;_0x49825e--)(_0x33cf08=_0xd3122f[_0x49825e])&&(_0x49cd9e=_0x33cf08(_0x49cd9e)||_0x49cd9e);return _0x49cd9e;},y=(_0x19f321,_0x20da55)=>(_0x29f03b,_0x14e8b9)=>_0x20da55(_0x29f03b,_0x14e8b9,_0x19f321);let C=class extends c['Disposable']{constructor(_0x5ce865,_0x549da0){const _0x321708=_0x595a0c;super(),this['_threadCommentDataSourceService']=_0x5ce865,this[_0x321708(0x118)]=_0x549da0,this['_initDataSource']();}['_initDataSource'](){const _0x1211b5=_0x595a0c;this[_0x1211b5(0xe9)][_0x1211b5(0x119)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1211b5(0x13e)]=!0x1;}};C=J([y(0x0,M[_0x595a0c(0xd0)]),y(0x1,c['Inject'](g))],C);function _0x161a(_0x5010c7,_0x371497){const _0x3f855d=_0x3f85();return _0x161a=function(_0x161af4,_0x480b43){_0x161af4=_0x161af4-0xc4;let _0x3ecd10=_0x3f855d[_0x161af4];return _0x3ecd10;},_0x161a(_0x5010c7,_0x371497);}var F=Object['defineProperty'],L=Object[_0x595a0c(0x116)],Z=(_0x564031,_0x21320b,_0x4bbd90)=>_0x21320b in _0x564031?F(_0x564031,_0x21320b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bbd90}):_0x564031[_0x21320b]=_0x4bbd90,W=(_0x22d43d,_0x49b5e2,_0x1f9b44,_0x3187d9)=>{for(var _0x60b34d=_0x3187d9>0x1?void 0x0:_0x3187d9?L(_0x49b5e2,_0x1f9b44):_0x49b5e2,_0x3889ad=_0x22d43d['length']-0x1,_0x20c8c0;_0x3889ad>=0x0;_0x3889ad--)(_0x20c8c0=_0x22d43d[_0x3889ad])&&(_0x60b34d=_0x20c8c0(_0x60b34d)||_0x60b34d);return _0x60b34d;},O=(_0x4ef85c,_0x164965)=>(_0x2cbb2b,_0xd37f97)=>_0x164965(_0x2cbb2b,_0xd37f97,_0x4ef85c),N=(_0xbd9a03,_0x460bd3,_0x1c9120)=>Z(_0xbd9a03,typeof _0x460bd3!=_0x595a0c(0xdf)?_0x460bd3+'':_0x460bd3,_0x1c9120);exports[_0x595a0c(0x103)]=class extends c['Plugin']{constructor(_0x511434=D,_0x4c87fb,_0x49eb47){const _0x42abf2=_0x595a0c;super(),this['_config']=_0x511434,this[_0x42abf2(0x130)]=_0x4c87fb,this[_0x42abf2(0xc6)]=_0x49eb47;const {..._0x3b2889}=c[_0x42abf2(0xdb)]({},D,this['_config']);this['_configService'][_0x42abf2(0x120)](q,_0x3b2889);}[_0x595a0c(0x107)](){const _0x2461b7=_0x595a0c;[[g],[C],[p]][_0x2461b7(0xcf)](_0x47b929=>{const _0x3966b8=_0x2461b7;this['_injector'][_0x3966b8(0xc7)](_0x47b929);});}[_0x595a0c(0x11b)](){const _0x29bccf=_0x595a0c;this[_0x29bccf(0x130)][_0x29bccf(0xff)](C),this['_injector'][_0x29bccf(0xff)](p);}},N(exports[_0x595a0c(0x103)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x595a0c(0x131),c[_0x595a0c(0xeb)][_0x595a0c(0xcd)]),exports[_0x595a0c(0x103)]=W([c[_0x595a0c(0xfb)](j['UniverThreadCommentUIPlugin'],b[_0x595a0c(0x137)],T[_0x595a0c(0x105)]),O(0x1,c[_0x595a0c(0xd4)](c['Injector'])),O(0x2,c[_0x595a0c(0x11d)])],exports[_0x595a0c(0x103)]);
1
+ 'use strict';const _0x555c5b=_0x5252;(function(_0x44e295,_0x44551b){const _0x3f04d2=_0x5252,_0x3c9ee9=_0x44e295();while(!![]){try{const _0x362852=parseInt(_0x3f04d2(0xb4))/0x1+parseInt(_0x3f04d2(0x7a))/0x2*(parseInt(_0x3f04d2(0x97))/0x3)+-parseInt(_0x3f04d2(0xce))/0x4+parseInt(_0x3f04d2(0xdd))/0x5+parseInt(_0x3f04d2(0x98))/0x6*(parseInt(_0x3f04d2(0x7d))/0x7)+-parseInt(_0x3f04d2(0xbf))/0x8+-parseInt(_0x3f04d2(0xac))/0x9;if(_0x362852===_0x44551b)break;else _0x3c9ee9['push'](_0x3c9ee9['shift']());}catch(_0x5a219b){_0x3c9ee9['push'](_0x3c9ee9['shift']());}}}(_0x4ac5,0xc245c));Object[_0x555c5b(0xa6)](exports,Symbol[_0x555c5b(0xcc)],{'value':_0x555c5b(0xef)});const b=require(_0x555c5b(0xad)),T=require(_0x555c5b(0xc4)),c=require(_0x555c5b(0xe5)),j=require(_0x555c5b(0xb9)),M=require('@univerjs/thread-comment'),w=require(_0x555c5b(0xa5)),P=require('@univerjs/network'),U=_0x555c5b(0xd1);var I=(_0x2b5975=>(_0x2b5975[_0x2b5975[_0x555c5b(0xab)]=0x0]=_0x555c5b(0xab),_0x2b5975[_0x2b5975[_0x555c5b(0x8d)]=0x1]='Solved',_0x2b5975[_0x2b5975['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2b5975))(I||{}),v=(_0x456204=>(_0x456204[_0x456204[_0x555c5b(0xb3)]=0x0]=_0x555c5b(0xb3),_0x456204[_0x456204[_0x555c5b(0x91)]=0x1]=_0x555c5b(0x91),_0x456204[_0x456204[_0x555c5b(0x8a)]=0x2]='Reply',_0x456204[_0x456204['Edit']=0x3]='Edit',_0x456204[_0x456204['Delete']=0x4]=_0x555c5b(0xa1),_0x456204[_0x456204[_0x555c5b(0xd3)]=0x5]=_0x555c5b(0xd3),_0x456204[_0x456204[_0x555c5b(0xb5)]=-0x1]=_0x555c5b(0xb5),_0x456204))(v||{});const f=_0x37cf29=>c[_0x555c5b(0xf2)](new Date(+_0x37cf29))[_0x555c5b(0x84)](_0x555c5b(0x9b)),R=async(_0x523034,_0x37a8df)=>{const _0x145969=_0x555c5b,_0x6d51e8=_0x523034[_0x145969(0x81)](c[_0x145969(0x95)]),_0x196d81=_0x523034[_0x145969(0x81)](P[_0x145969(0xc7)]);_0x37a8df[_0x145969(0xaf)](_0x195b48=>{const _0x4446ba=_0x145969;_0x6d51e8[_0x4446ba(0x7f)](_0x195b48)&&_0x37a8df['delete'](_0x195b48);}),_0x37a8df[_0x145969(0xd5)]&&(await _0x196d81[_0x145969(0x81)]('/universer-api/user/list',{'params':{'userIDs':[..._0x37a8df]}}))[_0x145969(0xd8)][_0x145969(0x9f)]['forEach'](_0x7de9a6=>{_0x7de9a6&&_0x6d51e8['addUser'](_0x7de9a6);});};var $=Object[_0x555c5b(0x9a)],E=(_0x56f1e0,_0x32fb71,_0x181d1d,_0x4f14f5)=>{for(var _0x2dd6f2=_0x4f14f5>0x1?void 0x0:_0x4f14f5?$(_0x32fb71,_0x181d1d):_0x32fb71,_0x5164c1=_0x56f1e0['length']-0x1,_0x4e16ec;_0x5164c1>=0x0;_0x5164c1--)(_0x4e16ec=_0x56f1e0[_0x5164c1])&&(_0x2dd6f2=_0x4e16ec(_0x2dd6f2)||_0x2dd6f2);return _0x2dd6f2;},S=(_0x55ff35,_0x445a34)=>(_0x544af7,_0x4d5ac5)=>_0x445a34(_0x544af7,_0x4d5ac5,_0x55ff35);let p=class extends c[_0x555c5b(0xc3)]{constructor(_0x269ba0,_0x27ed9e,_0x227592,_0x2342bd){const _0x2dc359=_0x555c5b;super(),this[_0x2dc359(0xbd)]=_0x269ba0,this['_threadCommentModel']=_0x27ed9e,this[_0x2dc359(0xcb)]=_0x227592,this[_0x2dc359(0xc5)]=_0x2342bd,this['_init'](),this[_0x2dc359(0xd2)]();}['_initUserSync'](){const _0x651b7=_0x555c5b;this[_0x651b7(0xec)](this[_0x651b7(0x8e)][_0x651b7(0x80)][_0x651b7(0xf1)](w['bufferTime'](0x10))[_0x651b7(0x7e)](_0x43f1cf=>{const _0x155044=_0x651b7,_0x4f65d7=new Set();_0x43f1cf[_0x155044(0xaf)](_0x50de7f=>{const _0x2193da=_0x155044;switch(_0x50de7f[_0x2193da(0xc6)]){case _0x2193da(0x89):{const _0x3b892b=_0x50de7f[_0x2193da(0x85)]['personId'];_0x4f65d7[_0x2193da(0x89)](_0x3b892b);break;}}}),R(this[_0x155044(0xc5)],_0x4f65d7);}));}['_init'](){const _0x2e60b8=_0x555c5b;this[_0x2e60b8(0xec)](this[_0x2e60b8(0xbd)][_0x2e60b8(0x80)][_0x2e60b8(0x7e)](async _0x2bb496=>{const _0x6faf41=_0x2e60b8;var _0x406f6a,_0x40486f,_0x105c02,_0x3f4b95;const _0x13c849=(_0x406f6a=this[_0x6faf41(0x8e)][_0x6faf41(0x92)](_0x2bb496[_0x6faf41(0xbe)])[_0x6faf41(0xe4)](_0x4145ec=>_0x4145ec['threadId']===_0x2bb496['threadId']))==null?void 0x0:_0x406f6a['root'];if(!_0x13c849)return;const {unitId:_0x383d08,subUnitId:_0x28d0aa}=_0x13c849;switch(_0x2bb496[_0x6faf41(0xb7)]&&this[_0x6faf41(0xcb)][_0x6faf41(0xb6)](_0x2bb496[_0x6faf41(0xb7)]),_0x2bb496[_0x6faf41(0xc6)]){case v[_0x6faf41(0x91)]:break;case v['Reply']:{this[_0x6faf41(0x8e)][_0x6faf41(0x9e)](_0x383d08,_0x28d0aa,{'unitId':_0x383d08,'subUnitId':_0x28d0aa,'ref':'','id':_0x2bb496[_0x6faf41(0xdf)],'dT':f(+_0x2bb496[_0x6faf41(0xd4)]),'threadId':_0x2bb496[_0x6faf41(0x93)],'personId':(_0x105c02=(_0x40486f=_0x2bb496[_0x6faf41(0xb7)])==null?void 0x0:_0x40486f[_0x6faf41(0xe0)])!=null?_0x105c02:_0x2bb496[_0x6faf41(0xde)],'text':JSON[_0x6faf41(0xb8)](_0x2bb496['content']),'parentId':_0x13c849['id']});break;}case v[_0x6faf41(0xa1)]:{const _0x58f931=this[_0x6faf41(0x8e)][_0x6faf41(0xe3)](_0x383d08,_0x28d0aa,_0x2bb496['replyId']);_0x58f931&&_0x58f931[_0x6faf41(0x8b)]&&this[_0x6faf41(0x8e)][_0x6faf41(0x99)](_0x383d08,_0x28d0aa,_0x2bb496[_0x6faf41(0xdf)]);break;}case v[_0x6faf41(0x82)]:{this[_0x6faf41(0x8e)][_0x6faf41(0xeb)](_0x383d08,_0x28d0aa,{'commentId':_0x2bb496[_0x6faf41(0xdf)],'text':JSON[_0x6faf41(0xb8)](_0x2bb496['content'])});break;}case v['Solve']:{const _0x3991f4=(_0x3f4b95=this[_0x6faf41(0x8e)][_0x6faf41(0x92)](_0x2bb496['unitId'])['find'](_0x5c68cf=>_0x5c68cf[_0x6faf41(0x93)]===_0x2bb496[_0x6faf41(0x93)]))==null?void 0x0:_0x3f4b95['root'];_0x3991f4&&this['_threadCommentModel'][_0x6faf41(0xda)](_0x383d08,_0x28d0aa,_0x3991f4['id'],_0x2bb496['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x555c5b(0x88)](b[_0x555c5b(0xb0)])),S(0x1,c['Inject'](M[_0x555c5b(0xed)])),S(0x2,c[_0x555c5b(0x88)](c[_0x555c5b(0x95)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x555c5b(0xa7),D={};var A=Object[_0x555c5b(0x9a)],x=(_0xa537fa,_0x3f2fbc,_0x329c0c,_0x2d98c4)=>{const _0x2d145f=_0x555c5b;for(var _0x5013c7=_0x2d98c4>0x1?void 0x0:_0x2d98c4?A(_0x3f2fbc,_0x329c0c):_0x3f2fbc,_0x2de043=_0xa537fa[_0x2d145f(0xa8)]-0x1,_0x29e110;_0x2de043>=0x0;_0x2de043--)(_0x29e110=_0xa537fa[_0x2de043])&&(_0x5013c7=_0x29e110(_0x5013c7)||_0x5013c7);return _0x5013c7;},_=(_0x27007c,_0x9757ba)=>(_0x27bd07,_0x4795e1)=>_0x9757ba(_0x27bd07,_0x4795e1,_0x27007c);function _0x4ac5(){const _0x156f26=['Delete','replies','rangeId','syncUpdateMutationToColla','rxjs','defineProperty','thread-comment-data-source.config','length','UniverThreadCommentUIPlugin','/edit','OpenOrReOpen','7181919NlurcR','@univerjs-pro/collaboration-client','post','forEach','CommentService','values','error','Unknown','678094hLiXAF','UNRECOGNIZED','addUser','user','parse','@univerjs/thread-comment-ui','_initDataSource','DependentOn','resolved','_commentService','unitId','2670784HiwAeo','_configService','/universer-api/comment/unit/','_threadCommentDataSourceService','Disposable','@univerjs-pro/license','_injector','type','HTTPService','_config','comments','ref','_userService','toStringTag','/reply','2394036bgkaTi','/delete','IThreadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','Solve','createTimestamp','size','UNIVER_UNKNOWN','rangeType','body','onStarting','resolveComment','pluginName','Injector','6732710AisadX','userId','replyId','userID','_threadCommentDataSource','filter','getComment','find','@univerjs/core','CustomRangeType','solved','_sessionService','saveCommentToSnapshot','reply','updateComment','disposeWithMe','ThreadCommentModel','content','Module','customRanges','pipe','dayjs','UniverLicensePlugin','map','8dHLDav','/add','/list','21wMonda','subscribe','getUser','commentUpdate$','get','Edit','_httpService','format','payload','merge','dataSource','Inject','add','Reply','parentId','getCurrentUser','Solved','_threadCommentModel','stringify','getMemberID','Add','getUnit','threadId','requireSession','UserManagerService','UniverThreadCommentDataSourcePlugin','183669lDSrSs','513120QAmJBu','deleteComment','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','COMMENT','code','addComment','users','UniverCollaborationClientPlugin'];_0x4ac5=function(){return _0x156f26;};return _0x4ac5();}function Y(_0x4c89a9,_0xf66c5f){const _0x26435a=_0x555c5b,_0x41bd40=_0x4c89a9[_0x26435a(0xa2)][0x0];return{..._0xf66c5f,'id':_0x41bd40[_0x26435a(0xdf)],'resolved':_0x4c89a9['solved']===0x1,'dT':f(_0x41bd40[_0x26435a(0xd4)]),'personId':_0x41bd40[_0x26435a(0xde)],'threadId':_0x41bd40['threadId']};}function G(_0x5aea34,_0x40d58d,_0x3e59b8){const _0x2d5394=_0x555c5b;var _0x55e4d8,_0x574fe2;if(((_0x574fe2=(_0x55e4d8=_0x5aea34==null?void 0x0:_0x5aea34[_0x2d5394(0xa2)])==null?void 0x0:_0x55e4d8[_0x2d5394(0xa8)])!=null?_0x574fe2:0x0)>0x0){const _0x1520d4=(_0x32f9f6,_0x277c52)=>({'id':_0x32f9f6['replyId'],'threadId':_0x32f9f6[_0x2d5394(0x93)],'dT':f(_0x32f9f6[_0x2d5394(0xd4)]),'personId':_0x32f9f6[_0x2d5394(0xde)],'resolved':_0x5aea34[_0x2d5394(0xe7)]===I[_0x2d5394(0x8d)],'unitId':_0x40d58d,'subUnitId':_0x3e59b8,'text':JSON[_0x2d5394(0xb8)](_0x32f9f6[_0x2d5394(0xee)]),'parentId':_0x277c52}),_0x4dd415=_0x1520d4(_0x5aea34[_0x2d5394(0xa2)][0x0]);return{..._0x4dd415,'children':_0x5aea34[_0x2d5394(0xa2)]['slice'](0x1)[_0x2d5394(0xf4)](_0x399d51=>_0x1520d4(_0x399d51,_0x4dd415['id']))};}return null;}let g=class{constructor(_0x80c63f,_0x32dab2,_0x55b6f7,_0x54af80){const _0x82a155=_0x555c5b;this['_httpService']=_0x80c63f,this[_0x82a155(0xcb)]=_0x32dab2,this[_0x82a155(0xe8)]=_0x55b6f7,this['_injector']=_0x54af80;}async[_0x555c5b(0x9e)](_0x17a51f){const _0x1af415=_0x555c5b;var _0x308d37,_0x310032;const {parentId:_0x266b8a,unitId:_0x3c2039,text:_0x267096,threadId:_0xc07584}=_0x17a51f,_0x37cf27=(_0x310032=(_0x308d37=_0x267096['customRanges'])==null?void 0x0:_0x308d37[_0x1af415(0xe2)](_0x5beed0=>_0x5beed0['rangeType']===c[_0x1af415(0xe6)][_0x1af415(0x9c)])[_0x1af415(0xf4)](_0x2f43ca=>_0x2f43ca[_0x1af415(0xa3)]))!=null?_0x310032:[],_0x44dabe=JSON['stringify'](_0x267096),_0x57b4eb=(await this[_0x1af415(0xe8)][_0x1af415(0x94)](_0x3c2039))[_0x1af415(0x90)]();if(_0x266b8a){const _0x2a6837={'memberId':_0x57b4eb,'unitId':_0x3c2039,'content':_0x44dabe,'mention':_0x37cf27,'threadId':_0xc07584},_0x521b6d=(await this['_httpService'][_0x1af415(0xae)](_0x1af415(0xc1)+_0x3c2039+_0x1af415(0xcd),{'body':_0x2a6837}))[_0x1af415(0xd8)][_0x1af415(0xea)];return{..._0x17a51f,'id':_0x521b6d[_0x1af415(0xdf)],'dT':c[_0x1af415(0xf2)](+_0x521b6d['createTimestamp'])[_0x1af415(0x84)](_0x1af415(0x9b)),'personId':_0x521b6d[_0x1af415(0xde)]};}else{const _0x2497f0={'memberId':_0x57b4eb,'unitId':_0x3c2039,'content':_0x44dabe,'mention':_0x37cf27},_0x5474ac=await this[_0x1af415(0x83)]['post'](_0x1af415(0xc1)+_0x3c2039+_0x1af415(0x7b),{'body':_0x2497f0});return Y(_0x5474ac[_0x1af415(0xd8)]['comment'],_0x17a51f);}}async[_0x555c5b(0xeb)](_0x57d719){const _0x2abb03=_0x555c5b;var _0xbfadc1,_0x5006ef;const {text:_0x59469a,unitId:_0x2293d9}=_0x57d719,_0x38c494=(_0x5006ef=(_0xbfadc1=_0x59469a[_0x2abb03(0xf0)])==null?void 0x0:_0xbfadc1[_0x2abb03(0xe2)](_0x20e9e9=>_0x20e9e9[_0x2abb03(0xd7)]===c[_0x2abb03(0xe6)][_0x2abb03(0x9c)])[_0x2abb03(0xf4)](_0x508a09=>_0x508a09[_0x2abb03(0xa3)]))!=null?_0x5006ef:[],_0x3ccab2=JSON[_0x2abb03(0x8f)](_0x59469a),_0xd6e00c=_0x57d719['threadId'],_0x32884c=_0x57d719['id'],_0xd25085={'memberId':(await this[_0x2abb03(0xe8)][_0x2abb03(0x94)](_0x2293d9))[_0x2abb03(0x90)](),'unitId':_0x2293d9,'threadId':_0xd6e00c,'mention':_0x38c494,'content':_0x3ccab2,'replyId':_0x32884c},_0x5b60b5=await this[_0x2abb03(0x83)][_0x2abb03(0xae)]('/universer-api/comment/unit/'+_0x2293d9+_0x2abb03(0xaa),{'body':_0xd25085});return!_0x5b60b5[_0x2abb03(0xd8)][_0x2abb03(0xb2)]||_0x5b60b5['body'][_0x2abb03(0xb2)][_0x2abb03(0x9d)]===0x1;}async[_0x555c5b(0xda)](_0x5eb1bb){const _0x3f6817=_0x555c5b,{unitId:_0x3c494a}=_0x5eb1bb,_0x528ac3=_0x5eb1bb['threadId'],_0x11f739={'memberId':this[_0x3f6817(0xcb)][_0x3f6817(0x8c)]()['userID'],'unitId':_0x3c494a,'threadId':_0x528ac3,'solved':_0x5eb1bb[_0x3f6817(0xbc)]?I[_0x3f6817(0x8d)]:I['OpenOrReOpen']},_0x39ddcc=await this['_httpService'][_0x3f6817(0xae)](_0x3f6817(0xc1)+_0x3c494a+'/solved',{'body':_0x11f739});return!_0x39ddcc[_0x3f6817(0xd8)][_0x3f6817(0xb2)]||_0x39ddcc[_0x3f6817(0xd8)]['error'][_0x3f6817(0x9d)]===0x1;}async[_0x555c5b(0x99)](_0x28fa36,_0x2ccb3a,_0xcb1f6d,_0x3a5f97){const _0x185d5f=_0x555c5b,_0x53a82d={'memberId':(await this[_0x185d5f(0xe8)][_0x185d5f(0x94)](_0x28fa36))[_0x185d5f(0x90)](),'threadId':_0xcb1f6d,'replyId':_0x3a5f97,'unitId':_0x28fa36},_0x424b8f=await this['_httpService'][_0x185d5f(0xae)](_0x185d5f(0xc1)+_0x28fa36+_0x185d5f(0xcf),{'body':_0x53a82d});return!_0x424b8f['body'][_0x185d5f(0xb2)]||_0x424b8f[_0x185d5f(0xd8)]['error'][_0x185d5f(0x9d)]===0x1;}async['listComments'](_0x349b29,_0x24d4a8,_0x5cfad7){const _0x2533aa=_0x555c5b,_0xd40e3b={'unitId':_0x349b29,'threadId':_0x5cfad7},_0x81ff4d=await this[_0x2533aa(0x83)][_0x2533aa(0xae)](_0x2533aa(0xc1)+_0x349b29+_0x2533aa(0x7c),{'body':_0xd40e3b}),_0x4ca2ee=_0x5cfad7[_0x2533aa(0xf4)](_0x140da1=>G(_0x81ff4d[_0x2533aa(0xd8)][_0x2533aa(0xc9)][_0x140da1],_0x349b29,_0x24d4a8))['filter'](Boolean);return Object[_0x2533aa(0xb1)](_0x81ff4d['body']['users'])['forEach'](_0x3f30f3=>{const _0x3854a0=_0x2533aa;this['_userService'][_0x3854a0(0xb6)](_0x3f30f3);}),_0x4ca2ee;}[_0x555c5b(0xe9)](_0x3bcbbb){const _0x110b73=_0x555c5b;return{'id':_0x3bcbbb['id'],'threadId':_0x3bcbbb[_0x110b73(0x93)],'ref':_0x3bcbbb[_0x110b73(0xca)]};}};g=x([_(0x0,c[_0x555c5b(0x88)](P[_0x555c5b(0xc7)])),_(0x1,c['Inject'](c[_0x555c5b(0x95)])),_(0x2,c[_0x555c5b(0x88)](b['CollaborationSessionService'])),_(0x3,c[_0x555c5b(0x88)](c['Injector']))],g);function _0x5252(_0x30e5a7,_0x10a73a){const _0x4ac537=_0x4ac5();return _0x5252=function(_0x52520e,_0x48c47f){_0x52520e=_0x52520e-0x7a;let _0x1b9f8e=_0x4ac537[_0x52520e];return _0x1b9f8e;},_0x5252(_0x30e5a7,_0x10a73a);}var H=Object[_0x555c5b(0x9a)],J=(_0x421e4a,_0x5c8cf6,_0x1d0df5,_0x17caf4)=>{const _0x3ecf6e=_0x555c5b;for(var _0x38863f=_0x17caf4>0x1?void 0x0:_0x17caf4?H(_0x5c8cf6,_0x1d0df5):_0x5c8cf6,_0x1e1e7c=_0x421e4a[_0x3ecf6e(0xa8)]-0x1,_0x54dde4;_0x1e1e7c>=0x0;_0x1e1e7c--)(_0x54dde4=_0x421e4a[_0x1e1e7c])&&(_0x38863f=_0x54dde4(_0x38863f)||_0x38863f);return _0x38863f;},y=(_0x2ffbe7,_0x57e9d5)=>(_0x2e8ca6,_0xdd77c5)=>_0x57e9d5(_0x2e8ca6,_0xdd77c5,_0x2ffbe7);let C=class extends c[_0x555c5b(0xc3)]{constructor(_0xf8e212,_0x347a75){const _0x3ed302=_0x555c5b;super(),this[_0x3ed302(0xc2)]=_0xf8e212,this[_0x3ed302(0xe1)]=_0x347a75,this[_0x3ed302(0xba)]();}[_0x555c5b(0xba)](){const _0x4357ea=_0x555c5b;this[_0x4357ea(0xc2)][_0x4357ea(0x87)]=this[_0x4357ea(0xe1)],this[_0x4357ea(0xc2)][_0x4357ea(0xa4)]=!0x1;}};C=J([y(0x0,M[_0x555c5b(0xd0)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x555c5b(0xa6)],L=Object[_0x555c5b(0x9a)],Z=(_0x38f01d,_0x974f44,_0x46af39)=>_0x974f44 in _0x38f01d?F(_0x38f01d,_0x974f44,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x46af39}):_0x38f01d[_0x974f44]=_0x46af39,W=(_0x52920b,_0x3e4f92,_0x482ac6,_0x5e22ed)=>{const _0x55e57f=_0x555c5b;for(var _0x5267bf=_0x5e22ed>0x1?void 0x0:_0x5e22ed?L(_0x3e4f92,_0x482ac6):_0x3e4f92,_0x154caa=_0x52920b[_0x55e57f(0xa8)]-0x1,_0x268210;_0x154caa>=0x0;_0x154caa--)(_0x268210=_0x52920b[_0x154caa])&&(_0x5267bf=_0x268210(_0x5267bf)||_0x5267bf);return _0x5267bf;},O=(_0x5497c8,_0x2e928a)=>(_0x23e290,_0x4a0a63)=>_0x2e928a(_0x23e290,_0x4a0a63,_0x5497c8),N=(_0x22fe5f,_0x429004,_0x6d0d4e)=>Z(_0x22fe5f,typeof _0x429004!='symbol'?_0x429004+'':_0x429004,_0x6d0d4e);exports[_0x555c5b(0x96)]=class extends c['Plugin']{constructor(_0x2553bc=D,_0x12b94a,_0x460f3d){const _0xae9088=_0x555c5b;super(),this[_0xae9088(0xc8)]=_0x2553bc,this[_0xae9088(0xc5)]=_0x12b94a,this['_configService']=_0x460f3d;const {..._0x16e422}=c[_0xae9088(0x86)]({},D,this['_config']);this[_0xae9088(0xc0)]['setConfig'](q,_0x16e422);}[_0x555c5b(0xd9)](){const _0x171b78=_0x555c5b;[[g],[C],[p]][_0x171b78(0xaf)](_0x52f516=>{const _0x3ed179=_0x171b78;this[_0x3ed179(0xc5)][_0x3ed179(0x89)](_0x52f516);});}['onReady'](){const _0x4f654c=_0x555c5b;this[_0x4f654c(0xc5)][_0x4f654c(0x81)](C),this[_0x4f654c(0xc5)][_0x4f654c(0x81)](p);}},N(exports[_0x555c5b(0x96)],_0x555c5b(0xdb),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x555c5b(0xc6),c['UniverInstanceType'][_0x555c5b(0xd6)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x555c5b(0xbb)](j[_0x555c5b(0xa9)],b[_0x555c5b(0xa0)],T[_0x555c5b(0xf3)]),O(0x1,c[_0x555c5b(0x88)](c[_0x555c5b(0xdc)])),O(0x2,c['IConfigService'])],exports[_0x555c5b(0x96)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x46fe98=_0x4cb1;(function(_0x357f21,_0x270380){const _0x52667c=_0x4cb1,_0x322390=_0x357f21();while(!![]){try{const _0x2d52f=-parseInt(_0x52667c(0x10c))/0x1+-parseInt(_0x52667c(0xe2))/0x2*(-parseInt(_0x52667c(0xf0))/0x3)+parseInt(_0x52667c(0x13e))/0x4*(parseInt(_0x52667c(0x131))/0x5)+parseInt(_0x52667c(0x137))/0x6+parseInt(_0x52667c(0x116))/0x7+-parseInt(_0x52667c(0x110))/0x8*(-parseInt(_0x52667c(0x10e))/0x9)+-parseInt(_0x52667c(0xed))/0xa;if(_0x2d52f===_0x270380)break;else _0x322390['push'](_0x322390['shift']());}catch(_0x4b26d3){_0x322390['push'](_0x322390['shift']());}}}(_0x47c6,0x42465));import{CommentService as _0x311f50,CollaborationSessionService as _0x5d4e31,UniverCollaborationClientPlugin as _0x4bccec}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3559a3}from'@univerjs-pro/license';import{dayjs as _0x1fdba,UserManagerService as _0xaee3d1,Inject as _0xd8e16e,Injector as _0x3aac1a,Disposable as _0x9d9fe,CustomRangeType as _0x171c7e,UniverInstanceType as _0x1b0f42,DependentOn as _0xabdba,IConfigService as _0x1ed246,Plugin as _0xc49e69,merge as _0x43fbb8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x103552}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3c9912,IThreadCommentDataSourceService as _0x17ba36}from'@univerjs/thread-comment';import{bufferTime as _0x2bd82e}from'rxjs';import{HTTPService as _0x4c2fd4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4e96f3=>(_0x4e96f3[_0x4e96f3[_0x46fe98(0x13a)]=0x0]=_0x46fe98(0x13a),_0x4e96f3[_0x4e96f3[_0x46fe98(0x11f)]=0x1]=_0x46fe98(0x11f),_0x4e96f3[_0x4e96f3[_0x46fe98(0x12a)]=-0x1]=_0x46fe98(0x12a),_0x4e96f3))(I||{}),v=(_0x583e3c=>(_0x583e3c[_0x583e3c[_0x46fe98(0x112)]=0x0]='Unknown',_0x583e3c[_0x583e3c[_0x46fe98(0x125)]=0x1]=_0x46fe98(0x125),_0x583e3c[_0x583e3c[_0x46fe98(0x143)]=0x2]=_0x46fe98(0x143),_0x583e3c[_0x583e3c[_0x46fe98(0x126)]=0x3]=_0x46fe98(0x126),_0x583e3c[_0x583e3c[_0x46fe98(0x129)]=0x4]=_0x46fe98(0x129),_0x583e3c[_0x583e3c['Solve']=0x5]=_0x46fe98(0x120),_0x583e3c[_0x583e3c[_0x46fe98(0x12a)]=-0x1]='UNRECOGNIZED',_0x583e3c))(v||{});function _0x47c6(){const _0x447cb0=['resolveComment','getUnit','disposeWithMe','dataSource','getComment','_userService','_httpService','getCurrentUser','pipe','234030RfiZYE','unitId','13653yZSMtb','/universer-api/user/list','968pIlcgg','listComments','Unknown','format','UNIVER_UNKNOWN','code','289919ojgJjk','replies','subscribe','length','slice','replyId','_commentService','body','solved','Solved','Solve','add','_injector','post','_configService','Add','Edit','stringify','/edit','Delete','UNRECOGNIZED','type','forEach','_threadCommentDataSourceService','users','rangeType','_initUserSync','35rKMaUX','customRanges','error','user','deleteComment','requireSession','218082vfAmuG','find','symbol','OpenOrReOpen','map','parse','addUser','155720wlZlrX','COMMENT','parentId','comments','payload','Reply','/list','rangeId','/add','126752juHjMU','defineProperty','createTimestamp','/universer-api/comment/unit/','pluginName','saveCommentToSnapshot','getUser','thread-comment-data-source.config','content','threadId','_threadCommentDataSource','2818440TPNBtH','getOwnPropertyDescriptor','values','12qUpRxE','addComment','_init','YYYY/MM/DD\x20HH:mm','userId','size','get','root','filter','userID','resolved','ref','getMemberID','/solved','_config','_sessionService','_threadCommentModel','_initDataSource','/delete'];_0x47c6=function(){return _0x447cb0;};return _0x47c6();}const D=_0x36e3e3=>_0x1fdba(new Date(+_0x36e3e3))[_0x46fe98(0x113)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4ab9bb,_0x47f95c)=>{const _0x52b890=_0x46fe98,_0x49685a=_0x4ab9bb[_0x52b890(0xf6)](_0xaee3d1),_0x7f8df5=_0x4ab9bb[_0x52b890(0xf6)](_0x4c2fd4);_0x47f95c[_0x52b890(0x12c)](_0x5ce717=>{const _0x1ded7b=_0x52b890;_0x49685a[_0x1ded7b(0xe8)](_0x5ce717)&&_0x47f95c['delete'](_0x5ce717);}),_0x47f95c[_0x52b890(0xf5)]&&(await _0x7f8df5[_0x52b890(0xf6)](_0x52b890(0x10f),{'params':{'userIDs':[..._0x47f95c]}}))['body'][_0x52b890(0x12e)][_0x52b890(0x12c)](_0x5f0036=>{const _0x2b7407=_0x52b890;_0x5f0036&&_0x49685a[_0x2b7407(0x13d)](_0x5f0036);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6405,_0x16eaa6,_0x54f1c2,_0x574ec6)=>{const _0x31cf76=_0x46fe98;for(var _0x3f2302=_0x574ec6>0x1?void 0x0:_0x574ec6?K(_0x16eaa6,_0x54f1c2):_0x16eaa6,_0x2e5b41=_0x3c6405[_0x31cf76(0x119)]-0x1,_0x2772b2;_0x2e5b41>=0x0;_0x2e5b41--)(_0x2772b2=_0x3c6405[_0x2e5b41])&&(_0x3f2302=_0x2772b2(_0x3f2302)||_0x3f2302);return _0x3f2302;},p=(_0x3b1918,_0x1d19d7)=>(_0x4a50ee,_0x153dca)=>_0x1d19d7(_0x4a50ee,_0x153dca,_0x3b1918);let S=class extends _0x9d9fe{constructor(_0x23aac8,_0xc128cd,_0x50e8dc,_0x7d5f92){const _0x3c201e=_0x46fe98;super(),this[_0x3c201e(0x11c)]=_0x23aac8,this[_0x3c201e(0x100)]=_0xc128cd,this[_0x3c201e(0x108)]=_0x50e8dc,this[_0x3c201e(0x122)]=_0x7d5f92,this[_0x3c201e(0xf2)](),this['_initUserSync']();}[_0x46fe98(0x130)](){const _0x444efa=_0x46fe98;this['disposeWithMe'](this[_0x444efa(0x100)]['commentUpdate$'][_0x444efa(0x10b)](_0x2bd82e(0x10))['subscribe'](_0x2647b4=>{const _0x1dba5a=_0x444efa,_0x1f35a9=new Set();_0x2647b4['forEach'](_0xecb118=>{const _0x39e4cb=_0x4cb1;switch(_0xecb118[_0x39e4cb(0x12b)]){case'add':{const _0x1a017d=_0xecb118[_0x39e4cb(0x142)]['personId'];_0x1f35a9['add'](_0x1a017d);break;}}}),B(this[_0x1dba5a(0x122)],_0x1f35a9);}));}[_0x46fe98(0xf2)](){const _0x2fb4e7=_0x46fe98;this[_0x2fb4e7(0x105)](this['_commentService']['commentUpdate$'][_0x2fb4e7(0x118)](async _0x148654=>{const _0xe8b06e=_0x2fb4e7;var _0x203a53,_0x4a6ae7,_0x5d802c,_0x18a1ca;const _0x3addc0=(_0x203a53=this[_0xe8b06e(0x100)][_0xe8b06e(0x104)](_0x148654['unitId'])[_0xe8b06e(0x138)](_0x269394=>_0x269394['threadId']===_0x148654['threadId']))==null?void 0x0:_0x203a53[_0xe8b06e(0xf7)];if(!_0x3addc0)return;const {unitId:_0x4895e8,subUnitId:_0x29a1a9}=_0x3addc0;switch(_0x148654[_0xe8b06e(0x134)]&&this[_0xe8b06e(0x108)][_0xe8b06e(0x13d)](_0x148654['user']),_0x148654['type']){case v[_0xe8b06e(0x125)]:break;case v[_0xe8b06e(0x143)]:{this[_0xe8b06e(0x100)][_0xe8b06e(0xf1)](_0x4895e8,_0x29a1a9,{'unitId':_0x4895e8,'subUnitId':_0x29a1a9,'ref':'','id':_0x148654[_0xe8b06e(0x11b)],'dT':D(+_0x148654[_0xe8b06e(0xe4)]),'threadId':_0x148654[_0xe8b06e(0xeb)],'personId':(_0x5d802c=(_0x4a6ae7=_0x148654[_0xe8b06e(0x134)])==null?void 0x0:_0x4a6ae7[_0xe8b06e(0xf9)])!=null?_0x5d802c:_0x148654['userId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654['content']),'parentId':_0x3addc0['id']});break;}case v[_0xe8b06e(0x129)]:{const _0xe32ca3=this[_0xe8b06e(0x100)][_0xe8b06e(0x107)](_0x4895e8,_0x29a1a9,_0x148654[_0xe8b06e(0x11b)]);_0xe32ca3&&_0xe32ca3[_0xe8b06e(0x140)]&&this[_0xe8b06e(0x100)][_0xe8b06e(0x135)](_0x4895e8,_0x29a1a9,_0x148654['replyId']);break;}case v[_0xe8b06e(0x126)]:{this['_threadCommentModel']['updateComment'](_0x4895e8,_0x29a1a9,{'commentId':_0x148654['replyId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654[_0xe8b06e(0xea)])});break;}case v[_0xe8b06e(0x120)]:{const _0x1e2ead=(_0x18a1ca=this['_threadCommentModel'][_0xe8b06e(0x104)](_0x148654[_0xe8b06e(0x10d)])[_0xe8b06e(0x138)](_0x219fd7=>_0x219fd7['threadId']===_0x148654[_0xe8b06e(0xeb)]))==null?void 0x0:_0x18a1ca[_0xe8b06e(0xf7)];_0x1e2ead&&this['_threadCommentModel'][_0xe8b06e(0x103)](_0x4895e8,_0x29a1a9,_0x1e2ead['id'],_0x148654[_0xe8b06e(0x11e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xd8e16e(_0x311f50)),p(0x1,_0xd8e16e(_0x3c9912)),p(0x2,_0xd8e16e(_0xaee3d1)),p(0x3,_0xd8e16e(_0x3aac1a))],S);const z=_0x46fe98(0xe9),M={};var k=Object[_0x46fe98(0xee)],Q=(_0x35c5f8,_0x3a57e9,_0x200d12,_0x2a244c)=>{const _0x13e813=_0x46fe98;for(var _0x2cd71c=_0x2a244c>0x1?void 0x0:_0x2a244c?k(_0x3a57e9,_0x200d12):_0x3a57e9,_0x91739d=_0x35c5f8[_0x13e813(0x119)]-0x1,_0x5dc5b2;_0x91739d>=0x0;_0x91739d--)(_0x5dc5b2=_0x35c5f8[_0x91739d])&&(_0x2cd71c=_0x5dc5b2(_0x2cd71c)||_0x2cd71c);return _0x2cd71c;},_=(_0x15a250,_0x364c8a)=>(_0x2b677c,_0x1853c5)=>_0x364c8a(_0x2b677c,_0x1853c5,_0x15a250);function X(_0x100bed,_0x5e7b4c){const _0x258a3a=_0x46fe98,_0x200c0d=_0x100bed[_0x258a3a(0x117)][0x0];return{..._0x5e7b4c,'id':_0x200c0d['replyId'],'resolved':_0x100bed[_0x258a3a(0x11e)]===0x1,'dT':D(_0x200c0d[_0x258a3a(0xe4)]),'personId':_0x200c0d[_0x258a3a(0xf4)],'threadId':_0x200c0d[_0x258a3a(0xeb)]};}function ee(_0x1294b8,_0x17f30d,_0x22e191){const _0x14496f=_0x46fe98;var _0x2724ff,_0x5dfaf6;if(((_0x5dfaf6=(_0x2724ff=_0x1294b8==null?void 0x0:_0x1294b8[_0x14496f(0x117)])==null?void 0x0:_0x2724ff[_0x14496f(0x119)])!=null?_0x5dfaf6:0x0)>0x0){const _0xc7b2f4=(_0x3daaf9,_0x1342fb)=>({'id':_0x3daaf9[_0x14496f(0x11b)],'threadId':_0x3daaf9['threadId'],'dT':D(_0x3daaf9[_0x14496f(0xe4)]),'personId':_0x3daaf9[_0x14496f(0xf4)],'resolved':_0x1294b8[_0x14496f(0x11e)]===I[_0x14496f(0x11f)],'unitId':_0x17f30d,'subUnitId':_0x22e191,'text':JSON[_0x14496f(0x13c)](_0x3daaf9[_0x14496f(0xea)]),'parentId':_0x1342fb}),_0x8b6588=_0xc7b2f4(_0x1294b8[_0x14496f(0x117)][0x0]);return{..._0x8b6588,'children':_0x1294b8[_0x14496f(0x117)][_0x14496f(0x11a)](0x1)[_0x14496f(0x13b)](_0x4c6fbb=>_0xc7b2f4(_0x4c6fbb,_0x8b6588['id']))};}return null;}let f=class{constructor(_0x41a115,_0x231dec,_0x822be7,_0x4a6944){const _0x374086=_0x46fe98;this[_0x374086(0x109)]=_0x41a115,this[_0x374086(0x108)]=_0x231dec,this['_sessionService']=_0x822be7,this[_0x374086(0x122)]=_0x4a6944;}async[_0x46fe98(0xf1)](_0x200f76){const _0x320134=_0x46fe98;var _0x3f6f6c,_0x53a20c;const {parentId:_0x1152dc,unitId:_0x5c977c,text:_0x19d189,threadId:_0x7f14a2}=_0x200f76,_0x4a7c12=(_0x53a20c=(_0x3f6f6c=_0x19d189[_0x320134(0x132)])==null?void 0x0:_0x3f6f6c['filter'](_0x4ca4eb=>_0x4ca4eb['rangeType']===_0x171c7e[_0x320134(0x13f)])[_0x320134(0x13b)](_0x4f72a1=>_0x4f72a1['rangeId']))!=null?_0x53a20c:[],_0x22529e=JSON[_0x320134(0x127)](_0x19d189),_0x29dedd=(await this[_0x320134(0xff)][_0x320134(0x136)](_0x5c977c))['getMemberID']();if(_0x1152dc){const _0x3da1c1={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12,'threadId':_0x7f14a2},_0x46a3c0=(await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+'/reply',{'body':_0x3da1c1}))['body']['reply'];return{..._0x200f76,'id':_0x46a3c0['replyId'],'dT':_0x1fdba(+_0x46a3c0[_0x320134(0xe4)])[_0x320134(0x113)](_0x320134(0xf3)),'personId':_0x46a3c0[_0x320134(0xf4)]};}else{const _0xfa9222={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12},_0x47edc7=await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+_0x320134(0xe1),{'body':_0xfa9222});return X(_0x47edc7[_0x320134(0x11d)]['comment'],_0x200f76);}}async['updateComment'](_0x3c2326){const _0x3e9407=_0x46fe98;var _0x5e47cf,_0x5d912d;const {text:_0x34c933,unitId:_0x51150b}=_0x3c2326,_0x24d314=(_0x5d912d=(_0x5e47cf=_0x34c933[_0x3e9407(0x132)])==null?void 0x0:_0x5e47cf[_0x3e9407(0xf8)](_0x399329=>_0x399329[_0x3e9407(0x12f)]===_0x171c7e['COMMENT'])['map'](_0x46297f=>_0x46297f[_0x3e9407(0xe0)]))!=null?_0x5d912d:[],_0x13bcf9=JSON[_0x3e9407(0x127)](_0x34c933),_0x3897df=_0x3c2326[_0x3e9407(0xeb)],_0x3346ad=_0x3c2326['id'],_0x2f5e51={'memberId':(await this[_0x3e9407(0xff)][_0x3e9407(0x136)](_0x51150b))[_0x3e9407(0xfc)](),'unitId':_0x51150b,'threadId':_0x3897df,'mention':_0x24d314,'content':_0x13bcf9,'replyId':_0x3346ad},_0x126655=await this[_0x3e9407(0x109)][_0x3e9407(0x123)](_0x3e9407(0xe5)+_0x51150b+_0x3e9407(0x128),{'body':_0x2f5e51});return!_0x126655[_0x3e9407(0x11d)][_0x3e9407(0x133)]||_0x126655[_0x3e9407(0x11d)]['error'][_0x3e9407(0x115)]===0x1;}async[_0x46fe98(0x103)](_0x154d22){const _0x47a74f=_0x46fe98,{unitId:_0x546e51}=_0x154d22,_0x510d2e=_0x154d22[_0x47a74f(0xeb)],_0x47e6fa={'memberId':this[_0x47a74f(0x108)][_0x47a74f(0x10a)]()['userID'],'unitId':_0x546e51,'threadId':_0x510d2e,'solved':_0x154d22[_0x47a74f(0xfa)]?I['Solved']:I[_0x47a74f(0x13a)]},_0x337b82=await this['_httpService']['post'](_0x47a74f(0xe5)+_0x546e51+_0x47a74f(0xfd),{'body':_0x47e6fa});return!_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)]||_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)][_0x47a74f(0x115)]===0x1;}async[_0x46fe98(0x135)](_0x504c5e,_0x1ee61c,_0x3a8e25,_0x17c933){const _0x23e8c7=_0x46fe98,_0x4189f6={'memberId':(await this[_0x23e8c7(0xff)]['requireSession'](_0x504c5e))[_0x23e8c7(0xfc)](),'threadId':_0x3a8e25,'replyId':_0x17c933,'unitId':_0x504c5e},_0x4e5a98=await this[_0x23e8c7(0x109)]['post'](_0x23e8c7(0xe5)+_0x504c5e+_0x23e8c7(0x102),{'body':_0x4189f6});return!_0x4e5a98[_0x23e8c7(0x11d)]['error']||_0x4e5a98[_0x23e8c7(0x11d)][_0x23e8c7(0x133)][_0x23e8c7(0x115)]===0x1;}async[_0x46fe98(0x111)](_0x1b9800,_0x466478,_0x5d6b8a){const _0x2dd30d=_0x46fe98,_0x26016f={'unitId':_0x1b9800,'threadId':_0x5d6b8a},_0x466d09=await this[_0x2dd30d(0x109)][_0x2dd30d(0x123)](_0x2dd30d(0xe5)+_0x1b9800+_0x2dd30d(0xdf),{'body':_0x26016f}),_0x134da4=_0x5d6b8a[_0x2dd30d(0x13b)](_0x4d2875=>ee(_0x466d09['body'][_0x2dd30d(0x141)][_0x4d2875],_0x1b9800,_0x466478))['filter'](Boolean);return Object[_0x2dd30d(0xef)](_0x466d09[_0x2dd30d(0x11d)][_0x2dd30d(0x12e)])[_0x2dd30d(0x12c)](_0x5b62b9=>{const _0x57050f=_0x2dd30d;this[_0x57050f(0x108)][_0x57050f(0x13d)](_0x5b62b9);}),_0x134da4;}[_0x46fe98(0xe7)](_0x3b41f5){const _0x55e0bb=_0x46fe98;return{'id':_0x3b41f5['id'],'threadId':_0x3b41f5[_0x55e0bb(0xeb)],'ref':_0x3b41f5[_0x55e0bb(0xfb)]};}};f=Q([_(0x0,_0xd8e16e(_0x4c2fd4)),_(0x1,_0xd8e16e(_0xaee3d1)),_(0x2,_0xd8e16e(_0x5d4e31)),_(0x3,_0xd8e16e(_0x3aac1a))],f);var re=Object[_0x46fe98(0xee)],te=(_0x3863f7,_0x521605,_0x1b020c,_0x2dbbe6)=>{for(var _0x120497=_0x2dbbe6>0x1?void 0x0:_0x2dbbe6?re(_0x521605,_0x1b020c):_0x521605,_0x491e0b=_0x3863f7['length']-0x1,_0x56d87e;_0x491e0b>=0x0;_0x491e0b--)(_0x56d87e=_0x3863f7[_0x491e0b])&&(_0x120497=_0x56d87e(_0x120497)||_0x120497);return _0x120497;},N=(_0x1d8111,_0x2d5fc7)=>(_0x59baea,_0x3eebce)=>_0x2d5fc7(_0x59baea,_0x3eebce,_0x1d8111);let g=class extends _0x9d9fe{constructor(_0x8443da,_0x2f77ba){const _0x5a09d8=_0x46fe98;super(),this[_0x5a09d8(0x12d)]=_0x8443da,this[_0x5a09d8(0xec)]=_0x2f77ba,this['_initDataSource']();}[_0x46fe98(0x101)](){const _0x34815b=_0x46fe98;this[_0x34815b(0x12d)][_0x34815b(0x106)]=this[_0x34815b(0xec)],this[_0x34815b(0x12d)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x17ba36),N(0x1,_0xd8e16e(f))],g);var se=Object[_0x46fe98(0xe3)],oe=Object[_0x46fe98(0xee)],ne=(_0x206055,_0x354e4f,_0x407df9)=>_0x354e4f in _0x206055?se(_0x206055,_0x354e4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x407df9}):_0x206055[_0x354e4f]=_0x407df9,ie=(_0x11f50c,_0x27a989,_0x50c592,_0x26db1a)=>{const _0x2c3741=_0x46fe98;for(var _0x386595=_0x26db1a>0x1?void 0x0:_0x26db1a?oe(_0x27a989,_0x50c592):_0x27a989,_0x3e937b=_0x11f50c[_0x2c3741(0x119)]-0x1,_0x55d301;_0x3e937b>=0x0;_0x3e937b--)(_0x55d301=_0x11f50c[_0x3e937b])&&(_0x386595=_0x55d301(_0x386595)||_0x386595);return _0x386595;},w=(_0x2e1901,_0x28cc7a)=>(_0x3886bf,_0x366f3c)=>_0x28cc7a(_0x3886bf,_0x366f3c,_0x2e1901),$=(_0x917cf9,_0xfc6050,_0x5d0dac)=>ne(_0x917cf9,typeof _0xfc6050!=_0x46fe98(0x139)?_0xfc6050+'':_0xfc6050,_0x5d0dac);let b=class extends _0xc49e69{constructor(_0x57c025=M,_0x413220,_0x42ade3){const _0x20c96c=_0x46fe98;super(),this[_0x20c96c(0xfe)]=_0x57c025,this[_0x20c96c(0x122)]=_0x413220,this[_0x20c96c(0x124)]=_0x42ade3;const {..._0xdf3333}=_0x43fbb8({},M,this[_0x20c96c(0xfe)]);this[_0x20c96c(0x124)]['setConfig'](z,_0xdf3333);}['onStarting'](){const _0x11cbf9=_0x46fe98;[[f],[g],[S]][_0x11cbf9(0x12c)](_0x3727e7=>{const _0x2d8d87=_0x11cbf9;this[_0x2d8d87(0x122)][_0x2d8d87(0x121)](_0x3727e7);});}['onReady'](){const _0x2eb999=_0x46fe98;this['_injector']['get'](g),this[_0x2eb999(0x122)][_0x2eb999(0xf6)](S);}};function _0x4cb1(_0x2dc4f4,_0x176f4a){const _0x47c65d=_0x47c6();return _0x4cb1=function(_0x4cb114,_0x322d4a){_0x4cb114=_0x4cb114-0xdf;let _0x3d046b=_0x47c65d[_0x4cb114];return _0x3d046b;},_0x4cb1(_0x2dc4f4,_0x176f4a);}$(b,_0x46fe98(0xe6),W),$(b,_0x46fe98(0x12b),_0x1b0f42[_0x46fe98(0x114)]),b=ie([_0xabdba(_0x103552,_0x4bccec,_0x3559a3),w(0x1,_0xd8e16e(_0x3aac1a)),w(0x2,_0x1ed246)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2ca0df=_0x4078;(function(_0xd64bf9,_0x45fd6e){const _0x10951c=_0x4078,_0x3302d8=_0xd64bf9();while(!![]){try{const _0x1dfab5=-parseInt(_0x10951c(0x1e6))/0x1+parseInt(_0x10951c(0x1e8))/0x2+parseInt(_0x10951c(0x21a))/0x3+parseInt(_0x10951c(0x244))/0x4+parseInt(_0x10951c(0x228))/0x5*(parseInt(_0x10951c(0x20e))/0x6)+-parseInt(_0x10951c(0x20f))/0x7*(parseInt(_0x10951c(0x222))/0x8)+parseInt(_0x10951c(0x211))/0x9*(-parseInt(_0x10951c(0x1fc))/0xa);if(_0x1dfab5===_0x45fd6e)break;else _0x3302d8['push'](_0x3302d8['shift']());}catch(_0x5e3c1b){_0x3302d8['push'](_0x3302d8['shift']());}}}(_0x3626,0x8fad5));import{CommentService as _0x27fb10,CollaborationSessionService as _0x4cc2ec,UniverCollaborationClientPlugin as _0x2bfc00}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x281db2}from'@univerjs-pro/license';import{dayjs as _0x4b0deb,UserManagerService as _0x28e75c,Inject as _0x135ecc,Injector as _0x2d6f6e,Disposable as _0x171224,CustomRangeType as _0x18d054,UniverInstanceType as _0x1069d1,DependentOn as _0x44b7a4,IConfigService as _0x589df9,Plugin as _0x53c000,merge as _0x2cfc39}from'@univerjs/core';function _0x4078(_0xcccc8d,_0x1463aa){const _0x362691=_0x3626();return _0x4078=function(_0x4078c8,_0xd0f714){_0x4078c8=_0x4078c8-0x1e5;let _0x599fa5=_0x362691[_0x4078c8];return _0x599fa5;},_0x4078(_0xcccc8d,_0x1463aa);}import{UniverThreadCommentUIPlugin as _0x3f5888}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xb7ab87,IThreadCommentDataSourceService as _0x1962e6}from'@univerjs/thread-comment';import{bufferTime as _0x24fbd2}from'rxjs';import{HTTPService as _0x4440cb}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x161796=>(_0x161796[_0x161796[_0x2ca0df(0x21c)]=0x0]=_0x2ca0df(0x21c),_0x161796[_0x161796[_0x2ca0df(0x210)]=0x1]=_0x2ca0df(0x210),_0x161796[_0x161796[_0x2ca0df(0x231)]=-0x1]=_0x2ca0df(0x231),_0x161796))(I||{}),v=(_0x32a54c=>(_0x32a54c[_0x32a54c[_0x2ca0df(0x23c)]=0x0]=_0x2ca0df(0x23c),_0x32a54c[_0x32a54c['Add']=0x1]=_0x2ca0df(0x1f2),_0x32a54c[_0x32a54c['Reply']=0x2]=_0x2ca0df(0x201),_0x32a54c[_0x32a54c[_0x2ca0df(0x1ef)]=0x3]=_0x2ca0df(0x1ef),_0x32a54c[_0x32a54c[_0x2ca0df(0x22a)]=0x4]=_0x2ca0df(0x22a),_0x32a54c[_0x32a54c[_0x2ca0df(0x21f)]=0x5]='Solve',_0x32a54c[_0x32a54c['UNRECOGNIZED']=-0x1]=_0x2ca0df(0x231),_0x32a54c))(v||{});const D=_0x2348ab=>_0x4b0deb(new Date(+_0x2348ab))[_0x2ca0df(0x212)](_0x2ca0df(0x20a)),B=async(_0x507bba,_0x22201c)=>{const _0x430dcb=_0x2ca0df,_0xd0c2f5=_0x507bba[_0x430dcb(0x215)](_0x28e75c),_0x5cd4e7=_0x507bba['get'](_0x4440cb);_0x22201c['forEach'](_0x128ceb=>{const _0x2734cb=_0x430dcb;_0xd0c2f5[_0x2734cb(0x239)](_0x128ceb)&&_0x22201c[_0x2734cb(0x206)](_0x128ceb);}),_0x22201c[_0x430dcb(0x225)]&&(await _0x5cd4e7[_0x430dcb(0x215)](_0x430dcb(0x20c),{'params':{'userIDs':[..._0x22201c]}}))[_0x430dcb(0x223)][_0x430dcb(0x1e7)][_0x430dcb(0x226)](_0x5514b5=>{const _0x1294da=_0x430dcb;_0x5514b5&&_0xd0c2f5[_0x1294da(0x240)](_0x5514b5);});};var K=Object[_0x2ca0df(0x232)],V=(_0x9401e1,_0x43f833,_0xf1fe62,_0x46ba41)=>{const _0x1d12df=_0x2ca0df;for(var _0xdf899a=_0x46ba41>0x1?void 0x0:_0x46ba41?K(_0x43f833,_0xf1fe62):_0x43f833,_0x47b353=_0x9401e1[_0x1d12df(0x214)]-0x1,_0x40160b;_0x47b353>=0x0;_0x47b353--)(_0x40160b=_0x9401e1[_0x47b353])&&(_0xdf899a=_0x40160b(_0xdf899a)||_0xdf899a);return _0xdf899a;},p=(_0x416d97,_0x2d0f76)=>(_0x3f2d69,_0x4b21e6)=>_0x2d0f76(_0x3f2d69,_0x4b21e6,_0x416d97);let S=class extends _0x171224{constructor(_0x1b8bde,_0x4db9fd,_0x51aa4c,_0x33ae3c){const _0x52e38f=_0x2ca0df;super(),this['_commentService']=_0x1b8bde,this[_0x52e38f(0x1f8)]=_0x4db9fd,this[_0x52e38f(0x21d)]=_0x51aa4c,this[_0x52e38f(0x1ec)]=_0x33ae3c,this[_0x52e38f(0x1f1)](),this[_0x52e38f(0x219)]();}[_0x2ca0df(0x219)](){const _0x25f0b8=_0x2ca0df;this[_0x25f0b8(0x1fa)](this[_0x25f0b8(0x1f8)][_0x25f0b8(0x22d)][_0x25f0b8(0x1ff)](_0x24fbd2(0x10))[_0x25f0b8(0x217)](_0x4126dd=>{const _0xc7d295=_0x25f0b8,_0x5b43c3=new Set();_0x4126dd[_0xc7d295(0x226)](_0x8a49a1=>{const _0x32e6a0=_0xc7d295;switch(_0x8a49a1[_0x32e6a0(0x22f)]){case _0x32e6a0(0x242):{const _0x2d7ced=_0x8a49a1[_0x32e6a0(0x230)]['personId'];_0x5b43c3[_0x32e6a0(0x242)](_0x2d7ced);break;}}}),B(this[_0xc7d295(0x1ec)],_0x5b43c3);}));}[_0x2ca0df(0x1f1)](){const _0x19e92c=_0x2ca0df;this[_0x19e92c(0x1fa)](this['_commentService'][_0x19e92c(0x22d)][_0x19e92c(0x217)](async _0x10d708=>{const _0x4f124a=_0x19e92c;var _0x1cdeec,_0x5c3d22,_0x3534fe,_0x3fa3e0;const _0xa7c942=(_0x1cdeec=this[_0x4f124a(0x1f8)]['getUnit'](_0x10d708[_0x4f124a(0x202)])[_0x4f124a(0x1f0)](_0x37c42a=>_0x37c42a[_0x4f124a(0x235)]===_0x10d708[_0x4f124a(0x235)]))==null?void 0x0:_0x1cdeec[_0x4f124a(0x221)];if(!_0xa7c942)return;const {unitId:_0x2b9112,subUnitId:_0xcb7a82}=_0xa7c942;switch(_0x10d708[_0x4f124a(0x237)]&&this[_0x4f124a(0x21d)][_0x4f124a(0x240)](_0x10d708[_0x4f124a(0x237)]),_0x10d708[_0x4f124a(0x22f)]){case v['Add']:break;case v['Reply']:{this[_0x4f124a(0x1f8)][_0x4f124a(0x1f5)](_0x2b9112,_0xcb7a82,{'unitId':_0x2b9112,'subUnitId':_0xcb7a82,'ref':'','id':_0x10d708[_0x4f124a(0x207)],'dT':D(+_0x10d708['createTimestamp']),'threadId':_0x10d708[_0x4f124a(0x235)],'personId':(_0x3534fe=(_0x5c3d22=_0x10d708['user'])==null?void 0x0:_0x5c3d22[_0x4f124a(0x234)])!=null?_0x3534fe:_0x10d708[_0x4f124a(0x236)],'text':JSON[_0x4f124a(0x216)](_0x10d708[_0x4f124a(0x218)]),'parentId':_0xa7c942['id']});break;}case v[_0x4f124a(0x22a)]:{const _0x121fcb=this['_threadCommentModel']['getComment'](_0x2b9112,_0xcb7a82,_0x10d708[_0x4f124a(0x207)]);_0x121fcb&&_0x121fcb[_0x4f124a(0x229)]&&this[_0x4f124a(0x1f8)][_0x4f124a(0x227)](_0x2b9112,_0xcb7a82,_0x10d708[_0x4f124a(0x207)]);break;}case v[_0x4f124a(0x1ef)]:{this[_0x4f124a(0x1f8)]['updateComment'](_0x2b9112,_0xcb7a82,{'commentId':_0x10d708[_0x4f124a(0x207)],'text':JSON[_0x4f124a(0x216)](_0x10d708[_0x4f124a(0x218)])});break;}case v[_0x4f124a(0x21f)]:{const _0x5a1420=(_0x3fa3e0=this[_0x4f124a(0x1f8)][_0x4f124a(0x1fb)](_0x10d708['unitId'])['find'](_0x37c4ed=>_0x37c4ed[_0x4f124a(0x235)]===_0x10d708['threadId']))==null?void 0x0:_0x3fa3e0[_0x4f124a(0x221)];_0x5a1420&&this[_0x4f124a(0x1f8)][_0x4f124a(0x22c)](_0x2b9112,_0xcb7a82,_0x5a1420['id'],_0x10d708[_0x4f124a(0x1fe)]===I[_0x4f124a(0x210)]);break;}}}));}};S=V([p(0x0,_0x135ecc(_0x27fb10)),p(0x1,_0x135ecc(_0xb7ab87)),p(0x2,_0x135ecc(_0x28e75c)),p(0x3,_0x135ecc(_0x2d6f6e))],S);const z=_0x2ca0df(0x1f6),M={};function _0x3626(){const _0x38a794=['thread-comment-data-source.config','post','_threadCommentModel','getCurrentUser','disposeWithMe','getUnit','2810xMDzur','_config','solved','pipe','customRanges','Reply','unitId','_configService','replies','_threadCommentDataSourceService','delete','replyId','pluginName','filter','YYYY/MM/DD\x20HH:mm','error','/universer-api/user/list','/universer-api/comment/unit/','3766782kywRIY','7qjfTNf','Solved','18729LzxvaV','format','/add','length','get','parse','subscribe','content','_initUserSync','1263609XSfELH','values','OpenOrReOpen','_userService','onReady','Solve','_httpService','root','4296856yUIYGz','body','rangeType','size','forEach','deleteComment','5gXPkjr','parentId','Delete','UNIVER_UNKNOWN','resolveComment','commentUpdate$','_sessionService','type','payload','UNRECOGNIZED','getOwnPropertyDescriptor','requireSession','userID','threadId','userId','user','setConfig','getUser','createTimestamp','code','Unknown','stringify','defineProperty','saveCommentToSnapshot','addUser','updateComment','add','getMemberID','3428052MCabNI','reply','570968AvogMk','users','750648TFTkbP','_initDataSource','syncUpdateMutationToColla','COMMENT','_injector','map','resolved','Edit','find','_init','Add','rangeId','/delete','addComment'];_0x3626=function(){return _0x38a794;};return _0x3626();}var k=Object[_0x2ca0df(0x232)],Q=(_0x5960d8,_0x4e43bb,_0x29605e,_0x29375b)=>{const _0x4117c2=_0x2ca0df;for(var _0x3ce972=_0x29375b>0x1?void 0x0:_0x29375b?k(_0x4e43bb,_0x29605e):_0x4e43bb,_0x3ef1c0=_0x5960d8[_0x4117c2(0x214)]-0x1,_0x273c5c;_0x3ef1c0>=0x0;_0x3ef1c0--)(_0x273c5c=_0x5960d8[_0x3ef1c0])&&(_0x3ce972=_0x273c5c(_0x3ce972)||_0x3ce972);return _0x3ce972;},_=(_0x4c32b2,_0x125fe5)=>(_0x5940b8,_0x31b947)=>_0x125fe5(_0x5940b8,_0x31b947,_0x4c32b2);function X(_0x12cd15,_0x5c77fe){const _0x106c1b=_0x2ca0df,_0x5d8ac6=_0x12cd15[_0x106c1b(0x204)][0x0];return{..._0x5c77fe,'id':_0x5d8ac6[_0x106c1b(0x207)],'resolved':_0x12cd15[_0x106c1b(0x1fe)]===0x1,'dT':D(_0x5d8ac6['createTimestamp']),'personId':_0x5d8ac6[_0x106c1b(0x236)],'threadId':_0x5d8ac6[_0x106c1b(0x235)]};}function ee(_0x4f6e86,_0x3a0cb4,_0x1e878b){const _0x23402c=_0x2ca0df;var _0x5bc926,_0x6e769e;if(((_0x6e769e=(_0x5bc926=_0x4f6e86==null?void 0x0:_0x4f6e86[_0x23402c(0x204)])==null?void 0x0:_0x5bc926[_0x23402c(0x214)])!=null?_0x6e769e:0x0)>0x0){const _0x499f92=(_0x47121c,_0x5d8ee5)=>({'id':_0x47121c[_0x23402c(0x207)],'threadId':_0x47121c[_0x23402c(0x235)],'dT':D(_0x47121c[_0x23402c(0x23a)]),'personId':_0x47121c['userId'],'resolved':_0x4f6e86[_0x23402c(0x1fe)]===I['Solved'],'unitId':_0x3a0cb4,'subUnitId':_0x1e878b,'text':JSON[_0x23402c(0x216)](_0x47121c[_0x23402c(0x218)]),'parentId':_0x5d8ee5}),_0x5a4094=_0x499f92(_0x4f6e86[_0x23402c(0x204)][0x0]);return{..._0x5a4094,'children':_0x4f6e86['replies']['slice'](0x1)[_0x23402c(0x1ed)](_0x57a9d7=>_0x499f92(_0x57a9d7,_0x5a4094['id']))};}return null;}let f=class{constructor(_0x333c9d,_0x1bce82,_0x253d97,_0xf9b858){const _0x1c4afd=_0x2ca0df;this[_0x1c4afd(0x220)]=_0x333c9d,this[_0x1c4afd(0x21d)]=_0x1bce82,this['_sessionService']=_0x253d97,this[_0x1c4afd(0x1ec)]=_0xf9b858;}async[_0x2ca0df(0x1f5)](_0x4df603){const _0x451586=_0x2ca0df;var _0x4be6c5,_0x2ad5b4;const {parentId:_0x4271e5,unitId:_0x4d0fe6,text:_0x5ee266,threadId:_0x99cb38}=_0x4df603,_0x391dd6=(_0x2ad5b4=(_0x4be6c5=_0x5ee266[_0x451586(0x200)])==null?void 0x0:_0x4be6c5[_0x451586(0x209)](_0xd70dab=>_0xd70dab['rangeType']===_0x18d054[_0x451586(0x1eb)])[_0x451586(0x1ed)](_0x4f5a23=>_0x4f5a23[_0x451586(0x1f3)]))!=null?_0x2ad5b4:[],_0x3e83d6=JSON[_0x451586(0x23d)](_0x5ee266),_0xd30cd0=(await this[_0x451586(0x22e)][_0x451586(0x233)](_0x4d0fe6))[_0x451586(0x243)]();if(_0x4271e5){const _0x18cb28={'memberId':_0xd30cd0,'unitId':_0x4d0fe6,'content':_0x3e83d6,'mention':_0x391dd6,'threadId':_0x99cb38},_0x5e39ea=(await this[_0x451586(0x220)]['post'](_0x451586(0x20d)+_0x4d0fe6+'/reply',{'body':_0x18cb28}))[_0x451586(0x223)][_0x451586(0x1e5)];return{..._0x4df603,'id':_0x5e39ea[_0x451586(0x207)],'dT':_0x4b0deb(+_0x5e39ea[_0x451586(0x23a)])['format'](_0x451586(0x20a)),'personId':_0x5e39ea[_0x451586(0x236)]};}else{const _0x2c758b={'memberId':_0xd30cd0,'unitId':_0x4d0fe6,'content':_0x3e83d6,'mention':_0x391dd6},_0x38a90e=await this[_0x451586(0x220)]['post'](_0x451586(0x20d)+_0x4d0fe6+_0x451586(0x213),{'body':_0x2c758b});return X(_0x38a90e[_0x451586(0x223)]['comment'],_0x4df603);}}async[_0x2ca0df(0x241)](_0x4fc269){const _0x55c8e3=_0x2ca0df;var _0x50eb4d,_0x37a451;const {text:_0x1dd0c5,unitId:_0x6a8db}=_0x4fc269,_0x436dd8=(_0x37a451=(_0x50eb4d=_0x1dd0c5['customRanges'])==null?void 0x0:_0x50eb4d['filter'](_0x5af308=>_0x5af308[_0x55c8e3(0x224)]===_0x18d054['COMMENT'])[_0x55c8e3(0x1ed)](_0x19eb35=>_0x19eb35[_0x55c8e3(0x1f3)]))!=null?_0x37a451:[],_0x4978aa=JSON[_0x55c8e3(0x23d)](_0x1dd0c5),_0x1c05d6=_0x4fc269['threadId'],_0x191726=_0x4fc269['id'],_0x348147={'memberId':(await this['_sessionService']['requireSession'](_0x6a8db))[_0x55c8e3(0x243)](),'unitId':_0x6a8db,'threadId':_0x1c05d6,'mention':_0x436dd8,'content':_0x4978aa,'replyId':_0x191726},_0x40b32f=await this[_0x55c8e3(0x220)][_0x55c8e3(0x1f7)](_0x55c8e3(0x20d)+_0x6a8db+'/edit',{'body':_0x348147});return!_0x40b32f[_0x55c8e3(0x223)][_0x55c8e3(0x20b)]||_0x40b32f[_0x55c8e3(0x223)][_0x55c8e3(0x20b)][_0x55c8e3(0x23b)]===0x1;}async['resolveComment'](_0x12e6cb){const _0x2404ac=_0x2ca0df,{unitId:_0x2d6d95}=_0x12e6cb,_0x5e0468=_0x12e6cb[_0x2404ac(0x235)],_0x1a2430={'memberId':this[_0x2404ac(0x21d)][_0x2404ac(0x1f9)]()[_0x2404ac(0x234)],'unitId':_0x2d6d95,'threadId':_0x5e0468,'solved':_0x12e6cb[_0x2404ac(0x1ee)]?I[_0x2404ac(0x210)]:I[_0x2404ac(0x21c)]},_0x1e946a=await this['_httpService'][_0x2404ac(0x1f7)](_0x2404ac(0x20d)+_0x2d6d95+'/solved',{'body':_0x1a2430});return!_0x1e946a[_0x2404ac(0x223)][_0x2404ac(0x20b)]||_0x1e946a[_0x2404ac(0x223)][_0x2404ac(0x20b)][_0x2404ac(0x23b)]===0x1;}async[_0x2ca0df(0x227)](_0x16f160,_0x40a9b1,_0x15103e,_0x58bafc){const _0x2f4b48=_0x2ca0df,_0x4ebad8={'memberId':(await this[_0x2f4b48(0x22e)]['requireSession'](_0x16f160))[_0x2f4b48(0x243)](),'threadId':_0x15103e,'replyId':_0x58bafc,'unitId':_0x16f160},_0x1efc7a=await this[_0x2f4b48(0x220)][_0x2f4b48(0x1f7)](_0x2f4b48(0x20d)+_0x16f160+_0x2f4b48(0x1f4),{'body':_0x4ebad8});return!_0x1efc7a[_0x2f4b48(0x223)][_0x2f4b48(0x20b)]||_0x1efc7a[_0x2f4b48(0x223)][_0x2f4b48(0x20b)][_0x2f4b48(0x23b)]===0x1;}async['listComments'](_0x580e40,_0x133cf5,_0x4b8e71){const _0x580fee=_0x2ca0df,_0x789c21={'unitId':_0x580e40,'threadId':_0x4b8e71},_0x417828=await this[_0x580fee(0x220)][_0x580fee(0x1f7)](_0x580fee(0x20d)+_0x580e40+'/list',{'body':_0x789c21}),_0x54d620=_0x4b8e71[_0x580fee(0x1ed)](_0x27643a=>ee(_0x417828[_0x580fee(0x223)]['comments'][_0x27643a],_0x580e40,_0x133cf5))[_0x580fee(0x209)](Boolean);return Object[_0x580fee(0x21b)](_0x417828[_0x580fee(0x223)][_0x580fee(0x1e7)])[_0x580fee(0x226)](_0x3a61d3=>{const _0x4ae71b=_0x580fee;this[_0x4ae71b(0x21d)][_0x4ae71b(0x240)](_0x3a61d3);}),_0x54d620;}[_0x2ca0df(0x23f)](_0x2bf6eb){const _0x2ee81f=_0x2ca0df;return{'id':_0x2bf6eb['id'],'threadId':_0x2bf6eb[_0x2ee81f(0x235)],'ref':_0x2bf6eb['ref']};}};f=Q([_(0x0,_0x135ecc(_0x4440cb)),_(0x1,_0x135ecc(_0x28e75c)),_(0x2,_0x135ecc(_0x4cc2ec)),_(0x3,_0x135ecc(_0x2d6f6e))],f);var re=Object[_0x2ca0df(0x232)],te=(_0x15044d,_0x1d3aff,_0x4a0989,_0x18ec38)=>{const _0x4c8783=_0x2ca0df;for(var _0xcd3b4a=_0x18ec38>0x1?void 0x0:_0x18ec38?re(_0x1d3aff,_0x4a0989):_0x1d3aff,_0x327d5e=_0x15044d[_0x4c8783(0x214)]-0x1,_0x9d5e5f;_0x327d5e>=0x0;_0x327d5e--)(_0x9d5e5f=_0x15044d[_0x327d5e])&&(_0xcd3b4a=_0x9d5e5f(_0xcd3b4a)||_0xcd3b4a);return _0xcd3b4a;},N=(_0x331843,_0xf38588)=>(_0x24ebee,_0x537ffa)=>_0xf38588(_0x24ebee,_0x537ffa,_0x331843);let g=class extends _0x171224{constructor(_0x1f077e,_0x99fa39){const _0x8e3f7c=_0x2ca0df;super(),this[_0x8e3f7c(0x205)]=_0x1f077e,this['_threadCommentDataSource']=_0x99fa39,this[_0x8e3f7c(0x1e9)]();}[_0x2ca0df(0x1e9)](){const _0x1ff98e=_0x2ca0df;this[_0x1ff98e(0x205)]['dataSource']=this['_threadCommentDataSource'],this[_0x1ff98e(0x205)][_0x1ff98e(0x1ea)]=!0x1;}};g=te([N(0x0,_0x1962e6),N(0x1,_0x135ecc(f))],g);var se=Object[_0x2ca0df(0x23e)],oe=Object[_0x2ca0df(0x232)],ne=(_0x71a30e,_0x28b5d5,_0x4bfef6)=>_0x28b5d5 in _0x71a30e?se(_0x71a30e,_0x28b5d5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bfef6}):_0x71a30e[_0x28b5d5]=_0x4bfef6,ie=(_0x41256a,_0x17cc6d,_0x4e75b2,_0x5ea22d)=>{const _0x460959=_0x2ca0df;for(var _0x124c6a=_0x5ea22d>0x1?void 0x0:_0x5ea22d?oe(_0x17cc6d,_0x4e75b2):_0x17cc6d,_0x12b1fd=_0x41256a[_0x460959(0x214)]-0x1,_0x4a658a;_0x12b1fd>=0x0;_0x12b1fd--)(_0x4a658a=_0x41256a[_0x12b1fd])&&(_0x124c6a=_0x4a658a(_0x124c6a)||_0x124c6a);return _0x124c6a;},w=(_0x4f0911,_0x180f72)=>(_0x34ec3d,_0x23e312)=>_0x180f72(_0x34ec3d,_0x23e312,_0x4f0911),$=(_0x3f3bff,_0x2d91f5,_0x930e0e)=>ne(_0x3f3bff,typeof _0x2d91f5!='symbol'?_0x2d91f5+'':_0x2d91f5,_0x930e0e);let b=class extends _0x53c000{constructor(_0x1ddeb4=M,_0x2301f2,_0x4ad2dc){const _0x398f6a=_0x2ca0df;super(),this[_0x398f6a(0x1fd)]=_0x1ddeb4,this[_0x398f6a(0x1ec)]=_0x2301f2,this['_configService']=_0x4ad2dc;const {..._0x4ac078}=_0x2cfc39({},M,this[_0x398f6a(0x1fd)]);this[_0x398f6a(0x203)][_0x398f6a(0x238)](z,_0x4ac078);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x2cc924=>{const _0x4a3b30=_0x4078;this[_0x4a3b30(0x1ec)][_0x4a3b30(0x242)](_0x2cc924);});}[_0x2ca0df(0x21e)](){const _0x1a97ae=_0x2ca0df;this[_0x1a97ae(0x1ec)][_0x1a97ae(0x215)](g),this[_0x1a97ae(0x1ec)][_0x1a97ae(0x215)](S);}};$(b,_0x2ca0df(0x208),W),$(b,_0x2ca0df(0x22f),_0x1069d1[_0x2ca0df(0x22b)]),b=ie([_0x44b7a4(_0x3f5888,_0x2bfc00,_0x281db2),w(0x1,_0x135ecc(_0x2d6f6e)),w(0x2,_0x589df9)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x46fe98=_0x4cb1;(function(_0x357f21,_0x270380){const _0x52667c=_0x4cb1,_0x322390=_0x357f21();while(!![]){try{const _0x2d52f=-parseInt(_0x52667c(0x10c))/0x1+-parseInt(_0x52667c(0xe2))/0x2*(-parseInt(_0x52667c(0xf0))/0x3)+parseInt(_0x52667c(0x13e))/0x4*(parseInt(_0x52667c(0x131))/0x5)+parseInt(_0x52667c(0x137))/0x6+parseInt(_0x52667c(0x116))/0x7+-parseInt(_0x52667c(0x110))/0x8*(-parseInt(_0x52667c(0x10e))/0x9)+-parseInt(_0x52667c(0xed))/0xa;if(_0x2d52f===_0x270380)break;else _0x322390['push'](_0x322390['shift']());}catch(_0x4b26d3){_0x322390['push'](_0x322390['shift']());}}}(_0x47c6,0x42465));import{CommentService as _0x311f50,CollaborationSessionService as _0x5d4e31,UniverCollaborationClientPlugin as _0x4bccec}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3559a3}from'@univerjs-pro/license';import{dayjs as _0x1fdba,UserManagerService as _0xaee3d1,Inject as _0xd8e16e,Injector as _0x3aac1a,Disposable as _0x9d9fe,CustomRangeType as _0x171c7e,UniverInstanceType as _0x1b0f42,DependentOn as _0xabdba,IConfigService as _0x1ed246,Plugin as _0xc49e69,merge as _0x43fbb8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x103552}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3c9912,IThreadCommentDataSourceService as _0x17ba36}from'@univerjs/thread-comment';import{bufferTime as _0x2bd82e}from'rxjs';import{HTTPService as _0x4c2fd4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4e96f3=>(_0x4e96f3[_0x4e96f3[_0x46fe98(0x13a)]=0x0]=_0x46fe98(0x13a),_0x4e96f3[_0x4e96f3[_0x46fe98(0x11f)]=0x1]=_0x46fe98(0x11f),_0x4e96f3[_0x4e96f3[_0x46fe98(0x12a)]=-0x1]=_0x46fe98(0x12a),_0x4e96f3))(I||{}),v=(_0x583e3c=>(_0x583e3c[_0x583e3c[_0x46fe98(0x112)]=0x0]='Unknown',_0x583e3c[_0x583e3c[_0x46fe98(0x125)]=0x1]=_0x46fe98(0x125),_0x583e3c[_0x583e3c[_0x46fe98(0x143)]=0x2]=_0x46fe98(0x143),_0x583e3c[_0x583e3c[_0x46fe98(0x126)]=0x3]=_0x46fe98(0x126),_0x583e3c[_0x583e3c[_0x46fe98(0x129)]=0x4]=_0x46fe98(0x129),_0x583e3c[_0x583e3c['Solve']=0x5]=_0x46fe98(0x120),_0x583e3c[_0x583e3c[_0x46fe98(0x12a)]=-0x1]='UNRECOGNIZED',_0x583e3c))(v||{});function _0x47c6(){const _0x447cb0=['resolveComment','getUnit','disposeWithMe','dataSource','getComment','_userService','_httpService','getCurrentUser','pipe','234030RfiZYE','unitId','13653yZSMtb','/universer-api/user/list','968pIlcgg','listComments','Unknown','format','UNIVER_UNKNOWN','code','289919ojgJjk','replies','subscribe','length','slice','replyId','_commentService','body','solved','Solved','Solve','add','_injector','post','_configService','Add','Edit','stringify','/edit','Delete','UNRECOGNIZED','type','forEach','_threadCommentDataSourceService','users','rangeType','_initUserSync','35rKMaUX','customRanges','error','user','deleteComment','requireSession','218082vfAmuG','find','symbol','OpenOrReOpen','map','parse','addUser','155720wlZlrX','COMMENT','parentId','comments','payload','Reply','/list','rangeId','/add','126752juHjMU','defineProperty','createTimestamp','/universer-api/comment/unit/','pluginName','saveCommentToSnapshot','getUser','thread-comment-data-source.config','content','threadId','_threadCommentDataSource','2818440TPNBtH','getOwnPropertyDescriptor','values','12qUpRxE','addComment','_init','YYYY/MM/DD\x20HH:mm','userId','size','get','root','filter','userID','resolved','ref','getMemberID','/solved','_config','_sessionService','_threadCommentModel','_initDataSource','/delete'];_0x47c6=function(){return _0x447cb0;};return _0x47c6();}const D=_0x36e3e3=>_0x1fdba(new Date(+_0x36e3e3))[_0x46fe98(0x113)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4ab9bb,_0x47f95c)=>{const _0x52b890=_0x46fe98,_0x49685a=_0x4ab9bb[_0x52b890(0xf6)](_0xaee3d1),_0x7f8df5=_0x4ab9bb[_0x52b890(0xf6)](_0x4c2fd4);_0x47f95c[_0x52b890(0x12c)](_0x5ce717=>{const _0x1ded7b=_0x52b890;_0x49685a[_0x1ded7b(0xe8)](_0x5ce717)&&_0x47f95c['delete'](_0x5ce717);}),_0x47f95c[_0x52b890(0xf5)]&&(await _0x7f8df5[_0x52b890(0xf6)](_0x52b890(0x10f),{'params':{'userIDs':[..._0x47f95c]}}))['body'][_0x52b890(0x12e)][_0x52b890(0x12c)](_0x5f0036=>{const _0x2b7407=_0x52b890;_0x5f0036&&_0x49685a[_0x2b7407(0x13d)](_0x5f0036);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6405,_0x16eaa6,_0x54f1c2,_0x574ec6)=>{const _0x31cf76=_0x46fe98;for(var _0x3f2302=_0x574ec6>0x1?void 0x0:_0x574ec6?K(_0x16eaa6,_0x54f1c2):_0x16eaa6,_0x2e5b41=_0x3c6405[_0x31cf76(0x119)]-0x1,_0x2772b2;_0x2e5b41>=0x0;_0x2e5b41--)(_0x2772b2=_0x3c6405[_0x2e5b41])&&(_0x3f2302=_0x2772b2(_0x3f2302)||_0x3f2302);return _0x3f2302;},p=(_0x3b1918,_0x1d19d7)=>(_0x4a50ee,_0x153dca)=>_0x1d19d7(_0x4a50ee,_0x153dca,_0x3b1918);let S=class extends _0x9d9fe{constructor(_0x23aac8,_0xc128cd,_0x50e8dc,_0x7d5f92){const _0x3c201e=_0x46fe98;super(),this[_0x3c201e(0x11c)]=_0x23aac8,this[_0x3c201e(0x100)]=_0xc128cd,this[_0x3c201e(0x108)]=_0x50e8dc,this[_0x3c201e(0x122)]=_0x7d5f92,this[_0x3c201e(0xf2)](),this['_initUserSync']();}[_0x46fe98(0x130)](){const _0x444efa=_0x46fe98;this['disposeWithMe'](this[_0x444efa(0x100)]['commentUpdate$'][_0x444efa(0x10b)](_0x2bd82e(0x10))['subscribe'](_0x2647b4=>{const _0x1dba5a=_0x444efa,_0x1f35a9=new Set();_0x2647b4['forEach'](_0xecb118=>{const _0x39e4cb=_0x4cb1;switch(_0xecb118[_0x39e4cb(0x12b)]){case'add':{const _0x1a017d=_0xecb118[_0x39e4cb(0x142)]['personId'];_0x1f35a9['add'](_0x1a017d);break;}}}),B(this[_0x1dba5a(0x122)],_0x1f35a9);}));}[_0x46fe98(0xf2)](){const _0x2fb4e7=_0x46fe98;this[_0x2fb4e7(0x105)](this['_commentService']['commentUpdate$'][_0x2fb4e7(0x118)](async _0x148654=>{const _0xe8b06e=_0x2fb4e7;var _0x203a53,_0x4a6ae7,_0x5d802c,_0x18a1ca;const _0x3addc0=(_0x203a53=this[_0xe8b06e(0x100)][_0xe8b06e(0x104)](_0x148654['unitId'])[_0xe8b06e(0x138)](_0x269394=>_0x269394['threadId']===_0x148654['threadId']))==null?void 0x0:_0x203a53[_0xe8b06e(0xf7)];if(!_0x3addc0)return;const {unitId:_0x4895e8,subUnitId:_0x29a1a9}=_0x3addc0;switch(_0x148654[_0xe8b06e(0x134)]&&this[_0xe8b06e(0x108)][_0xe8b06e(0x13d)](_0x148654['user']),_0x148654['type']){case v[_0xe8b06e(0x125)]:break;case v[_0xe8b06e(0x143)]:{this[_0xe8b06e(0x100)][_0xe8b06e(0xf1)](_0x4895e8,_0x29a1a9,{'unitId':_0x4895e8,'subUnitId':_0x29a1a9,'ref':'','id':_0x148654[_0xe8b06e(0x11b)],'dT':D(+_0x148654[_0xe8b06e(0xe4)]),'threadId':_0x148654[_0xe8b06e(0xeb)],'personId':(_0x5d802c=(_0x4a6ae7=_0x148654[_0xe8b06e(0x134)])==null?void 0x0:_0x4a6ae7[_0xe8b06e(0xf9)])!=null?_0x5d802c:_0x148654['userId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654['content']),'parentId':_0x3addc0['id']});break;}case v[_0xe8b06e(0x129)]:{const _0xe32ca3=this[_0xe8b06e(0x100)][_0xe8b06e(0x107)](_0x4895e8,_0x29a1a9,_0x148654[_0xe8b06e(0x11b)]);_0xe32ca3&&_0xe32ca3[_0xe8b06e(0x140)]&&this[_0xe8b06e(0x100)][_0xe8b06e(0x135)](_0x4895e8,_0x29a1a9,_0x148654['replyId']);break;}case v[_0xe8b06e(0x126)]:{this['_threadCommentModel']['updateComment'](_0x4895e8,_0x29a1a9,{'commentId':_0x148654['replyId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654[_0xe8b06e(0xea)])});break;}case v[_0xe8b06e(0x120)]:{const _0x1e2ead=(_0x18a1ca=this['_threadCommentModel'][_0xe8b06e(0x104)](_0x148654[_0xe8b06e(0x10d)])[_0xe8b06e(0x138)](_0x219fd7=>_0x219fd7['threadId']===_0x148654[_0xe8b06e(0xeb)]))==null?void 0x0:_0x18a1ca[_0xe8b06e(0xf7)];_0x1e2ead&&this['_threadCommentModel'][_0xe8b06e(0x103)](_0x4895e8,_0x29a1a9,_0x1e2ead['id'],_0x148654[_0xe8b06e(0x11e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xd8e16e(_0x311f50)),p(0x1,_0xd8e16e(_0x3c9912)),p(0x2,_0xd8e16e(_0xaee3d1)),p(0x3,_0xd8e16e(_0x3aac1a))],S);const z=_0x46fe98(0xe9),M={};var k=Object[_0x46fe98(0xee)],Q=(_0x35c5f8,_0x3a57e9,_0x200d12,_0x2a244c)=>{const _0x13e813=_0x46fe98;for(var _0x2cd71c=_0x2a244c>0x1?void 0x0:_0x2a244c?k(_0x3a57e9,_0x200d12):_0x3a57e9,_0x91739d=_0x35c5f8[_0x13e813(0x119)]-0x1,_0x5dc5b2;_0x91739d>=0x0;_0x91739d--)(_0x5dc5b2=_0x35c5f8[_0x91739d])&&(_0x2cd71c=_0x5dc5b2(_0x2cd71c)||_0x2cd71c);return _0x2cd71c;},_=(_0x15a250,_0x364c8a)=>(_0x2b677c,_0x1853c5)=>_0x364c8a(_0x2b677c,_0x1853c5,_0x15a250);function X(_0x100bed,_0x5e7b4c){const _0x258a3a=_0x46fe98,_0x200c0d=_0x100bed[_0x258a3a(0x117)][0x0];return{..._0x5e7b4c,'id':_0x200c0d['replyId'],'resolved':_0x100bed[_0x258a3a(0x11e)]===0x1,'dT':D(_0x200c0d[_0x258a3a(0xe4)]),'personId':_0x200c0d[_0x258a3a(0xf4)],'threadId':_0x200c0d[_0x258a3a(0xeb)]};}function ee(_0x1294b8,_0x17f30d,_0x22e191){const _0x14496f=_0x46fe98;var _0x2724ff,_0x5dfaf6;if(((_0x5dfaf6=(_0x2724ff=_0x1294b8==null?void 0x0:_0x1294b8[_0x14496f(0x117)])==null?void 0x0:_0x2724ff[_0x14496f(0x119)])!=null?_0x5dfaf6:0x0)>0x0){const _0xc7b2f4=(_0x3daaf9,_0x1342fb)=>({'id':_0x3daaf9[_0x14496f(0x11b)],'threadId':_0x3daaf9['threadId'],'dT':D(_0x3daaf9[_0x14496f(0xe4)]),'personId':_0x3daaf9[_0x14496f(0xf4)],'resolved':_0x1294b8[_0x14496f(0x11e)]===I[_0x14496f(0x11f)],'unitId':_0x17f30d,'subUnitId':_0x22e191,'text':JSON[_0x14496f(0x13c)](_0x3daaf9[_0x14496f(0xea)]),'parentId':_0x1342fb}),_0x8b6588=_0xc7b2f4(_0x1294b8[_0x14496f(0x117)][0x0]);return{..._0x8b6588,'children':_0x1294b8[_0x14496f(0x117)][_0x14496f(0x11a)](0x1)[_0x14496f(0x13b)](_0x4c6fbb=>_0xc7b2f4(_0x4c6fbb,_0x8b6588['id']))};}return null;}let f=class{constructor(_0x41a115,_0x231dec,_0x822be7,_0x4a6944){const _0x374086=_0x46fe98;this[_0x374086(0x109)]=_0x41a115,this[_0x374086(0x108)]=_0x231dec,this['_sessionService']=_0x822be7,this[_0x374086(0x122)]=_0x4a6944;}async[_0x46fe98(0xf1)](_0x200f76){const _0x320134=_0x46fe98;var _0x3f6f6c,_0x53a20c;const {parentId:_0x1152dc,unitId:_0x5c977c,text:_0x19d189,threadId:_0x7f14a2}=_0x200f76,_0x4a7c12=(_0x53a20c=(_0x3f6f6c=_0x19d189[_0x320134(0x132)])==null?void 0x0:_0x3f6f6c['filter'](_0x4ca4eb=>_0x4ca4eb['rangeType']===_0x171c7e[_0x320134(0x13f)])[_0x320134(0x13b)](_0x4f72a1=>_0x4f72a1['rangeId']))!=null?_0x53a20c:[],_0x22529e=JSON[_0x320134(0x127)](_0x19d189),_0x29dedd=(await this[_0x320134(0xff)][_0x320134(0x136)](_0x5c977c))['getMemberID']();if(_0x1152dc){const _0x3da1c1={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12,'threadId':_0x7f14a2},_0x46a3c0=(await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+'/reply',{'body':_0x3da1c1}))['body']['reply'];return{..._0x200f76,'id':_0x46a3c0['replyId'],'dT':_0x1fdba(+_0x46a3c0[_0x320134(0xe4)])[_0x320134(0x113)](_0x320134(0xf3)),'personId':_0x46a3c0[_0x320134(0xf4)]};}else{const _0xfa9222={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12},_0x47edc7=await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+_0x320134(0xe1),{'body':_0xfa9222});return X(_0x47edc7[_0x320134(0x11d)]['comment'],_0x200f76);}}async['updateComment'](_0x3c2326){const _0x3e9407=_0x46fe98;var _0x5e47cf,_0x5d912d;const {text:_0x34c933,unitId:_0x51150b}=_0x3c2326,_0x24d314=(_0x5d912d=(_0x5e47cf=_0x34c933[_0x3e9407(0x132)])==null?void 0x0:_0x5e47cf[_0x3e9407(0xf8)](_0x399329=>_0x399329[_0x3e9407(0x12f)]===_0x171c7e['COMMENT'])['map'](_0x46297f=>_0x46297f[_0x3e9407(0xe0)]))!=null?_0x5d912d:[],_0x13bcf9=JSON[_0x3e9407(0x127)](_0x34c933),_0x3897df=_0x3c2326[_0x3e9407(0xeb)],_0x3346ad=_0x3c2326['id'],_0x2f5e51={'memberId':(await this[_0x3e9407(0xff)][_0x3e9407(0x136)](_0x51150b))[_0x3e9407(0xfc)](),'unitId':_0x51150b,'threadId':_0x3897df,'mention':_0x24d314,'content':_0x13bcf9,'replyId':_0x3346ad},_0x126655=await this[_0x3e9407(0x109)][_0x3e9407(0x123)](_0x3e9407(0xe5)+_0x51150b+_0x3e9407(0x128),{'body':_0x2f5e51});return!_0x126655[_0x3e9407(0x11d)][_0x3e9407(0x133)]||_0x126655[_0x3e9407(0x11d)]['error'][_0x3e9407(0x115)]===0x1;}async[_0x46fe98(0x103)](_0x154d22){const _0x47a74f=_0x46fe98,{unitId:_0x546e51}=_0x154d22,_0x510d2e=_0x154d22[_0x47a74f(0xeb)],_0x47e6fa={'memberId':this[_0x47a74f(0x108)][_0x47a74f(0x10a)]()['userID'],'unitId':_0x546e51,'threadId':_0x510d2e,'solved':_0x154d22[_0x47a74f(0xfa)]?I['Solved']:I[_0x47a74f(0x13a)]},_0x337b82=await this['_httpService']['post'](_0x47a74f(0xe5)+_0x546e51+_0x47a74f(0xfd),{'body':_0x47e6fa});return!_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)]||_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)][_0x47a74f(0x115)]===0x1;}async[_0x46fe98(0x135)](_0x504c5e,_0x1ee61c,_0x3a8e25,_0x17c933){const _0x23e8c7=_0x46fe98,_0x4189f6={'memberId':(await this[_0x23e8c7(0xff)]['requireSession'](_0x504c5e))[_0x23e8c7(0xfc)](),'threadId':_0x3a8e25,'replyId':_0x17c933,'unitId':_0x504c5e},_0x4e5a98=await this[_0x23e8c7(0x109)]['post'](_0x23e8c7(0xe5)+_0x504c5e+_0x23e8c7(0x102),{'body':_0x4189f6});return!_0x4e5a98[_0x23e8c7(0x11d)]['error']||_0x4e5a98[_0x23e8c7(0x11d)][_0x23e8c7(0x133)][_0x23e8c7(0x115)]===0x1;}async[_0x46fe98(0x111)](_0x1b9800,_0x466478,_0x5d6b8a){const _0x2dd30d=_0x46fe98,_0x26016f={'unitId':_0x1b9800,'threadId':_0x5d6b8a},_0x466d09=await this[_0x2dd30d(0x109)][_0x2dd30d(0x123)](_0x2dd30d(0xe5)+_0x1b9800+_0x2dd30d(0xdf),{'body':_0x26016f}),_0x134da4=_0x5d6b8a[_0x2dd30d(0x13b)](_0x4d2875=>ee(_0x466d09['body'][_0x2dd30d(0x141)][_0x4d2875],_0x1b9800,_0x466478))['filter'](Boolean);return Object[_0x2dd30d(0xef)](_0x466d09[_0x2dd30d(0x11d)][_0x2dd30d(0x12e)])[_0x2dd30d(0x12c)](_0x5b62b9=>{const _0x57050f=_0x2dd30d;this[_0x57050f(0x108)][_0x57050f(0x13d)](_0x5b62b9);}),_0x134da4;}[_0x46fe98(0xe7)](_0x3b41f5){const _0x55e0bb=_0x46fe98;return{'id':_0x3b41f5['id'],'threadId':_0x3b41f5[_0x55e0bb(0xeb)],'ref':_0x3b41f5[_0x55e0bb(0xfb)]};}};f=Q([_(0x0,_0xd8e16e(_0x4c2fd4)),_(0x1,_0xd8e16e(_0xaee3d1)),_(0x2,_0xd8e16e(_0x5d4e31)),_(0x3,_0xd8e16e(_0x3aac1a))],f);var re=Object[_0x46fe98(0xee)],te=(_0x3863f7,_0x521605,_0x1b020c,_0x2dbbe6)=>{for(var _0x120497=_0x2dbbe6>0x1?void 0x0:_0x2dbbe6?re(_0x521605,_0x1b020c):_0x521605,_0x491e0b=_0x3863f7['length']-0x1,_0x56d87e;_0x491e0b>=0x0;_0x491e0b--)(_0x56d87e=_0x3863f7[_0x491e0b])&&(_0x120497=_0x56d87e(_0x120497)||_0x120497);return _0x120497;},N=(_0x1d8111,_0x2d5fc7)=>(_0x59baea,_0x3eebce)=>_0x2d5fc7(_0x59baea,_0x3eebce,_0x1d8111);let g=class extends _0x9d9fe{constructor(_0x8443da,_0x2f77ba){const _0x5a09d8=_0x46fe98;super(),this[_0x5a09d8(0x12d)]=_0x8443da,this[_0x5a09d8(0xec)]=_0x2f77ba,this['_initDataSource']();}[_0x46fe98(0x101)](){const _0x34815b=_0x46fe98;this[_0x34815b(0x12d)][_0x34815b(0x106)]=this[_0x34815b(0xec)],this[_0x34815b(0x12d)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x17ba36),N(0x1,_0xd8e16e(f))],g);var se=Object[_0x46fe98(0xe3)],oe=Object[_0x46fe98(0xee)],ne=(_0x206055,_0x354e4f,_0x407df9)=>_0x354e4f in _0x206055?se(_0x206055,_0x354e4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x407df9}):_0x206055[_0x354e4f]=_0x407df9,ie=(_0x11f50c,_0x27a989,_0x50c592,_0x26db1a)=>{const _0x2c3741=_0x46fe98;for(var _0x386595=_0x26db1a>0x1?void 0x0:_0x26db1a?oe(_0x27a989,_0x50c592):_0x27a989,_0x3e937b=_0x11f50c[_0x2c3741(0x119)]-0x1,_0x55d301;_0x3e937b>=0x0;_0x3e937b--)(_0x55d301=_0x11f50c[_0x3e937b])&&(_0x386595=_0x55d301(_0x386595)||_0x386595);return _0x386595;},w=(_0x2e1901,_0x28cc7a)=>(_0x3886bf,_0x366f3c)=>_0x28cc7a(_0x3886bf,_0x366f3c,_0x2e1901),$=(_0x917cf9,_0xfc6050,_0x5d0dac)=>ne(_0x917cf9,typeof _0xfc6050!=_0x46fe98(0x139)?_0xfc6050+'':_0xfc6050,_0x5d0dac);let b=class extends _0xc49e69{constructor(_0x57c025=M,_0x413220,_0x42ade3){const _0x20c96c=_0x46fe98;super(),this[_0x20c96c(0xfe)]=_0x57c025,this[_0x20c96c(0x122)]=_0x413220,this[_0x20c96c(0x124)]=_0x42ade3;const {..._0xdf3333}=_0x43fbb8({},M,this[_0x20c96c(0xfe)]);this[_0x20c96c(0x124)]['setConfig'](z,_0xdf3333);}['onStarting'](){const _0x11cbf9=_0x46fe98;[[f],[g],[S]][_0x11cbf9(0x12c)](_0x3727e7=>{const _0x2d8d87=_0x11cbf9;this[_0x2d8d87(0x122)][_0x2d8d87(0x121)](_0x3727e7);});}['onReady'](){const _0x2eb999=_0x46fe98;this['_injector']['get'](g),this[_0x2eb999(0x122)][_0x2eb999(0xf6)](S);}};function _0x4cb1(_0x2dc4f4,_0x176f4a){const _0x47c65d=_0x47c6();return _0x4cb1=function(_0x4cb114,_0x322d4a){_0x4cb114=_0x4cb114-0xdf;let _0x3d046b=_0x47c65d[_0x4cb114];return _0x3d046b;},_0x4cb1(_0x2dc4f4,_0x176f4a);}$(b,_0x46fe98(0xe6),W),$(b,_0x46fe98(0x12b),_0x1b0f42[_0x46fe98(0x114)]),b=ie([_0xabdba(_0x103552,_0x4bccec,_0x3559a3),w(0x1,_0xd8e16e(_0x3aac1a)),w(0x2,_0x1ed246)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2ca0df=_0x4078;(function(_0xd64bf9,_0x45fd6e){const _0x10951c=_0x4078,_0x3302d8=_0xd64bf9();while(!![]){try{const _0x1dfab5=-parseInt(_0x10951c(0x1e6))/0x1+parseInt(_0x10951c(0x1e8))/0x2+parseInt(_0x10951c(0x21a))/0x3+parseInt(_0x10951c(0x244))/0x4+parseInt(_0x10951c(0x228))/0x5*(parseInt(_0x10951c(0x20e))/0x6)+-parseInt(_0x10951c(0x20f))/0x7*(parseInt(_0x10951c(0x222))/0x8)+parseInt(_0x10951c(0x211))/0x9*(-parseInt(_0x10951c(0x1fc))/0xa);if(_0x1dfab5===_0x45fd6e)break;else _0x3302d8['push'](_0x3302d8['shift']());}catch(_0x5e3c1b){_0x3302d8['push'](_0x3302d8['shift']());}}}(_0x3626,0x8fad5));import{CommentService as _0x27fb10,CollaborationSessionService as _0x4cc2ec,UniverCollaborationClientPlugin as _0x2bfc00}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x281db2}from'@univerjs-pro/license';import{dayjs as _0x4b0deb,UserManagerService as _0x28e75c,Inject as _0x135ecc,Injector as _0x2d6f6e,Disposable as _0x171224,CustomRangeType as _0x18d054,UniverInstanceType as _0x1069d1,DependentOn as _0x44b7a4,IConfigService as _0x589df9,Plugin as _0x53c000,merge as _0x2cfc39}from'@univerjs/core';function _0x4078(_0xcccc8d,_0x1463aa){const _0x362691=_0x3626();return _0x4078=function(_0x4078c8,_0xd0f714){_0x4078c8=_0x4078c8-0x1e5;let _0x599fa5=_0x362691[_0x4078c8];return _0x599fa5;},_0x4078(_0xcccc8d,_0x1463aa);}import{UniverThreadCommentUIPlugin as _0x3f5888}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xb7ab87,IThreadCommentDataSourceService as _0x1962e6}from'@univerjs/thread-comment';import{bufferTime as _0x24fbd2}from'rxjs';import{HTTPService as _0x4440cb}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x161796=>(_0x161796[_0x161796[_0x2ca0df(0x21c)]=0x0]=_0x2ca0df(0x21c),_0x161796[_0x161796[_0x2ca0df(0x210)]=0x1]=_0x2ca0df(0x210),_0x161796[_0x161796[_0x2ca0df(0x231)]=-0x1]=_0x2ca0df(0x231),_0x161796))(I||{}),v=(_0x32a54c=>(_0x32a54c[_0x32a54c[_0x2ca0df(0x23c)]=0x0]=_0x2ca0df(0x23c),_0x32a54c[_0x32a54c['Add']=0x1]=_0x2ca0df(0x1f2),_0x32a54c[_0x32a54c['Reply']=0x2]=_0x2ca0df(0x201),_0x32a54c[_0x32a54c[_0x2ca0df(0x1ef)]=0x3]=_0x2ca0df(0x1ef),_0x32a54c[_0x32a54c[_0x2ca0df(0x22a)]=0x4]=_0x2ca0df(0x22a),_0x32a54c[_0x32a54c[_0x2ca0df(0x21f)]=0x5]='Solve',_0x32a54c[_0x32a54c['UNRECOGNIZED']=-0x1]=_0x2ca0df(0x231),_0x32a54c))(v||{});const D=_0x2348ab=>_0x4b0deb(new Date(+_0x2348ab))[_0x2ca0df(0x212)](_0x2ca0df(0x20a)),B=async(_0x507bba,_0x22201c)=>{const _0x430dcb=_0x2ca0df,_0xd0c2f5=_0x507bba[_0x430dcb(0x215)](_0x28e75c),_0x5cd4e7=_0x507bba['get'](_0x4440cb);_0x22201c['forEach'](_0x128ceb=>{const _0x2734cb=_0x430dcb;_0xd0c2f5[_0x2734cb(0x239)](_0x128ceb)&&_0x22201c[_0x2734cb(0x206)](_0x128ceb);}),_0x22201c[_0x430dcb(0x225)]&&(await _0x5cd4e7[_0x430dcb(0x215)](_0x430dcb(0x20c),{'params':{'userIDs':[..._0x22201c]}}))[_0x430dcb(0x223)][_0x430dcb(0x1e7)][_0x430dcb(0x226)](_0x5514b5=>{const _0x1294da=_0x430dcb;_0x5514b5&&_0xd0c2f5[_0x1294da(0x240)](_0x5514b5);});};var K=Object[_0x2ca0df(0x232)],V=(_0x9401e1,_0x43f833,_0xf1fe62,_0x46ba41)=>{const _0x1d12df=_0x2ca0df;for(var _0xdf899a=_0x46ba41>0x1?void 0x0:_0x46ba41?K(_0x43f833,_0xf1fe62):_0x43f833,_0x47b353=_0x9401e1[_0x1d12df(0x214)]-0x1,_0x40160b;_0x47b353>=0x0;_0x47b353--)(_0x40160b=_0x9401e1[_0x47b353])&&(_0xdf899a=_0x40160b(_0xdf899a)||_0xdf899a);return _0xdf899a;},p=(_0x416d97,_0x2d0f76)=>(_0x3f2d69,_0x4b21e6)=>_0x2d0f76(_0x3f2d69,_0x4b21e6,_0x416d97);let S=class extends _0x171224{constructor(_0x1b8bde,_0x4db9fd,_0x51aa4c,_0x33ae3c){const _0x52e38f=_0x2ca0df;super(),this['_commentService']=_0x1b8bde,this[_0x52e38f(0x1f8)]=_0x4db9fd,this[_0x52e38f(0x21d)]=_0x51aa4c,this[_0x52e38f(0x1ec)]=_0x33ae3c,this[_0x52e38f(0x1f1)](),this[_0x52e38f(0x219)]();}[_0x2ca0df(0x219)](){const _0x25f0b8=_0x2ca0df;this[_0x25f0b8(0x1fa)](this[_0x25f0b8(0x1f8)][_0x25f0b8(0x22d)][_0x25f0b8(0x1ff)](_0x24fbd2(0x10))[_0x25f0b8(0x217)](_0x4126dd=>{const _0xc7d295=_0x25f0b8,_0x5b43c3=new Set();_0x4126dd[_0xc7d295(0x226)](_0x8a49a1=>{const _0x32e6a0=_0xc7d295;switch(_0x8a49a1[_0x32e6a0(0x22f)]){case _0x32e6a0(0x242):{const _0x2d7ced=_0x8a49a1[_0x32e6a0(0x230)]['personId'];_0x5b43c3[_0x32e6a0(0x242)](_0x2d7ced);break;}}}),B(this[_0xc7d295(0x1ec)],_0x5b43c3);}));}[_0x2ca0df(0x1f1)](){const _0x19e92c=_0x2ca0df;this[_0x19e92c(0x1fa)](this['_commentService'][_0x19e92c(0x22d)][_0x19e92c(0x217)](async _0x10d708=>{const _0x4f124a=_0x19e92c;var _0x1cdeec,_0x5c3d22,_0x3534fe,_0x3fa3e0;const _0xa7c942=(_0x1cdeec=this[_0x4f124a(0x1f8)]['getUnit'](_0x10d708[_0x4f124a(0x202)])[_0x4f124a(0x1f0)](_0x37c42a=>_0x37c42a[_0x4f124a(0x235)]===_0x10d708[_0x4f124a(0x235)]))==null?void 0x0:_0x1cdeec[_0x4f124a(0x221)];if(!_0xa7c942)return;const {unitId:_0x2b9112,subUnitId:_0xcb7a82}=_0xa7c942;switch(_0x10d708[_0x4f124a(0x237)]&&this[_0x4f124a(0x21d)][_0x4f124a(0x240)](_0x10d708[_0x4f124a(0x237)]),_0x10d708[_0x4f124a(0x22f)]){case v['Add']:break;case v['Reply']:{this[_0x4f124a(0x1f8)][_0x4f124a(0x1f5)](_0x2b9112,_0xcb7a82,{'unitId':_0x2b9112,'subUnitId':_0xcb7a82,'ref':'','id':_0x10d708[_0x4f124a(0x207)],'dT':D(+_0x10d708['createTimestamp']),'threadId':_0x10d708[_0x4f124a(0x235)],'personId':(_0x3534fe=(_0x5c3d22=_0x10d708['user'])==null?void 0x0:_0x5c3d22[_0x4f124a(0x234)])!=null?_0x3534fe:_0x10d708[_0x4f124a(0x236)],'text':JSON[_0x4f124a(0x216)](_0x10d708[_0x4f124a(0x218)]),'parentId':_0xa7c942['id']});break;}case v[_0x4f124a(0x22a)]:{const _0x121fcb=this['_threadCommentModel']['getComment'](_0x2b9112,_0xcb7a82,_0x10d708[_0x4f124a(0x207)]);_0x121fcb&&_0x121fcb[_0x4f124a(0x229)]&&this[_0x4f124a(0x1f8)][_0x4f124a(0x227)](_0x2b9112,_0xcb7a82,_0x10d708[_0x4f124a(0x207)]);break;}case v[_0x4f124a(0x1ef)]:{this[_0x4f124a(0x1f8)]['updateComment'](_0x2b9112,_0xcb7a82,{'commentId':_0x10d708[_0x4f124a(0x207)],'text':JSON[_0x4f124a(0x216)](_0x10d708[_0x4f124a(0x218)])});break;}case v[_0x4f124a(0x21f)]:{const _0x5a1420=(_0x3fa3e0=this[_0x4f124a(0x1f8)][_0x4f124a(0x1fb)](_0x10d708['unitId'])['find'](_0x37c4ed=>_0x37c4ed[_0x4f124a(0x235)]===_0x10d708['threadId']))==null?void 0x0:_0x3fa3e0[_0x4f124a(0x221)];_0x5a1420&&this[_0x4f124a(0x1f8)][_0x4f124a(0x22c)](_0x2b9112,_0xcb7a82,_0x5a1420['id'],_0x10d708[_0x4f124a(0x1fe)]===I[_0x4f124a(0x210)]);break;}}}));}};S=V([p(0x0,_0x135ecc(_0x27fb10)),p(0x1,_0x135ecc(_0xb7ab87)),p(0x2,_0x135ecc(_0x28e75c)),p(0x3,_0x135ecc(_0x2d6f6e))],S);const z=_0x2ca0df(0x1f6),M={};function _0x3626(){const _0x38a794=['thread-comment-data-source.config','post','_threadCommentModel','getCurrentUser','disposeWithMe','getUnit','2810xMDzur','_config','solved','pipe','customRanges','Reply','unitId','_configService','replies','_threadCommentDataSourceService','delete','replyId','pluginName','filter','YYYY/MM/DD\x20HH:mm','error','/universer-api/user/list','/universer-api/comment/unit/','3766782kywRIY','7qjfTNf','Solved','18729LzxvaV','format','/add','length','get','parse','subscribe','content','_initUserSync','1263609XSfELH','values','OpenOrReOpen','_userService','onReady','Solve','_httpService','root','4296856yUIYGz','body','rangeType','size','forEach','deleteComment','5gXPkjr','parentId','Delete','UNIVER_UNKNOWN','resolveComment','commentUpdate$','_sessionService','type','payload','UNRECOGNIZED','getOwnPropertyDescriptor','requireSession','userID','threadId','userId','user','setConfig','getUser','createTimestamp','code','Unknown','stringify','defineProperty','saveCommentToSnapshot','addUser','updateComment','add','getMemberID','3428052MCabNI','reply','570968AvogMk','users','750648TFTkbP','_initDataSource','syncUpdateMutationToColla','COMMENT','_injector','map','resolved','Edit','find','_init','Add','rangeId','/delete','addComment'];_0x3626=function(){return _0x38a794;};return _0x3626();}var k=Object[_0x2ca0df(0x232)],Q=(_0x5960d8,_0x4e43bb,_0x29605e,_0x29375b)=>{const _0x4117c2=_0x2ca0df;for(var _0x3ce972=_0x29375b>0x1?void 0x0:_0x29375b?k(_0x4e43bb,_0x29605e):_0x4e43bb,_0x3ef1c0=_0x5960d8[_0x4117c2(0x214)]-0x1,_0x273c5c;_0x3ef1c0>=0x0;_0x3ef1c0--)(_0x273c5c=_0x5960d8[_0x3ef1c0])&&(_0x3ce972=_0x273c5c(_0x3ce972)||_0x3ce972);return _0x3ce972;},_=(_0x4c32b2,_0x125fe5)=>(_0x5940b8,_0x31b947)=>_0x125fe5(_0x5940b8,_0x31b947,_0x4c32b2);function X(_0x12cd15,_0x5c77fe){const _0x106c1b=_0x2ca0df,_0x5d8ac6=_0x12cd15[_0x106c1b(0x204)][0x0];return{..._0x5c77fe,'id':_0x5d8ac6[_0x106c1b(0x207)],'resolved':_0x12cd15[_0x106c1b(0x1fe)]===0x1,'dT':D(_0x5d8ac6['createTimestamp']),'personId':_0x5d8ac6[_0x106c1b(0x236)],'threadId':_0x5d8ac6[_0x106c1b(0x235)]};}function ee(_0x4f6e86,_0x3a0cb4,_0x1e878b){const _0x23402c=_0x2ca0df;var _0x5bc926,_0x6e769e;if(((_0x6e769e=(_0x5bc926=_0x4f6e86==null?void 0x0:_0x4f6e86[_0x23402c(0x204)])==null?void 0x0:_0x5bc926[_0x23402c(0x214)])!=null?_0x6e769e:0x0)>0x0){const _0x499f92=(_0x47121c,_0x5d8ee5)=>({'id':_0x47121c[_0x23402c(0x207)],'threadId':_0x47121c[_0x23402c(0x235)],'dT':D(_0x47121c[_0x23402c(0x23a)]),'personId':_0x47121c['userId'],'resolved':_0x4f6e86[_0x23402c(0x1fe)]===I['Solved'],'unitId':_0x3a0cb4,'subUnitId':_0x1e878b,'text':JSON[_0x23402c(0x216)](_0x47121c[_0x23402c(0x218)]),'parentId':_0x5d8ee5}),_0x5a4094=_0x499f92(_0x4f6e86[_0x23402c(0x204)][0x0]);return{..._0x5a4094,'children':_0x4f6e86['replies']['slice'](0x1)[_0x23402c(0x1ed)](_0x57a9d7=>_0x499f92(_0x57a9d7,_0x5a4094['id']))};}return null;}let f=class{constructor(_0x333c9d,_0x1bce82,_0x253d97,_0xf9b858){const _0x1c4afd=_0x2ca0df;this[_0x1c4afd(0x220)]=_0x333c9d,this[_0x1c4afd(0x21d)]=_0x1bce82,this['_sessionService']=_0x253d97,this[_0x1c4afd(0x1ec)]=_0xf9b858;}async[_0x2ca0df(0x1f5)](_0x4df603){const _0x451586=_0x2ca0df;var _0x4be6c5,_0x2ad5b4;const {parentId:_0x4271e5,unitId:_0x4d0fe6,text:_0x5ee266,threadId:_0x99cb38}=_0x4df603,_0x391dd6=(_0x2ad5b4=(_0x4be6c5=_0x5ee266[_0x451586(0x200)])==null?void 0x0:_0x4be6c5[_0x451586(0x209)](_0xd70dab=>_0xd70dab['rangeType']===_0x18d054[_0x451586(0x1eb)])[_0x451586(0x1ed)](_0x4f5a23=>_0x4f5a23[_0x451586(0x1f3)]))!=null?_0x2ad5b4:[],_0x3e83d6=JSON[_0x451586(0x23d)](_0x5ee266),_0xd30cd0=(await this[_0x451586(0x22e)][_0x451586(0x233)](_0x4d0fe6))[_0x451586(0x243)]();if(_0x4271e5){const _0x18cb28={'memberId':_0xd30cd0,'unitId':_0x4d0fe6,'content':_0x3e83d6,'mention':_0x391dd6,'threadId':_0x99cb38},_0x5e39ea=(await this[_0x451586(0x220)]['post'](_0x451586(0x20d)+_0x4d0fe6+'/reply',{'body':_0x18cb28}))[_0x451586(0x223)][_0x451586(0x1e5)];return{..._0x4df603,'id':_0x5e39ea[_0x451586(0x207)],'dT':_0x4b0deb(+_0x5e39ea[_0x451586(0x23a)])['format'](_0x451586(0x20a)),'personId':_0x5e39ea[_0x451586(0x236)]};}else{const _0x2c758b={'memberId':_0xd30cd0,'unitId':_0x4d0fe6,'content':_0x3e83d6,'mention':_0x391dd6},_0x38a90e=await this[_0x451586(0x220)]['post'](_0x451586(0x20d)+_0x4d0fe6+_0x451586(0x213),{'body':_0x2c758b});return X(_0x38a90e[_0x451586(0x223)]['comment'],_0x4df603);}}async[_0x2ca0df(0x241)](_0x4fc269){const _0x55c8e3=_0x2ca0df;var _0x50eb4d,_0x37a451;const {text:_0x1dd0c5,unitId:_0x6a8db}=_0x4fc269,_0x436dd8=(_0x37a451=(_0x50eb4d=_0x1dd0c5['customRanges'])==null?void 0x0:_0x50eb4d['filter'](_0x5af308=>_0x5af308[_0x55c8e3(0x224)]===_0x18d054['COMMENT'])[_0x55c8e3(0x1ed)](_0x19eb35=>_0x19eb35[_0x55c8e3(0x1f3)]))!=null?_0x37a451:[],_0x4978aa=JSON[_0x55c8e3(0x23d)](_0x1dd0c5),_0x1c05d6=_0x4fc269['threadId'],_0x191726=_0x4fc269['id'],_0x348147={'memberId':(await this['_sessionService']['requireSession'](_0x6a8db))[_0x55c8e3(0x243)](),'unitId':_0x6a8db,'threadId':_0x1c05d6,'mention':_0x436dd8,'content':_0x4978aa,'replyId':_0x191726},_0x40b32f=await this[_0x55c8e3(0x220)][_0x55c8e3(0x1f7)](_0x55c8e3(0x20d)+_0x6a8db+'/edit',{'body':_0x348147});return!_0x40b32f[_0x55c8e3(0x223)][_0x55c8e3(0x20b)]||_0x40b32f[_0x55c8e3(0x223)][_0x55c8e3(0x20b)][_0x55c8e3(0x23b)]===0x1;}async['resolveComment'](_0x12e6cb){const _0x2404ac=_0x2ca0df,{unitId:_0x2d6d95}=_0x12e6cb,_0x5e0468=_0x12e6cb[_0x2404ac(0x235)],_0x1a2430={'memberId':this[_0x2404ac(0x21d)][_0x2404ac(0x1f9)]()[_0x2404ac(0x234)],'unitId':_0x2d6d95,'threadId':_0x5e0468,'solved':_0x12e6cb[_0x2404ac(0x1ee)]?I[_0x2404ac(0x210)]:I[_0x2404ac(0x21c)]},_0x1e946a=await this['_httpService'][_0x2404ac(0x1f7)](_0x2404ac(0x20d)+_0x2d6d95+'/solved',{'body':_0x1a2430});return!_0x1e946a[_0x2404ac(0x223)][_0x2404ac(0x20b)]||_0x1e946a[_0x2404ac(0x223)][_0x2404ac(0x20b)][_0x2404ac(0x23b)]===0x1;}async[_0x2ca0df(0x227)](_0x16f160,_0x40a9b1,_0x15103e,_0x58bafc){const _0x2f4b48=_0x2ca0df,_0x4ebad8={'memberId':(await this[_0x2f4b48(0x22e)]['requireSession'](_0x16f160))[_0x2f4b48(0x243)](),'threadId':_0x15103e,'replyId':_0x58bafc,'unitId':_0x16f160},_0x1efc7a=await this[_0x2f4b48(0x220)][_0x2f4b48(0x1f7)](_0x2f4b48(0x20d)+_0x16f160+_0x2f4b48(0x1f4),{'body':_0x4ebad8});return!_0x1efc7a[_0x2f4b48(0x223)][_0x2f4b48(0x20b)]||_0x1efc7a[_0x2f4b48(0x223)][_0x2f4b48(0x20b)][_0x2f4b48(0x23b)]===0x1;}async['listComments'](_0x580e40,_0x133cf5,_0x4b8e71){const _0x580fee=_0x2ca0df,_0x789c21={'unitId':_0x580e40,'threadId':_0x4b8e71},_0x417828=await this[_0x580fee(0x220)][_0x580fee(0x1f7)](_0x580fee(0x20d)+_0x580e40+'/list',{'body':_0x789c21}),_0x54d620=_0x4b8e71[_0x580fee(0x1ed)](_0x27643a=>ee(_0x417828[_0x580fee(0x223)]['comments'][_0x27643a],_0x580e40,_0x133cf5))[_0x580fee(0x209)](Boolean);return Object[_0x580fee(0x21b)](_0x417828[_0x580fee(0x223)][_0x580fee(0x1e7)])[_0x580fee(0x226)](_0x3a61d3=>{const _0x4ae71b=_0x580fee;this[_0x4ae71b(0x21d)][_0x4ae71b(0x240)](_0x3a61d3);}),_0x54d620;}[_0x2ca0df(0x23f)](_0x2bf6eb){const _0x2ee81f=_0x2ca0df;return{'id':_0x2bf6eb['id'],'threadId':_0x2bf6eb[_0x2ee81f(0x235)],'ref':_0x2bf6eb['ref']};}};f=Q([_(0x0,_0x135ecc(_0x4440cb)),_(0x1,_0x135ecc(_0x28e75c)),_(0x2,_0x135ecc(_0x4cc2ec)),_(0x3,_0x135ecc(_0x2d6f6e))],f);var re=Object[_0x2ca0df(0x232)],te=(_0x15044d,_0x1d3aff,_0x4a0989,_0x18ec38)=>{const _0x4c8783=_0x2ca0df;for(var _0xcd3b4a=_0x18ec38>0x1?void 0x0:_0x18ec38?re(_0x1d3aff,_0x4a0989):_0x1d3aff,_0x327d5e=_0x15044d[_0x4c8783(0x214)]-0x1,_0x9d5e5f;_0x327d5e>=0x0;_0x327d5e--)(_0x9d5e5f=_0x15044d[_0x327d5e])&&(_0xcd3b4a=_0x9d5e5f(_0xcd3b4a)||_0xcd3b4a);return _0xcd3b4a;},N=(_0x331843,_0xf38588)=>(_0x24ebee,_0x537ffa)=>_0xf38588(_0x24ebee,_0x537ffa,_0x331843);let g=class extends _0x171224{constructor(_0x1f077e,_0x99fa39){const _0x8e3f7c=_0x2ca0df;super(),this[_0x8e3f7c(0x205)]=_0x1f077e,this['_threadCommentDataSource']=_0x99fa39,this[_0x8e3f7c(0x1e9)]();}[_0x2ca0df(0x1e9)](){const _0x1ff98e=_0x2ca0df;this[_0x1ff98e(0x205)]['dataSource']=this['_threadCommentDataSource'],this[_0x1ff98e(0x205)][_0x1ff98e(0x1ea)]=!0x1;}};g=te([N(0x0,_0x1962e6),N(0x1,_0x135ecc(f))],g);var se=Object[_0x2ca0df(0x23e)],oe=Object[_0x2ca0df(0x232)],ne=(_0x71a30e,_0x28b5d5,_0x4bfef6)=>_0x28b5d5 in _0x71a30e?se(_0x71a30e,_0x28b5d5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bfef6}):_0x71a30e[_0x28b5d5]=_0x4bfef6,ie=(_0x41256a,_0x17cc6d,_0x4e75b2,_0x5ea22d)=>{const _0x460959=_0x2ca0df;for(var _0x124c6a=_0x5ea22d>0x1?void 0x0:_0x5ea22d?oe(_0x17cc6d,_0x4e75b2):_0x17cc6d,_0x12b1fd=_0x41256a[_0x460959(0x214)]-0x1,_0x4a658a;_0x12b1fd>=0x0;_0x12b1fd--)(_0x4a658a=_0x41256a[_0x12b1fd])&&(_0x124c6a=_0x4a658a(_0x124c6a)||_0x124c6a);return _0x124c6a;},w=(_0x4f0911,_0x180f72)=>(_0x34ec3d,_0x23e312)=>_0x180f72(_0x34ec3d,_0x23e312,_0x4f0911),$=(_0x3f3bff,_0x2d91f5,_0x930e0e)=>ne(_0x3f3bff,typeof _0x2d91f5!='symbol'?_0x2d91f5+'':_0x2d91f5,_0x930e0e);let b=class extends _0x53c000{constructor(_0x1ddeb4=M,_0x2301f2,_0x4ad2dc){const _0x398f6a=_0x2ca0df;super(),this[_0x398f6a(0x1fd)]=_0x1ddeb4,this[_0x398f6a(0x1ec)]=_0x2301f2,this['_configService']=_0x4ad2dc;const {..._0x4ac078}=_0x2cfc39({},M,this[_0x398f6a(0x1fd)]);this[_0x398f6a(0x203)][_0x398f6a(0x238)](z,_0x4ac078);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x2cc924=>{const _0x4a3b30=_0x4078;this[_0x4a3b30(0x1ec)][_0x4a3b30(0x242)](_0x2cc924);});}[_0x2ca0df(0x21e)](){const _0x1a97ae=_0x2ca0df;this[_0x1a97ae(0x1ec)][_0x1a97ae(0x215)](g),this[_0x1a97ae(0x1ec)][_0x1a97ae(0x215)](S);}};$(b,_0x2ca0df(0x208),W),$(b,_0x2ca0df(0x22f),_0x1069d1[_0x2ca0df(0x22b)]),b=ie([_0x44b7a4(_0x3f5888,_0x2bfc00,_0x281db2),w(0x1,_0x135ecc(_0x2d6f6e)),w(0x2,_0x589df9)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x3e35af,_0x4061f9){const _0x10a6a8=_0x29a1,_0x32fa74=_0x3e35af();while(!![]){try{const _0x5b9d03=parseInt(_0x10a6a8(0xa3))/0x1*(-parseInt(_0x10a6a8(0x9c))/0x2)+parseInt(_0x10a6a8(0x83))/0x3*(parseInt(_0x10a6a8(0xa8))/0x4)+parseInt(_0x10a6a8(0x79))/0x5+parseInt(_0x10a6a8(0x8d))/0x6+parseInt(_0x10a6a8(0xa9))/0x7*(-parseInt(_0x10a6a8(0x102))/0x8)+parseInt(_0x10a6a8(0xc8))/0x9+-parseInt(_0x10a6a8(0xf5))/0xa;if(_0x5b9d03===_0x4061f9)break;else _0x32fa74['push'](_0x32fa74['shift']());}catch(_0x3320be){_0x32fa74['push'](_0x32fa74['shift']());}}}(_0x32c8,0x93a8e),function(_0x571cf1,_0x39749f){const _0x4bb187=_0x29a1;typeof exports==_0x4bb187(0xd4)&&typeof module<'u'?_0x39749f(exports,require(_0x4bb187(0xf0)),require(_0x4bb187(0xd0)),require('@univerjs/core'),require(_0x4bb187(0xfc)),require(_0x4bb187(0x96)),require(_0x4bb187(0xc4)),require(_0x4bb187(0xe2))):typeof define==_0x4bb187(0xb6)&&define['amd']?define([_0x4bb187(0xae),_0x4bb187(0xf0),'@univerjs-pro/license',_0x4bb187(0xd2),_0x4bb187(0xfc),'@univerjs/thread-comment',_0x4bb187(0xc4),'@univerjs/network'],_0x39749f):(_0x571cf1=typeof globalThis<'u'?globalThis:_0x571cf1||self,_0x39749f(_0x571cf1[_0x4bb187(0x7b)]={},_0x571cf1['UniverProCollaborationClient'],_0x571cf1['UniverProLicense'],_0x571cf1[_0x4bb187(0x84)],_0x571cf1['UniverThreadCommentUi'],_0x571cf1['UniverThreadComment'],_0x571cf1[_0x4bb187(0xc4)],_0x571cf1[_0x4bb187(0x100)]));}(this,function(_0x289463,_0x480e08,_0x19b191,_0x38b9c5,_0x2813cc,_0x4c9be2,_0x5e21de,_0x30fce7){'use strict';const _0x5115ad=_0x29a1;const _0x148033='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x194e5b=(_0x1cbdc9=>(_0x1cbdc9[_0x1cbdc9[_0x5115ad(0xcb)]=0x0]='OpenOrReOpen',_0x1cbdc9[_0x1cbdc9[_0x5115ad(0xe0)]=0x1]=_0x5115ad(0xe0),_0x1cbdc9[_0x1cbdc9['UNRECOGNIZED']=-0x1]=_0x5115ad(0xdb),_0x1cbdc9))(_0x194e5b||{}),_0x564e94=(_0xf90348=>(_0xf90348[_0xf90348[_0x5115ad(0xb7)]=0x0]=_0x5115ad(0xb7),_0xf90348[_0xf90348[_0x5115ad(0x7d)]=0x1]='Add',_0xf90348[_0xf90348[_0x5115ad(0xc5)]=0x2]=_0x5115ad(0xc5),_0xf90348[_0xf90348[_0x5115ad(0xe4)]=0x3]=_0x5115ad(0xe4),_0xf90348[_0xf90348[_0x5115ad(0xe9)]=0x4]=_0x5115ad(0xe9),_0xf90348[_0xf90348[_0x5115ad(0xca)]=0x5]=_0x5115ad(0xca),_0xf90348[_0xf90348['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xf90348))(_0x564e94||{});const _0x4e0bc7=_0x4a0e0e=>_0x38b9c5['dayjs'](new Date(+_0x4a0e0e))[_0x5115ad(0xb1)]('YYYY/MM/DD\x20HH:mm'),_0x189ea9=async(_0x20827d,_0x31bae5)=>{const _0x3f39ea=_0x5115ad,_0x3abfd3=_0x20827d[_0x3f39ea(0x91)](_0x38b9c5[_0x3f39ea(0x8c)]),_0x494a5d=_0x20827d[_0x3f39ea(0x91)](_0x30fce7[_0x3f39ea(0x7f)]);_0x31bae5[_0x3f39ea(0x7e)](_0x2a6690=>{const _0x545c83=_0x3f39ea;_0x3abfd3[_0x545c83(0xd8)](_0x2a6690)&&_0x31bae5[_0x545c83(0x85)](_0x2a6690);}),_0x31bae5[_0x3f39ea(0x90)]&&(await _0x494a5d[_0x3f39ea(0x91)](_0x3f39ea(0xc1),{'params':{'userIDs':[..._0x31bae5]}}))['body'][_0x3f39ea(0x99)]['forEach'](_0x58a81d=>{const _0xe081a9=_0x3f39ea;_0x58a81d&&_0x3abfd3[_0xe081a9(0xe6)](_0x58a81d);});};var _0x247b26=Object[_0x5115ad(0x95)],_0x12b0de=(_0x4767f5,_0x18d27d,_0x445480,_0x35e816)=>{const _0x476b8b=_0x5115ad;for(var _0x2f669c=_0x35e816>0x1?void 0x0:_0x35e816?_0x247b26(_0x18d27d,_0x445480):_0x18d27d,_0x5b8189=_0x4767f5[_0x476b8b(0xb3)]-0x1,_0x2af04a;_0x5b8189>=0x0;_0x5b8189--)(_0x2af04a=_0x4767f5[_0x5b8189])&&(_0x2f669c=_0x2af04a(_0x2f669c)||_0x2f669c);return _0x2f669c;},_0x3507dd=(_0x545ab0,_0x1f796a)=>(_0x1c2d81,_0x65a7af)=>_0x1f796a(_0x1c2d81,_0x65a7af,_0x545ab0);let _0x16ad41=class extends _0x38b9c5['Disposable']{constructor(_0x3eb864,_0x47c194,_0x1c9567,_0x553160){const _0x55576c=_0x5115ad;super(),this[_0x55576c(0xea)]=_0x3eb864,this['_threadCommentModel']=_0x47c194,this['_userService']=_0x1c9567,this[_0x55576c(0x89)]=_0x553160,this[_0x55576c(0xf7)](),this['_initUserSync']();}[_0x5115ad(0xec)](){const _0x4325c3=_0x5115ad;this[_0x4325c3(0xf1)](this[_0x4325c3(0xf6)][_0x4325c3(0x7c)][_0x4325c3(0xa5)](_0x5e21de[_0x4325c3(0xbe)](0x10))[_0x4325c3(0xa6)](_0x3c0634=>{const _0x3dc77d=_0x4325c3,_0x2831c6=new Set();_0x3c0634[_0x3dc77d(0x7e)](_0x47c742=>{const _0x1346b5=_0x3dc77d;switch(_0x47c742[_0x1346b5(0xce)]){case _0x1346b5(0xf4):{const _0x2310c4=_0x47c742[_0x1346b5(0xfb)][_0x1346b5(0xeb)];_0x2831c6[_0x1346b5(0xf4)](_0x2310c4);break;}}}),_0x189ea9(this[_0x3dc77d(0x89)],_0x2831c6);}));}[_0x5115ad(0xf7)](){const _0x568e43=_0x5115ad;this[_0x568e43(0xf1)](this[_0x568e43(0xea)][_0x568e43(0x7c)][_0x568e43(0xa6)](async _0x22da53=>{const _0x142c76=_0x568e43;var _0x4ef583,_0xe12de2,_0x4590d0,_0x86d20c;const _0x44df97=(_0x4ef583=this[_0x142c76(0xf6)][_0x142c76(0x86)](_0x22da53[_0x142c76(0xb2)])['find'](_0x422dce=>_0x422dce[_0x142c76(0x80)]===_0x22da53[_0x142c76(0x80)]))==null?void 0x0:_0x4ef583[_0x142c76(0xa0)];if(!_0x44df97)return;const {unitId:_0x53f504,subUnitId:_0xe2963f}=_0x44df97;switch(_0x22da53[_0x142c76(0xe5)]&&this[_0x142c76(0x9f)]['addUser'](_0x22da53[_0x142c76(0xe5)]),_0x22da53['type']){case _0x564e94['Add']:break;case _0x564e94[_0x142c76(0xc5)]:{this[_0x142c76(0xf6)][_0x142c76(0xb0)](_0x53f504,_0xe2963f,{'unitId':_0x53f504,'subUnitId':_0xe2963f,'ref':'','id':_0x22da53[_0x142c76(0x82)],'dT':_0x4e0bc7(+_0x22da53[_0x142c76(0xc2)]),'threadId':_0x22da53[_0x142c76(0x80)],'personId':(_0x4590d0=(_0xe12de2=_0x22da53['user'])==null?void 0x0:_0xe12de2['userID'])!=null?_0x4590d0:_0x22da53[_0x142c76(0x8e)],'text':JSON[_0x142c76(0xfa)](_0x22da53[_0x142c76(0xba)]),'parentId':_0x44df97['id']});break;}case _0x564e94['Delete']:{const _0x42d667=this[_0x142c76(0xf6)]['getComment'](_0x53f504,_0xe2963f,_0x22da53[_0x142c76(0x82)]);_0x42d667&&_0x42d667[_0x142c76(0x78)]&&this[_0x142c76(0xf6)][_0x142c76(0xa7)](_0x53f504,_0xe2963f,_0x22da53[_0x142c76(0x82)]);break;}case _0x564e94['Edit']:{this['_threadCommentModel']['updateComment'](_0x53f504,_0xe2963f,{'commentId':_0x22da53[_0x142c76(0x82)],'text':JSON['parse'](_0x22da53[_0x142c76(0xba)])});break;}case _0x564e94[_0x142c76(0xca)]:{const _0x3567d9=(_0x86d20c=this[_0x142c76(0xf6)]['getUnit'](_0x22da53['unitId'])[_0x142c76(0xb5)](_0x491748=>_0x491748['threadId']===_0x22da53[_0x142c76(0x80)]))==null?void 0x0:_0x86d20c[_0x142c76(0xa0)];_0x3567d9&&this[_0x142c76(0xf6)][_0x142c76(0xe8)](_0x53f504,_0xe2963f,_0x3567d9['id'],_0x22da53[_0x142c76(0xfd)]===_0x194e5b[_0x142c76(0xe0)]);break;}}}));}};_0x16ad41=_0x12b0de([_0x3507dd(0x0,_0x38b9c5[_0x5115ad(0xc0)](_0x480e08[_0x5115ad(0xdf)])),_0x3507dd(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x4c9be2[_0x5115ad(0xb9)])),_0x3507dd(0x2,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x8c)])),_0x3507dd(0x3,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x98)]))],_0x16ad41);const _0x4d817a=_0x5115ad(0xff),_0x18cc61={};var _0x502638=Object['getOwnPropertyDescriptor'],_0x9346b6=(_0x5eff2b,_0x11909b,_0xde0ce4,_0x452637)=>{const _0x43ac0d=_0x5115ad;for(var _0x1bc1cf=_0x452637>0x1?void 0x0:_0x452637?_0x502638(_0x11909b,_0xde0ce4):_0x11909b,_0x514b7f=_0x5eff2b[_0x43ac0d(0xb3)]-0x1,_0x408030;_0x514b7f>=0x0;_0x514b7f--)(_0x408030=_0x5eff2b[_0x514b7f])&&(_0x1bc1cf=_0x408030(_0x1bc1cf)||_0x1bc1cf);return _0x1bc1cf;},_0x224e4f=(_0x22d7f9,_0x13cdca)=>(_0x4fdd61,_0x5ed191)=>_0x13cdca(_0x4fdd61,_0x5ed191,_0x22d7f9);function _0x1a959d(_0x26e2b5,_0x48983c){const _0x1ee7b3=_0x5115ad,_0xa6bca1=_0x26e2b5[_0x1ee7b3(0x9b)][0x0];return{..._0x48983c,'id':_0xa6bca1[_0x1ee7b3(0x82)],'resolved':_0x26e2b5[_0x1ee7b3(0xfd)]===0x1,'dT':_0x4e0bc7(_0xa6bca1['createTimestamp']),'personId':_0xa6bca1[_0x1ee7b3(0x8e)],'threadId':_0xa6bca1[_0x1ee7b3(0x80)]};}function _0xd860b7(_0xf6362c,_0x27fe30,_0x47c319){const _0x413760=_0x5115ad;var _0x33632a,_0x289b37;if(((_0x289b37=(_0x33632a=_0xf6362c==null?void 0x0:_0xf6362c[_0x413760(0x9b)])==null?void 0x0:_0x33632a['length'])!=null?_0x289b37:0x0)>0x0){const _0x2c29c6=(_0x2e2b71,_0x3146e4)=>({'id':_0x2e2b71[_0x413760(0x82)],'threadId':_0x2e2b71[_0x413760(0x80)],'dT':_0x4e0bc7(_0x2e2b71[_0x413760(0xc2)]),'personId':_0x2e2b71['userId'],'resolved':_0xf6362c[_0x413760(0xfd)]===_0x194e5b['Solved'],'unitId':_0x27fe30,'subUnitId':_0x47c319,'text':JSON['parse'](_0x2e2b71[_0x413760(0xba)]),'parentId':_0x3146e4}),_0x53d100=_0x2c29c6(_0xf6362c['replies'][0x0]);return{..._0x53d100,'children':_0xf6362c[_0x413760(0x9b)][_0x413760(0xab)](0x1)[_0x413760(0xbc)](_0x3fcaa6=>_0x2c29c6(_0x3fcaa6,_0x53d100['id']))};}return null;}let _0x4251fc=class{constructor(_0x1537c0,_0x53f1ed,_0x3e10e1,_0x33204e){const _0x2ac62f=_0x5115ad;this[_0x2ac62f(0xcf)]=_0x1537c0,this[_0x2ac62f(0x9f)]=_0x53f1ed,this[_0x2ac62f(0xe3)]=_0x3e10e1,this[_0x2ac62f(0x89)]=_0x33204e;}async[_0x5115ad(0xb0)](_0x372010){const _0x5f1691=_0x5115ad;var _0x42f3ed,_0x56269b;const {parentId:_0x4b7108,unitId:_0x1bdd54,text:_0x19a278,threadId:_0x41d163}=_0x372010,_0x3a8530=(_0x56269b=(_0x42f3ed=_0x19a278[_0x5f1691(0xfe)])==null?void 0x0:_0x42f3ed['filter'](_0x458aa7=>_0x458aa7[_0x5f1691(0xa1)]===_0x38b9c5[_0x5f1691(0x9d)]['COMMENT'])['map'](_0x2d5d39=>_0x2d5d39[_0x5f1691(0xad)]))!=null?_0x56269b:[],_0x45cbe9=JSON[_0x5f1691(0xa4)](_0x19a278),_0x3ea819=(await this[_0x5f1691(0xe3)][_0x5f1691(0xb8)](_0x1bdd54))[_0x5f1691(0x94)]();if(_0x4b7108){const _0x1a63ff={'memberId':_0x3ea819,'unitId':_0x1bdd54,'content':_0x45cbe9,'mention':_0x3a8530,'threadId':_0x41d163},_0x405bbf=(await this['_httpService'][_0x5f1691(0xf8)](_0x5f1691(0xc6)+_0x1bdd54+_0x5f1691(0xdd),{'body':_0x1a63ff}))[_0x5f1691(0xc9)][_0x5f1691(0xbf)];return{..._0x372010,'id':_0x405bbf[_0x5f1691(0x82)],'dT':_0x38b9c5['dayjs'](+_0x405bbf[_0x5f1691(0xc2)])[_0x5f1691(0xb1)](_0x5f1691(0x8b)),'personId':_0x405bbf[_0x5f1691(0x8e)]};}else{const _0x35eb19={'memberId':_0x3ea819,'unitId':_0x1bdd54,'content':_0x45cbe9,'mention':_0x3a8530},_0x76a88d=await this['_httpService'][_0x5f1691(0xf8)](_0x5f1691(0xc6)+_0x1bdd54+_0x5f1691(0x8a),{'body':_0x35eb19});return _0x1a959d(_0x76a88d['body'][_0x5f1691(0x9e)],_0x372010);}}async[_0x5115ad(0xcc)](_0x5c884e){const _0x5a763d=_0x5115ad;var _0x895496,_0x2f084b;const {text:_0x3ced22,unitId:_0x2968be}=_0x5c884e,_0x47ef16=(_0x2f084b=(_0x895496=_0x3ced22[_0x5a763d(0xfe)])==null?void 0x0:_0x895496[_0x5a763d(0x7a)](_0x15bc1d=>_0x15bc1d[_0x5a763d(0xa1)]===_0x38b9c5[_0x5a763d(0x9d)][_0x5a763d(0xf9)])[_0x5a763d(0xbc)](_0x61e378=>_0x61e378[_0x5a763d(0xad)]))!=null?_0x2f084b:[],_0x4279d6=JSON[_0x5a763d(0xa4)](_0x3ced22),_0x186cb7=_0x5c884e['threadId'],_0x22e09f=_0x5c884e['id'],_0x4561b0={'memberId':(await this[_0x5a763d(0xe3)][_0x5a763d(0xb8)](_0x2968be))[_0x5a763d(0x94)](),'unitId':_0x2968be,'threadId':_0x186cb7,'mention':_0x47ef16,'content':_0x4279d6,'replyId':_0x22e09f},_0x241880=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2968be+_0x5a763d(0xf2),{'body':_0x4561b0});return!_0x241880[_0x5a763d(0xc9)][_0x5a763d(0xcd)]||_0x241880[_0x5a763d(0xc9)][_0x5a763d(0xcd)][_0x5a763d(0xde)]===0x1;}async[_0x5115ad(0xe8)](_0x17c2c7){const _0x55e35f=_0x5115ad,{unitId:_0x4d7054}=_0x17c2c7,_0x555a70=_0x17c2c7[_0x55e35f(0x80)],_0x38fa88={'memberId':this[_0x55e35f(0x9f)][_0x55e35f(0xd5)]()[_0x55e35f(0x81)],'unitId':_0x4d7054,'threadId':_0x555a70,'solved':_0x17c2c7[_0x55e35f(0x87)]?_0x194e5b[_0x55e35f(0xe0)]:_0x194e5b[_0x55e35f(0xcb)]},_0x2197e5=await this['_httpService'][_0x55e35f(0xf8)](_0x55e35f(0xc6)+_0x4d7054+_0x55e35f(0x93),{'body':_0x38fa88});return!_0x2197e5[_0x55e35f(0xc9)][_0x55e35f(0xcd)]||_0x2197e5['body'][_0x55e35f(0xcd)][_0x55e35f(0xde)]===0x1;}async[_0x5115ad(0xa7)](_0x2751d5,_0x150df8,_0x2d3598,_0x2f2b88){const _0x451144=_0x5115ad,_0x42dd73={'memberId':(await this[_0x451144(0xe3)]['requireSession'](_0x2751d5))[_0x451144(0x94)](),'threadId':_0x2d3598,'replyId':_0x2f2b88,'unitId':_0x2751d5},_0x365a49=await this[_0x451144(0xcf)][_0x451144(0xf8)]('/universer-api/comment/unit/'+_0x2751d5+'/delete',{'body':_0x42dd73});return!_0x365a49[_0x451144(0xc9)][_0x451144(0xcd)]||_0x365a49[_0x451144(0xc9)][_0x451144(0xcd)]['code']===0x1;}async[_0x5115ad(0x9a)](_0xaae682,_0x4b6e3a,_0x844d3b){const _0x137288=_0x5115ad,_0x4eb079={'unitId':_0xaae682,'threadId':_0x844d3b},_0x557dfa=await this['_httpService']['post'](_0x137288(0xc6)+_0xaae682+'/list',{'body':_0x4eb079}),_0x3fd88a=_0x844d3b['map'](_0x129f19=>_0xd860b7(_0x557dfa[_0x137288(0xc9)][_0x137288(0xd7)][_0x129f19],_0xaae682,_0x4b6e3a))['filter'](Boolean);return Object['values'](_0x557dfa[_0x137288(0xc9)][_0x137288(0x99)])[_0x137288(0x7e)](_0x3dec8d=>{const _0x3499a3=_0x137288;this[_0x3499a3(0x9f)]['addUser'](_0x3dec8d);}),_0x3fd88a;}[_0x5115ad(0xa2)](_0xb0999a){const _0xdd977f=_0x5115ad;return{'id':_0xb0999a['id'],'threadId':_0xb0999a['threadId'],'ref':_0xb0999a[_0xdd977f(0x88)]};}};_0x4251fc=_0x9346b6([_0x224e4f(0x0,_0x38b9c5[_0x5115ad(0xc0)](_0x30fce7[_0x5115ad(0x7f)])),_0x224e4f(0x1,_0x38b9c5['Inject'](_0x38b9c5[_0x5115ad(0x8c)])),_0x224e4f(0x2,_0x38b9c5[_0x5115ad(0xc0)](_0x480e08[_0x5115ad(0xed)])),_0x224e4f(0x3,_0x38b9c5['Inject'](_0x38b9c5['Injector']))],_0x4251fc);var _0x40a728=Object['getOwnPropertyDescriptor'],_0x26ff15=(_0x530c08,_0x224796,_0x43d815,_0xef45ae)=>{for(var _0x171810=_0xef45ae>0x1?void 0x0:_0xef45ae?_0x40a728(_0x224796,_0x43d815):_0x224796,_0x1a6c2a=_0x530c08['length']-0x1,_0x213c15;_0x1a6c2a>=0x0;_0x1a6c2a--)(_0x213c15=_0x530c08[_0x1a6c2a])&&(_0x171810=_0x213c15(_0x171810)||_0x171810);return _0x171810;},_0x37aff=(_0x36be24,_0x217f37)=>(_0x4dcec1,_0x17fff4)=>_0x217f37(_0x4dcec1,_0x17fff4,_0x36be24);let _0x315825=class extends _0x38b9c5[_0x5115ad(0xdc)]{constructor(_0x2795d4,_0x10a4c7){const _0x2ade54=_0x5115ad;super(),this[_0x2ade54(0x103)]=_0x2795d4,this[_0x2ade54(0x92)]=_0x10a4c7,this[_0x2ade54(0xaf)]();}['_initDataSource'](){const _0xcf6852=_0x5115ad;this[_0xcf6852(0x103)][_0xcf6852(0xc3)]=this['_threadCommentDataSource'],this[_0xcf6852(0x103)][_0xcf6852(0x8f)]=!0x1;}};_0x315825=_0x26ff15([_0x37aff(0x0,_0x4c9be2[_0x5115ad(0xda)]),_0x37aff(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x4251fc))],_0x315825);var _0x2d9df2=Object['defineProperty'],_0x5075ab=Object[_0x5115ad(0x95)],_0x4fcf57=(_0x4abc21,_0x59dc7d,_0x388a3a)=>_0x59dc7d in _0x4abc21?_0x2d9df2(_0x4abc21,_0x59dc7d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x388a3a}):_0x4abc21[_0x59dc7d]=_0x388a3a,_0x50d142=(_0x1b915c,_0x353a4e,_0x212915,_0xc112d8)=>{for(var _0x56e24d=_0xc112d8>0x1?void 0x0:_0xc112d8?_0x5075ab(_0x353a4e,_0x212915):_0x353a4e,_0x1e80fd=_0x1b915c['length']-0x1,_0x43e1f1;_0x1e80fd>=0x0;_0x1e80fd--)(_0x43e1f1=_0x1b915c[_0x1e80fd])&&(_0x56e24d=_0x43e1f1(_0x56e24d)||_0x56e24d);return _0x56e24d;},_0x5d2dfa=(_0xcb6405,_0x24c56b)=>(_0x403766,_0x587072)=>_0x24c56b(_0x403766,_0x587072,_0xcb6405),_0x5c39c6=(_0x5771ce,_0x24a1f1,_0xc6175d)=>_0x4fcf57(_0x5771ce,typeof _0x24a1f1!=_0x5115ad(0xd3)?_0x24a1f1+'':_0x24a1f1,_0xc6175d);_0x289463['UniverThreadCommentDataSourcePlugin']=class extends _0x38b9c5[_0x5115ad(0xee)]{constructor(_0x4c4dec=_0x18cc61,_0x3753f9,_0x2f2ede){const _0x36cc0a=_0x5115ad;super(),this[_0x36cc0a(0xef)]=_0x4c4dec,this[_0x36cc0a(0x89)]=_0x3753f9,this['_configService']=_0x2f2ede;const {..._0x4b9daf}=_0x38b9c5['merge']({},_0x18cc61,this[_0x36cc0a(0xef)]);this[_0x36cc0a(0xd9)][_0x36cc0a(0x97)](_0x4d817a,_0x4b9daf);}[_0x5115ad(0xc7)](){const _0x182d6e=_0x5115ad;[[_0x4251fc],[_0x315825],[_0x16ad41]][_0x182d6e(0x7e)](_0x4b64b6=>{const _0x5c9739=_0x182d6e;this[_0x5c9739(0x89)][_0x5c9739(0xf4)](_0x4b64b6);});}[_0x5115ad(0xe1)](){this['_injector']['get'](_0x315825),this['_injector']['get'](_0x16ad41);}},_0x5c39c6(_0x289463['UniverThreadCommentDataSourcePlugin'],_0x5115ad(0xbb),_0x148033),_0x5c39c6(_0x289463[_0x5115ad(0xbd)],_0x5115ad(0xce),_0x38b9c5[_0x5115ad(0xac)][_0x5115ad(0xaa)]),_0x289463[_0x5115ad(0xbd)]=_0x50d142([_0x38b9c5[_0x5115ad(0xf3)](_0x2813cc[_0x5115ad(0xd1)],_0x480e08[_0x5115ad(0xe7)],_0x19b191['UniverLicensePlugin']),_0x5d2dfa(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x98)])),_0x5d2dfa(0x2,_0x38b9c5[_0x5115ad(0xb4)])],_0x289463[_0x5115ad(0xbd)]),Object[_0x5115ad(0xd6)](_0x289463,Symbol['toStringTag'],{'value':_0x5115ad(0x101)});}));function _0x29a1(_0x3f8d0b,_0x181dbb){const _0x32c8ec=_0x32c8();return _0x29a1=function(_0x29a144,_0xca0f61){_0x29a144=_0x29a144-0x78;let _0x3727b1=_0x32c8ec[_0x29a144];return _0x3727b1;},_0x29a1(_0x3f8d0b,_0x181dbb);}function _0x32c8(){const _0x3ddf78=['deleteComment','12448glHwDZ','4697qkdbqK','UNIVER_UNKNOWN','slice','UniverInstanceType','rangeId','exports','_initDataSource','addComment','format','unitId','length','IConfigService','find','function','Unknown','requireSession','ThreadCommentModel','content','pluginName','map','UniverThreadCommentDataSourcePlugin','bufferTime','reply','Inject','/universer-api/user/list','createTimestamp','dataSource','rxjs','Reply','/universer-api/comment/unit/','onStarting','6656256MeRNjl','body','Solve','OpenOrReOpen','updateComment','error','type','_httpService','@univerjs-pro/license','UniverThreadCommentUIPlugin','@univerjs/core','symbol','object','getCurrentUser','defineProperty','comments','getUser','_configService','IThreadCommentDataSourceService','UNRECOGNIZED','Disposable','/reply','code','CommentService','Solved','onReady','@univerjs/network','_sessionService','Edit','user','addUser','UniverCollaborationClientPlugin','resolveComment','Delete','_commentService','personId','_initUserSync','CollaborationSessionService','Plugin','_config','@univerjs-pro/collaboration-client','disposeWithMe','/edit','DependentOn','add','7005660XtoUjW','_threadCommentModel','_init','post','COMMENT','parse','payload','@univerjs/thread-comment-ui','solved','customRanges','thread-comment-data-source.config','UniverNetwork','Module','3424aCBDOb','_threadCommentDataSourceService','parentId','1319405EfKiHa','filter','UniverProThreadCommentDatasource','commentUpdate$','Add','forEach','HTTPService','threadId','userID','replyId','15ChErOt','UniverCore','delete','getUnit','resolved','ref','_injector','/add','YYYY/MM/DD\x20HH:mm','UserManagerService','6121488GykwFe','userId','syncUpdateMutationToColla','size','get','_threadCommentDataSource','/solved','getMemberID','getOwnPropertyDescriptor','@univerjs/thread-comment','setConfig','Injector','users','listComments','replies','893410xYQGIf','CustomRangeType','comment','_userService','root','rangeType','saveCommentToSnapshot','1hkUMgz','stringify','pipe','subscribe'];_0x32c8=function(){return _0x3ddf78;};return _0x32c8();}
1
+ function _0x49a2(_0x19476c,_0x2dd634){const _0x33a494=_0x33a4();return _0x49a2=function(_0x49a23d,_0x222320){_0x49a23d=_0x49a23d-0xce;let _0x492850=_0x33a494[_0x49a23d];return _0x492850;},_0x49a2(_0x19476c,_0x2dd634);}(function(_0x3f84a2,_0x5efc56){const _0x28b726=_0x49a2,_0x1df1cc=_0x3f84a2();while(!![]){try{const _0x149cbc=parseInt(_0x28b726(0x113))/0x1+-parseInt(_0x28b726(0xd5))/0x2*(-parseInt(_0x28b726(0xf1))/0x3)+-parseInt(_0x28b726(0x125))/0x4*(parseInt(_0x28b726(0xf2))/0x5)+parseInt(_0x28b726(0xd3))/0x6*(parseInt(_0x28b726(0x10b))/0x7)+parseInt(_0x28b726(0xfe))/0x8*(parseInt(_0x28b726(0xcf))/0x9)+parseInt(_0x28b726(0x145))/0xa*(parseInt(_0x28b726(0xf9))/0xb)+-parseInt(_0x28b726(0x151))/0xc;if(_0x149cbc===_0x5efc56)break;else _0x1df1cc['push'](_0x1df1cc['shift']());}catch(_0x2237cd){_0x1df1cc['push'](_0x1df1cc['shift']());}}}(_0x33a4,0x353c3),function(_0x1a627c,_0x37c463){const _0x13d9ca=_0x49a2;typeof exports=='object'&&typeof module<'u'?_0x37c463(exports,require(_0x13d9ca(0x13c)),require(_0x13d9ca(0x139)),require(_0x13d9ca(0x11b)),require(_0x13d9ca(0x147)),require(_0x13d9ca(0x106)),require(_0x13d9ca(0xf7)),require(_0x13d9ca(0xef))):typeof define==_0x13d9ca(0xe7)&&define['amd']?define([_0x13d9ca(0x10a),_0x13d9ca(0x13c),_0x13d9ca(0x139),_0x13d9ca(0x11b),_0x13d9ca(0x147),_0x13d9ca(0x106),_0x13d9ca(0xf7),_0x13d9ca(0xef)],_0x37c463):(_0x1a627c=typeof globalThis<'u'?globalThis:_0x1a627c||self,_0x37c463(_0x1a627c['UniverProThreadCommentDatasource']={},_0x1a627c['UniverProCollaborationClient'],_0x1a627c[_0x13d9ca(0xf4)],_0x1a627c[_0x13d9ca(0x127)],_0x1a627c['UniverThreadCommentUi'],_0x1a627c[_0x13d9ca(0x103)],_0x1a627c['rxjs'],_0x1a627c[_0x13d9ca(0x121)]));}(this,function(_0xca1b3c,_0x24e8f9,_0x54f684,_0x359562,_0x4cbf5e,_0x3c522f,_0x14a699,_0x4f6100){'use strict';const _0x42af87=_0x49a2;const _0x43e6cc=_0x42af87(0xed);var _0x40a9c3=(_0xb199ec=>(_0xb199ec[_0xb199ec['OpenOrReOpen']=0x0]=_0x42af87(0x142),_0xb199ec[_0xb199ec[_0x42af87(0xfa)]=0x1]=_0x42af87(0xfa),_0xb199ec[_0xb199ec[_0x42af87(0x101)]=-0x1]='UNRECOGNIZED',_0xb199ec))(_0x40a9c3||{}),_0x3de69b=(_0x2e8842=>(_0x2e8842[_0x2e8842[_0x42af87(0x108)]=0x0]=_0x42af87(0x108),_0x2e8842[_0x2e8842[_0x42af87(0x110)]=0x1]=_0x42af87(0x110),_0x2e8842[_0x2e8842['Reply']=0x2]=_0x42af87(0xd2),_0x2e8842[_0x2e8842[_0x42af87(0x133)]=0x3]='Edit',_0x2e8842[_0x2e8842[_0x42af87(0x12b)]=0x4]=_0x42af87(0x12b),_0x2e8842[_0x2e8842[_0x42af87(0xfc)]=0x5]=_0x42af87(0xfc),_0x2e8842[_0x2e8842[_0x42af87(0x101)]=-0x1]=_0x42af87(0x101),_0x2e8842))(_0x3de69b||{});const _0xbddb5b=_0x9c082c=>_0x359562[_0x42af87(0x13d)](new Date(+_0x9c082c))[_0x42af87(0xd4)](_0x42af87(0xde)),_0x24b137=async(_0x2f0e4a,_0x2b2193)=>{const _0x2544a9=_0x42af87,_0x1ef0b5=_0x2f0e4a[_0x2544a9(0x120)](_0x359562[_0x2544a9(0x124)]),_0xe18ceb=_0x2f0e4a[_0x2544a9(0x120)](_0x4f6100[_0x2544a9(0xd0)]);_0x2b2193[_0x2544a9(0x109)](_0x2cdb1c=>{const _0x1912c0=_0x2544a9;_0x1ef0b5[_0x1912c0(0x14f)](_0x2cdb1c)&&_0x2b2193[_0x1912c0(0x14e)](_0x2cdb1c);}),_0x2b2193['size']&&(await _0xe18ceb[_0x2544a9(0x120)](_0x2544a9(0x12d),{'params':{'userIDs':[..._0x2b2193]}}))['body'][_0x2544a9(0x137)]['forEach'](_0x102ff4=>{const _0x11e2f4=_0x2544a9;_0x102ff4&&_0x1ef0b5[_0x11e2f4(0x14a)](_0x102ff4);});};var _0x315a90=Object[_0x42af87(0xe0)],_0x5ab1d9=(_0x6e60b9,_0x12f991,_0x40ece2,_0x625cad)=>{for(var _0x14f65b=_0x625cad>0x1?void 0x0:_0x625cad?_0x315a90(_0x12f991,_0x40ece2):_0x12f991,_0x368672=_0x6e60b9['length']-0x1,_0x186c95;_0x368672>=0x0;_0x368672--)(_0x186c95=_0x6e60b9[_0x368672])&&(_0x14f65b=_0x186c95(_0x14f65b)||_0x14f65b);return _0x14f65b;},_0x1b8bed=(_0x2cb70c,_0x1b10e5)=>(_0x3aab94,_0x23219f)=>_0x1b10e5(_0x3aab94,_0x23219f,_0x2cb70c);let _0x2ae589=class extends _0x359562[_0x42af87(0xeb)]{constructor(_0xa9226d,_0x3a062d,_0x10694c,_0x20515e){const _0x220b23=_0x42af87;super(),this[_0x220b23(0x118)]=_0xa9226d,this['_threadCommentModel']=_0x3a062d,this[_0x220b23(0x144)]=_0x10694c,this[_0x220b23(0xfd)]=_0x20515e,this['_init'](),this[_0x220b23(0x107)]();}[_0x42af87(0x107)](){const _0x160fbe=_0x42af87;this[_0x160fbe(0x136)](this[_0x160fbe(0x131)][_0x160fbe(0x10c)]['pipe'](_0x14a699[_0x160fbe(0x10f)](0x10))[_0x160fbe(0xe3)](_0x15ac19=>{const _0xba143b=_0x160fbe,_0x25b98a=new Set();_0x15ac19[_0xba143b(0x109)](_0x4e6e9a=>{const _0x4b554d=_0xba143b;switch(_0x4e6e9a['type']){case'add':{const _0xd54425=_0x4e6e9a[_0x4b554d(0xdd)][_0x4b554d(0x146)];_0x25b98a['add'](_0xd54425);break;}}}),_0x24b137(this[_0xba143b(0xfd)],_0x25b98a);}));}[_0x42af87(0x104)](){const _0x47ff0f=_0x42af87;this[_0x47ff0f(0x136)](this['_commentService'][_0x47ff0f(0x10c)][_0x47ff0f(0xe3)](async _0x4cdf30=>{const _0x3acf6e=_0x47ff0f;var _0xd4f7cd,_0x5211b7,_0x58c8c4,_0xf5205;const _0x4e766f=(_0xd4f7cd=this[_0x3acf6e(0x131)]['getUnit'](_0x4cdf30['unitId'])['find'](_0xc49e1b=>_0xc49e1b['threadId']===_0x4cdf30[_0x3acf6e(0xe1)]))==null?void 0x0:_0xd4f7cd[_0x3acf6e(0x141)];if(!_0x4e766f)return;const {unitId:_0x105504,subUnitId:_0x386d18}=_0x4e766f;switch(_0x4cdf30[_0x3acf6e(0x13e)]&&this['_userService']['addUser'](_0x4cdf30[_0x3acf6e(0x13e)]),_0x4cdf30['type']){case _0x3de69b[_0x3acf6e(0x110)]:break;case _0x3de69b['Reply']:{this[_0x3acf6e(0x131)][_0x3acf6e(0xf3)](_0x105504,_0x386d18,{'unitId':_0x105504,'subUnitId':_0x386d18,'ref':'','id':_0x4cdf30[_0x3acf6e(0x134)],'dT':_0xbddb5b(+_0x4cdf30[_0x3acf6e(0x12a)]),'threadId':_0x4cdf30[_0x3acf6e(0xe1)],'personId':(_0x58c8c4=(_0x5211b7=_0x4cdf30[_0x3acf6e(0x13e)])==null?void 0x0:_0x5211b7[_0x3acf6e(0xf8)])!=null?_0x58c8c4:_0x4cdf30['userId'],'text':JSON['parse'](_0x4cdf30[_0x3acf6e(0x14d)]),'parentId':_0x4e766f['id']});break;}case _0x3de69b[_0x3acf6e(0x12b)]:{const _0x323c71=this['_threadCommentModel']['getComment'](_0x105504,_0x386d18,_0x4cdf30['replyId']);_0x323c71&&_0x323c71[_0x3acf6e(0xff)]&&this[_0x3acf6e(0x131)][_0x3acf6e(0x112)](_0x105504,_0x386d18,_0x4cdf30[_0x3acf6e(0x134)]);break;}case _0x3de69b[_0x3acf6e(0x133)]:{this['_threadCommentModel']['updateComment'](_0x105504,_0x386d18,{'commentId':_0x4cdf30['replyId'],'text':JSON[_0x3acf6e(0xf0)](_0x4cdf30[_0x3acf6e(0x14d)])});break;}case _0x3de69b['Solve']:{const _0x100f03=(_0xf5205=this[_0x3acf6e(0x131)][_0x3acf6e(0x14c)](_0x4cdf30[_0x3acf6e(0x140)])[_0x3acf6e(0x100)](_0x3a5207=>_0x3a5207[_0x3acf6e(0xe1)]===_0x4cdf30[_0x3acf6e(0xe1)]))==null?void 0x0:_0xf5205[_0x3acf6e(0x141)];_0x100f03&&this[_0x3acf6e(0x131)]['resolveComment'](_0x105504,_0x386d18,_0x100f03['id'],_0x4cdf30['solved']===_0x40a9c3[_0x3acf6e(0xfa)]);break;}}}));}};_0x2ae589=_0x5ab1d9([_0x1b8bed(0x0,_0x359562[_0x42af87(0x148)](_0x24e8f9[_0x42af87(0x111)])),_0x1b8bed(0x1,_0x359562[_0x42af87(0x148)](_0x3c522f[_0x42af87(0xdc)])),_0x1b8bed(0x2,_0x359562[_0x42af87(0x148)](_0x359562[_0x42af87(0x124)])),_0x1b8bed(0x3,_0x359562[_0x42af87(0x148)](_0x359562[_0x42af87(0xfb)]))],_0x2ae589);const _0x36cc43=_0x42af87(0xd8),_0x3e3a20={};var _0x1fc11f=Object['getOwnPropertyDescriptor'],_0x5949ea=(_0x146ab6,_0x37a30c,_0x471975,_0x7955a)=>{const _0x3e087d=_0x42af87;for(var _0x291b91=_0x7955a>0x1?void 0x0:_0x7955a?_0x1fc11f(_0x37a30c,_0x471975):_0x37a30c,_0x21160d=_0x146ab6[_0x3e087d(0x150)]-0x1,_0x26cf49;_0x21160d>=0x0;_0x21160d--)(_0x26cf49=_0x146ab6[_0x21160d])&&(_0x291b91=_0x26cf49(_0x291b91)||_0x291b91);return _0x291b91;},_0x9e5896=(_0x34db04,_0x5ca1ac)=>(_0x4fd23b,_0xbd0fe8)=>_0x5ca1ac(_0x4fd23b,_0xbd0fe8,_0x34db04);function _0x3bcd0d(_0x5f2130,_0x43a7d0){const _0x33fcf8=_0x42af87,_0x52e980=_0x5f2130[_0x33fcf8(0x122)][0x0];return{..._0x43a7d0,'id':_0x52e980[_0x33fcf8(0x134)],'resolved':_0x5f2130[_0x33fcf8(0x13f)]===0x1,'dT':_0xbddb5b(_0x52e980['createTimestamp']),'personId':_0x52e980[_0x33fcf8(0xe4)],'threadId':_0x52e980[_0x33fcf8(0xe1)]};}function _0x4f3758(_0x489d38,_0x37543c,_0x9b69d3){const _0x3d2399=_0x42af87;var _0x1a18e8,_0x324f68;if(((_0x324f68=(_0x1a18e8=_0x489d38==null?void 0x0:_0x489d38[_0x3d2399(0x122)])==null?void 0x0:_0x1a18e8[_0x3d2399(0x150)])!=null?_0x324f68:0x0)>0x0){const _0x5ec627=(_0x5f71ab,_0xd61a53)=>({'id':_0x5f71ab['replyId'],'threadId':_0x5f71ab['threadId'],'dT':_0xbddb5b(_0x5f71ab['createTimestamp']),'personId':_0x5f71ab[_0x3d2399(0xe4)],'resolved':_0x489d38[_0x3d2399(0x13f)]===_0x40a9c3[_0x3d2399(0xfa)],'unitId':_0x37543c,'subUnitId':_0x9b69d3,'text':JSON[_0x3d2399(0xf0)](_0x5f71ab[_0x3d2399(0x14d)]),'parentId':_0xd61a53}),_0x8b479c=_0x5ec627(_0x489d38[_0x3d2399(0x122)][0x0]);return{..._0x8b479c,'children':_0x489d38['replies'][_0x3d2399(0xda)](0x1)[_0x3d2399(0x13a)](_0x464e15=>_0x5ec627(_0x464e15,_0x8b479c['id']))};}return null;}let _0x1655a0=class{constructor(_0x309145,_0x333772,_0x177d36,_0x5121f7){const _0x498464=_0x42af87;this[_0x498464(0x10d)]=_0x309145,this['_userService']=_0x333772,this[_0x498464(0x128)]=_0x177d36,this['_injector']=_0x5121f7;}async[_0x42af87(0xf3)](_0x1a55f2){const _0x2572a1=_0x42af87;var _0x1a7cc2,_0x34f4f0;const {parentId:_0x27fa5a,unitId:_0x2c8ccc,text:_0x55890b,threadId:_0x5cd7b0}=_0x1a55f2,_0x4f8c0d=(_0x34f4f0=(_0x1a7cc2=_0x55890b['customRanges'])==null?void 0x0:_0x1a7cc2[_0x2572a1(0x116)](_0x530364=>_0x530364[_0x2572a1(0x152)]===_0x359562['CustomRangeType'][_0x2572a1(0xd6)])[_0x2572a1(0x13a)](_0x3daf9b=>_0x3daf9b[_0x2572a1(0x12f)]))!=null?_0x34f4f0:[],_0x32de73=JSON[_0x2572a1(0xce)](_0x55890b),_0x53ee8a=(await this[_0x2572a1(0x128)][_0x2572a1(0x11a)](_0x2c8ccc))[_0x2572a1(0x129)]();if(_0x27fa5a){const _0x2196e1={'memberId':_0x53ee8a,'unitId':_0x2c8ccc,'content':_0x32de73,'mention':_0x4f8c0d,'threadId':_0x5cd7b0},_0x3faf0d=(await this['_httpService'][_0x2572a1(0x117)](_0x2572a1(0x138)+_0x2c8ccc+'/reply',{'body':_0x2196e1}))[_0x2572a1(0xd1)]['reply'];return{..._0x1a55f2,'id':_0x3faf0d[_0x2572a1(0x134)],'dT':_0x359562[_0x2572a1(0x13d)](+_0x3faf0d[_0x2572a1(0x12a)])[_0x2572a1(0xd4)](_0x2572a1(0xde)),'personId':_0x3faf0d[_0x2572a1(0xe4)]};}else{const _0x6082e={'memberId':_0x53ee8a,'unitId':_0x2c8ccc,'content':_0x32de73,'mention':_0x4f8c0d},_0x26a6b7=await this[_0x2572a1(0x10d)][_0x2572a1(0x117)](_0x2572a1(0x138)+_0x2c8ccc+_0x2572a1(0xdf),{'body':_0x6082e});return _0x3bcd0d(_0x26a6b7['body']['comment'],_0x1a55f2);}}async[_0x42af87(0x143)](_0x27753c){const _0x5358a9=_0x42af87;var _0x1cbeaa,_0x20fe84;const {text:_0x3ef9cc,unitId:_0x458033}=_0x27753c,_0x346317=(_0x20fe84=(_0x1cbeaa=_0x3ef9cc['customRanges'])==null?void 0x0:_0x1cbeaa[_0x5358a9(0x116)](_0x35dac9=>_0x35dac9[_0x5358a9(0x152)]===_0x359562[_0x5358a9(0x13b)][_0x5358a9(0xd6)])[_0x5358a9(0x13a)](_0x1019d2=>_0x1019d2[_0x5358a9(0x12f)]))!=null?_0x20fe84:[],_0x2cb090=JSON['stringify'](_0x3ef9cc),_0x32381b=_0x27753c['threadId'],_0x3752e7=_0x27753c['id'],_0x33d994={'memberId':(await this['_sessionService'][_0x5358a9(0x11a)](_0x458033))[_0x5358a9(0x129)](),'unitId':_0x458033,'threadId':_0x32381b,'mention':_0x346317,'content':_0x2cb090,'replyId':_0x3752e7},_0x1804ea=await this[_0x5358a9(0x10d)][_0x5358a9(0x117)]('/universer-api/comment/unit/'+_0x458033+'/edit',{'body':_0x33d994});return!_0x1804ea[_0x5358a9(0xd1)][_0x5358a9(0xee)]||_0x1804ea[_0x5358a9(0xd1)][_0x5358a9(0xee)][_0x5358a9(0x12c)]===0x1;}async['resolveComment'](_0x41c19e){const _0x58affd=_0x42af87,{unitId:_0x1d22f7}=_0x41c19e,_0x30beab=_0x41c19e[_0x58affd(0xe1)],_0x221177={'memberId':this[_0x58affd(0x144)]['getCurrentUser']()[_0x58affd(0xf8)],'unitId':_0x1d22f7,'threadId':_0x30beab,'solved':_0x41c19e[_0x58affd(0xec)]?_0x40a9c3[_0x58affd(0xfa)]:_0x40a9c3[_0x58affd(0x142)]},_0x5b74f5=await this[_0x58affd(0x10d)]['post'](_0x58affd(0x138)+_0x1d22f7+_0x58affd(0x132),{'body':_0x221177});return!_0x5b74f5[_0x58affd(0xd1)][_0x58affd(0xee)]||_0x5b74f5['body'][_0x58affd(0xee)][_0x58affd(0x12c)]===0x1;}async[_0x42af87(0x112)](_0x135fa0,_0x49e36e,_0x2defb8,_0x19c548){const _0x210f7f=_0x42af87,_0x5e7494={'memberId':(await this[_0x210f7f(0x128)][_0x210f7f(0x11a)](_0x135fa0))[_0x210f7f(0x129)](),'threadId':_0x2defb8,'replyId':_0x19c548,'unitId':_0x135fa0},_0x3bc457=await this[_0x210f7f(0x10d)][_0x210f7f(0x117)](_0x210f7f(0x138)+_0x135fa0+_0x210f7f(0xf6),{'body':_0x5e7494});return!_0x3bc457[_0x210f7f(0xd1)][_0x210f7f(0xee)]||_0x3bc457[_0x210f7f(0xd1)][_0x210f7f(0xee)][_0x210f7f(0x12c)]===0x1;}async[_0x42af87(0x11f)](_0x1af34a,_0x2d6f62,_0x7c4440){const _0x10ff67=_0x42af87,_0x951fc6={'unitId':_0x1af34a,'threadId':_0x7c4440},_0x1cf9b1=await this[_0x10ff67(0x10d)][_0x10ff67(0x117)](_0x10ff67(0x138)+_0x1af34a+_0x10ff67(0x149),{'body':_0x951fc6}),_0x45122f=_0x7c4440[_0x10ff67(0x13a)](_0xc41179=>_0x4f3758(_0x1cf9b1[_0x10ff67(0xd1)][_0x10ff67(0x11c)][_0xc41179],_0x1af34a,_0x2d6f62))[_0x10ff67(0x116)](Boolean);return Object[_0x10ff67(0x114)](_0x1cf9b1[_0x10ff67(0xd1)][_0x10ff67(0x137)])[_0x10ff67(0x109)](_0x1d2fa5=>{const _0x4eb971=_0x10ff67;this[_0x4eb971(0x144)]['addUser'](_0x1d2fa5);}),_0x45122f;}['saveCommentToSnapshot'](_0x2469bf){const _0x520149=_0x42af87;return{'id':_0x2469bf['id'],'threadId':_0x2469bf[_0x520149(0xe1)],'ref':_0x2469bf['ref']};}};_0x1655a0=_0x5949ea([_0x9e5896(0x0,_0x359562[_0x42af87(0x148)](_0x4f6100[_0x42af87(0xd0)])),_0x9e5896(0x1,_0x359562[_0x42af87(0x148)](_0x359562[_0x42af87(0x124)])),_0x9e5896(0x2,_0x359562[_0x42af87(0x148)](_0x24e8f9[_0x42af87(0x123)])),_0x9e5896(0x3,_0x359562[_0x42af87(0x148)](_0x359562[_0x42af87(0xfb)]))],_0x1655a0);var _0x2c0daf=Object[_0x42af87(0xe0)],_0x5e1287=(_0x1f1846,_0x3071fd,_0x138a90,_0x54ca2a)=>{const _0x12a215=_0x42af87;for(var _0x332c87=_0x54ca2a>0x1?void 0x0:_0x54ca2a?_0x2c0daf(_0x3071fd,_0x138a90):_0x3071fd,_0xabb8a=_0x1f1846[_0x12a215(0x150)]-0x1,_0x321d29;_0xabb8a>=0x0;_0xabb8a--)(_0x321d29=_0x1f1846[_0xabb8a])&&(_0x332c87=_0x321d29(_0x332c87)||_0x332c87);return _0x332c87;},_0x2c65e2=(_0x34a109,_0x15c6eb)=>(_0x5e563c,_0x44f776)=>_0x15c6eb(_0x5e563c,_0x44f776,_0x34a109);let _0x4ef1e3=class extends _0x359562[_0x42af87(0xeb)]{constructor(_0x2ffaed,_0x2aabe2){const _0x267e8f=_0x42af87;super(),this[_0x267e8f(0xe8)]=_0x2ffaed,this[_0x267e8f(0xd9)]=_0x2aabe2,this[_0x267e8f(0xe9)]();}['_initDataSource'](){const _0x2fb834=_0x42af87;this[_0x2fb834(0xe8)][_0x2fb834(0x153)]=this['_threadCommentDataSource'],this[_0x2fb834(0xe8)][_0x2fb834(0xd7)]=!0x1;}};_0x4ef1e3=_0x5e1287([_0x2c65e2(0x0,_0x3c522f[_0x42af87(0xe2)]),_0x2c65e2(0x1,_0x359562[_0x42af87(0x148)](_0x1655a0))],_0x4ef1e3);var _0x318717=Object[_0x42af87(0x130)],_0x599a23=Object['getOwnPropertyDescriptor'],_0x163505=(_0x4cd069,_0x5d2363,_0x1bb96e)=>_0x5d2363 in _0x4cd069?_0x318717(_0x4cd069,_0x5d2363,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1bb96e}):_0x4cd069[_0x5d2363]=_0x1bb96e,_0x130082=(_0x2eeeb2,_0x5812af,_0x19102a,_0x51d04f)=>{for(var _0x517499=_0x51d04f>0x1?void 0x0:_0x51d04f?_0x599a23(_0x5812af,_0x19102a):_0x5812af,_0x2472f4=_0x2eeeb2['length']-0x1,_0x9df5b7;_0x2472f4>=0x0;_0x2472f4--)(_0x9df5b7=_0x2eeeb2[_0x2472f4])&&(_0x517499=_0x9df5b7(_0x517499)||_0x517499);return _0x517499;},_0x333737=(_0x5ed2df,_0x443d39)=>(_0x55b36f,_0x631b08)=>_0x443d39(_0x55b36f,_0x631b08,_0x5ed2df),_0x19506d=(_0x11fcf6,_0xb0c161,_0x500025)=>_0x163505(_0x11fcf6,typeof _0xb0c161!=_0x42af87(0x10e)?_0xb0c161+'':_0xb0c161,_0x500025);_0xca1b3c[_0x42af87(0x11e)]=class extends _0x359562[_0x42af87(0x119)]{constructor(_0x36f6c0=_0x3e3a20,_0x52438b,_0x5f3eae){const _0x483f59=_0x42af87;super(),this['_config']=_0x36f6c0,this[_0x483f59(0xfd)]=_0x52438b,this[_0x483f59(0x102)]=_0x5f3eae;const {..._0x395579}=_0x359562[_0x483f59(0xf5)]({},_0x3e3a20,this['_config']);this[_0x483f59(0x102)][_0x483f59(0x115)](_0x36cc43,_0x395579);}[_0x42af87(0x126)](){const _0x1a6767=_0x42af87;[[_0x1655a0],[_0x4ef1e3],[_0x2ae589]][_0x1a6767(0x109)](_0x36c880=>{const _0x57cf18=_0x1a6767;this[_0x57cf18(0xfd)][_0x57cf18(0x135)](_0x36c880);});}[_0x42af87(0xdb)](){const _0x22aca3=_0x42af87;this[_0x22aca3(0xfd)]['get'](_0x4ef1e3),this[_0x22aca3(0xfd)][_0x22aca3(0x120)](_0x2ae589);}},_0x19506d(_0xca1b3c['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x43e6cc),_0x19506d(_0xca1b3c[_0x42af87(0x11e)],'type',_0x359562[_0x42af87(0xe6)][_0x42af87(0xe5)]),_0xca1b3c['UniverThreadCommentDataSourcePlugin']=_0x130082([_0x359562[_0x42af87(0x105)](_0x4cbf5e['UniverThreadCommentUIPlugin'],_0x24e8f9['UniverCollaborationClientPlugin'],_0x54f684[_0x42af87(0xea)]),_0x333737(0x1,_0x359562['Inject'](_0x359562[_0x42af87(0xfb)])),_0x333737(0x2,_0x359562[_0x42af87(0x14b)])],_0xca1b3c[_0x42af87(0x11e)]),Object[_0x42af87(0x130)](_0xca1b3c,Symbol[_0x42af87(0x11d)],{'value':_0x42af87(0x12e)});}));function _0x33a4(){const _0x26c630=['_init','DependentOn','@univerjs/thread-comment','_initUserSync','Unknown','forEach','exports','42UVKwpr','commentUpdate$','_httpService','symbol','bufferTime','Add','CommentService','deleteComment','411296YBMunP','values','setConfig','filter','post','_commentService','Plugin','requireSession','@univerjs/core','comments','toStringTag','UniverThreadCommentDataSourcePlugin','listComments','get','UniverNetwork','replies','CollaborationSessionService','UserManagerService','4TGNIGX','onStarting','UniverCore','_sessionService','getMemberID','createTimestamp','Delete','code','/universer-api/user/list','Module','rangeId','defineProperty','_threadCommentModel','/solved','Edit','replyId','add','disposeWithMe','users','/universer-api/comment/unit/','@univerjs-pro/license','map','CustomRangeType','@univerjs-pro/collaboration-client','dayjs','user','solved','unitId','root','OpenOrReOpen','updateComment','_userService','2924830OKjYVK','personId','@univerjs/thread-comment-ui','Inject','/list','addUser','IConfigService','getUnit','content','delete','getUser','length','14509380BAPpdw','rangeType','dataSource','stringify','45WIIumo','HTTPService','body','Reply','428058RVpzxy','format','114412muGyxs','COMMENT','syncUpdateMutationToColla','thread-comment-data-source.config','_threadCommentDataSource','slice','onReady','ThreadCommentModel','payload','YYYY/MM/DD\x20HH:mm','/add','getOwnPropertyDescriptor','threadId','IThreadCommentDataSourceService','subscribe','userId','UNIVER_UNKNOWN','UniverInstanceType','function','_threadCommentDataSourceService','_initDataSource','UniverLicensePlugin','Disposable','resolved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','error','@univerjs/network','parse','6bwZAwK','1106265dqyXEE','addComment','UniverProLicense','merge','/delete','rxjs','userID','11bxzBqB','Solved','Injector','Solve','_injector','643472RalWAk','parentId','find','UNRECOGNIZED','_configService','UniverThreadComment'];_0x33a4=function(){return _0x26c630;};return _0x33a4();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.7-experimental.20250331-fa407d3",
3
+ "version": "0.6.7-experimental.20250401-9542b43",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-fa407d3",
49
- "@univerjs-pro/license": "0.6.7-experimental.20250331-fa407d3",
50
- "@univerjs/core": "0.6.7-experimental.20250331-fa407d3",
48
+ "@univerjs-pro/collaboration-client": "0.6.7-experimental.20250401-9542b43",
49
+ "@univerjs/core": "0.6.7-experimental.20250401-9542b43",
50
+ "@univerjs-pro/license": "0.6.7-experimental.20250401-9542b43",
51
+ "@univerjs/network": "0.6.7-experimental.20250401-9542b43",
51
52
  "@univerjs/protocol": "0.1.45",
52
- "@univerjs/network": "0.6.7-experimental.20250331-fa407d3",
53
- "@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-fa407d3",
54
- "@univerjs/thread-comment": "0.6.7-experimental.20250331-fa407d3"
53
+ "@univerjs/thread-comment": "0.6.7-experimental.20250401-9542b43",
54
+ "@univerjs/thread-comment-ui": "0.6.7-experimental.20250401-9542b43"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",