@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-fa407d3 → 0.6.7-experimental.20250401-40103f6
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
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 _0x510256=_0x5c4c;(function(_0x45e35d,_0xe4ad7f){const _0x51264a=_0x5c4c,_0x5bcbcf=_0x45e35d();while(!![]){try{const _0x68d9ea=-parseInt(_0x51264a(0xdc))/0x1+-parseInt(_0x51264a(0xdd))/0x2+parseInt(_0x51264a(0xef))/0x3*(-parseInt(_0x51264a(0x12a))/0x4)+-parseInt(_0x51264a(0x118))/0x5*(-parseInt(_0x51264a(0xfd))/0x6)+parseInt(_0x51264a(0xf7))/0x7*(-parseInt(_0x51264a(0xe7))/0x8)+-parseInt(_0x51264a(0x124))/0x9+-parseInt(_0x51264a(0x113))/0xa*(-parseInt(_0x51264a(0x137))/0xb);if(_0x68d9ea===_0xe4ad7f)break;else _0x5bcbcf['push'](_0x5bcbcf['shift']());}catch(_0xe03413){_0x5bcbcf['push'](_0x5bcbcf['shift']());}}}(_0x2ed1,0x37aaf));Object[_0x510256(0xd8)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x510256(0xf4)),c=require(_0x510256(0x123)),j=require(_0x510256(0xc8)),M=require(_0x510256(0xd2)),w=require('rxjs'),P=require(_0x510256(0x134)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x16c2f9=>(_0x16c2f9[_0x16c2f9[_0x510256(0xc5)]=0x0]=_0x510256(0xc5),_0x16c2f9[_0x16c2f9['Solved']=0x1]=_0x510256(0x10e),_0x16c2f9[_0x16c2f9[_0x510256(0x114)]=-0x1]=_0x510256(0x114),_0x16c2f9))(I||{}),v=(_0x23ac08=>(_0x23ac08[_0x23ac08[_0x510256(0x101)]=0x0]=_0x510256(0x101),_0x23ac08[_0x23ac08[_0x510256(0xf5)]=0x1]=_0x510256(0xf5),_0x23ac08[_0x23ac08['Reply']=0x2]=_0x510256(0x109),_0x23ac08[_0x23ac08['Edit']=0x3]='Edit',_0x23ac08[_0x23ac08[_0x510256(0xea)]=0x4]='Delete',_0x23ac08[_0x23ac08[_0x510256(0xda)]=0x5]='Solve',_0x23ac08[_0x23ac08[_0x510256(0x114)]=-0x1]=_0x510256(0x114),_0x23ac08))(v||{});const f=_0xc03932=>c[_0x510256(0x100)](new Date(+_0xc03932))['format'](_0x510256(0x129)),R=async(_0x3b1d4d,_0x373ae3)=>{const _0x351e78=_0x510256,_0x244bb9=_0x3b1d4d[_0x351e78(0x12f)](c[_0x351e78(0xd1)]),_0x5b7c98=_0x3b1d4d['get'](P[_0x351e78(0xd0)]);_0x373ae3[_0x351e78(0x128)](_0x5542de=>{const _0x357ed2=_0x351e78;_0x244bb9[_0x357ed2(0x11b)](_0x5542de)&&_0x373ae3[_0x357ed2(0xcd)](_0x5542de);}),_0x373ae3[_0x351e78(0x110)]&&(await _0x5b7c98[_0x351e78(0x12f)](_0x351e78(0xdb),{'params':{'userIDs':[..._0x373ae3]}}))[_0x351e78(0x11a)][_0x351e78(0x10b)][_0x351e78(0x128)](_0x4baa55=>{const _0x11cf77=_0x351e78;_0x4baa55&&_0x244bb9[_0x11cf77(0xc2)](_0x4baa55);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x45f5cb,_0x4a6410,_0x22dd73,_0x4ed943)=>{for(var _0x2beccb=_0x4ed943>0x1?void 0x0:_0x4ed943?$(_0x4a6410,_0x22dd73):_0x4a6410,_0x1daaee=_0x45f5cb['length']-0x1,_0x3dd1e7;_0x1daaee>=0x0;_0x1daaee--)(_0x3dd1e7=_0x45f5cb[_0x1daaee])&&(_0x2beccb=_0x3dd1e7(_0x2beccb)||_0x2beccb);return _0x2beccb;},S=(_0x343581,_0x5cf03f)=>(_0x1f4e0e,_0x37ae29)=>_0x5cf03f(_0x1f4e0e,_0x37ae29,_0x343581);function _0x2ed1(){const _0x284258=['138bhvkSq','ThreadCommentModel','thread-comment-data-source.config','disposeWithMe','_injector','@univerjs-pro/license','Add','_threadCommentDataSource','1438731sMxtDF','resolveComment','getMemberID','code','Edit','dataSource','30hiWsNN','solved','values','dayjs','Unknown','map','pluginName','getComment','bufferTime','merge','threadId','/universer-api/comment/unit/','Reply','CommentService','users','Inject','DependentOn','Solved','subscribe','size','userID','CustomRangeType','80dgRmfE','UNRECOGNIZED','_init','_sessionService','parse','76070EwuLhA','UniverThreadCommentDataSourcePlugin','body','getUser','createTimestamp','format','requireSession','user','Plugin','CollaborationSessionService','Disposable','@univerjs/core','1971675gIvBHN','setConfig','type','updateComment','forEach','YYYY/MM/DD\x20HH:mm','29244oWCRWe','rangeType','parentId','unitId','UNIVER_UNKNOWN','get','symbol','replyId','deleteComment','comments','@univerjs/network','getUnit','customRanges','2009293XlPenF','replies','reply','add','addComment','_httpService','ref','pipe','_config','addUser','content','COMMENT','OpenOrReOpen','_threadCommentDataSourceService','rangeId','@univerjs/thread-comment-ui','root','_configService','UniverThreadCommentUIPlugin','find','delete','UniverCollaborationClientPlugin','onReady','HTTPService','UserManagerService','@univerjs/thread-comment','error','resolved','comment','_userService','getOwnPropertyDescriptor','defineProperty','IConfigService','Solve','/universer-api/user/list','313523iKkHCE','469844tQJfXb','post','slice','personId','/delete','syncUpdateMutationToColla','stringify','_commentService','_initUserSync','userId','8gzOAOM','onStarting','_threadCommentModel','Delete','_initDataSource','Injector','filter','length'];_0x2ed1=function(){return _0x284258;};return _0x2ed1();}let p=class extends c[_0x510256(0x122)]{constructor(_0x2a4c27,_0x387927,_0x5700ad,_0x55e836){const _0x278645=_0x510256;super(),this[_0x278645(0xe4)]=_0x2a4c27,this['_threadCommentModel']=_0x387927,this[_0x278645(0xd6)]=_0x5700ad,this[_0x278645(0xf3)]=_0x55e836,this['_init'](),this['_initUserSync']();}[_0x510256(0xe5)](){const _0x4f545f=_0x510256;this['disposeWithMe'](this[_0x4f545f(0xe9)]['commentUpdate$'][_0x4f545f(0xc0)](w[_0x4f545f(0x105)](0x10))[_0x4f545f(0x10f)](_0x1cc55f=>{const _0x55a038=_0x4f545f,_0x1cfd33=new Set();_0x1cc55f[_0x55a038(0x128)](_0x373184=>{const _0x2eeedd=_0x55a038;switch(_0x373184[_0x2eeedd(0x126)]){case _0x2eeedd(0x13a):{const _0xb0187f=_0x373184['payload'][_0x2eeedd(0xe0)];_0x1cfd33[_0x2eeedd(0x13a)](_0xb0187f);break;}}}),R(this['_injector'],_0x1cfd33);}));}[_0x510256(0x115)](){const _0x20f126=_0x510256;this[_0x20f126(0xf2)](this[_0x20f126(0xe4)]['commentUpdate$']['subscribe'](async _0x768c24=>{const _0x9fe01e=_0x20f126;var _0x42f6a4,_0x4a7282,_0x5e72d2,_0x2b8759;const _0xd14022=(_0x42f6a4=this[_0x9fe01e(0xe9)][_0x9fe01e(0x135)](_0x768c24['unitId'])[_0x9fe01e(0xcc)](_0x59c1cb=>_0x59c1cb['threadId']===_0x768c24[_0x9fe01e(0x107)]))==null?void 0x0:_0x42f6a4[_0x9fe01e(0xc9)];if(!_0xd14022)return;const {unitId:_0x5b063c,subUnitId:_0x37a2cf}=_0xd14022;switch(_0x768c24[_0x9fe01e(0x11f)]&&this[_0x9fe01e(0xd6)][_0x9fe01e(0xc2)](_0x768c24[_0x9fe01e(0x11f)]),_0x768c24[_0x9fe01e(0x126)]){case v[_0x9fe01e(0xf5)]:break;case v['Reply']:{this[_0x9fe01e(0xe9)][_0x9fe01e(0x13b)](_0x5b063c,_0x37a2cf,{'unitId':_0x5b063c,'subUnitId':_0x37a2cf,'ref':'','id':_0x768c24[_0x9fe01e(0x131)],'dT':f(+_0x768c24[_0x9fe01e(0x11c)]),'threadId':_0x768c24[_0x9fe01e(0x107)],'personId':(_0x5e72d2=(_0x4a7282=_0x768c24[_0x9fe01e(0x11f)])==null?void 0x0:_0x4a7282[_0x9fe01e(0x111)])!=null?_0x5e72d2:_0x768c24[_0x9fe01e(0xe6)],'text':JSON[_0x9fe01e(0x117)](_0x768c24['content']),'parentId':_0xd14022['id']});break;}case v[_0x9fe01e(0xea)]:{const _0x61ab47=this[_0x9fe01e(0xe9)][_0x9fe01e(0x104)](_0x5b063c,_0x37a2cf,_0x768c24[_0x9fe01e(0x131)]);_0x61ab47&&_0x61ab47[_0x9fe01e(0x12c)]&&this[_0x9fe01e(0xe9)][_0x9fe01e(0x132)](_0x5b063c,_0x37a2cf,_0x768c24[_0x9fe01e(0x131)]);break;}case v[_0x9fe01e(0xfb)]:{this['_threadCommentModel'][_0x9fe01e(0x127)](_0x5b063c,_0x37a2cf,{'commentId':_0x768c24[_0x9fe01e(0x131)],'text':JSON[_0x9fe01e(0x117)](_0x768c24[_0x9fe01e(0xc3)])});break;}case v[_0x9fe01e(0xda)]:{const _0x3865dc=(_0x2b8759=this[_0x9fe01e(0xe9)][_0x9fe01e(0x135)](_0x768c24[_0x9fe01e(0x12d)])[_0x9fe01e(0xcc)](_0x4df8dd=>_0x4df8dd[_0x9fe01e(0x107)]===_0x768c24['threadId']))==null?void 0x0:_0x2b8759[_0x9fe01e(0xc9)];_0x3865dc&&this[_0x9fe01e(0xe9)][_0x9fe01e(0xf8)](_0x5b063c,_0x37a2cf,_0x3865dc['id'],_0x768c24[_0x9fe01e(0xfe)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x510256(0x10c)](b[_0x510256(0x10a)])),S(0x1,c['Inject'](M[_0x510256(0xf0)])),S(0x2,c[_0x510256(0x10c)](c[_0x510256(0xd1)])),S(0x3,c[_0x510256(0x10c)](c[_0x510256(0xec)]))],p);const q=_0x510256(0xf1),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x2adb1e,_0x7ccd19,_0x4fe49a,_0x451f5e)=>{const _0x44e195=_0x510256;for(var _0x4a86cc=_0x451f5e>0x1?void 0x0:_0x451f5e?A(_0x7ccd19,_0x4fe49a):_0x7ccd19,_0x29d7b7=_0x2adb1e[_0x44e195(0xee)]-0x1,_0x18692c;_0x29d7b7>=0x0;_0x29d7b7--)(_0x18692c=_0x2adb1e[_0x29d7b7])&&(_0x4a86cc=_0x18692c(_0x4a86cc)||_0x4a86cc);return _0x4a86cc;},_=(_0x4e3753,_0x275d92)=>(_0x3d22c7,_0x4a9922)=>_0x275d92(_0x3d22c7,_0x4a9922,_0x4e3753);function Y(_0x1e6f70,_0x5292af){const _0x5c594c=_0x510256,_0x6277f2=_0x1e6f70['replies'][0x0];return{..._0x5292af,'id':_0x6277f2[_0x5c594c(0x131)],'resolved':_0x1e6f70['solved']===0x1,'dT':f(_0x6277f2[_0x5c594c(0x11c)]),'personId':_0x6277f2[_0x5c594c(0xe6)],'threadId':_0x6277f2[_0x5c594c(0x107)]};}function G(_0xfd34a5,_0x2e4fa0,_0x4e9185){const _0x1c8324=_0x510256;var _0x40e3cd,_0xa21b31;if(((_0xa21b31=(_0x40e3cd=_0xfd34a5==null?void 0x0:_0xfd34a5[_0x1c8324(0x138)])==null?void 0x0:_0x40e3cd[_0x1c8324(0xee)])!=null?_0xa21b31:0x0)>0x0){const _0x1248f4=(_0x481fb8,_0x32523c)=>({'id':_0x481fb8[_0x1c8324(0x131)],'threadId':_0x481fb8[_0x1c8324(0x107)],'dT':f(_0x481fb8[_0x1c8324(0x11c)]),'personId':_0x481fb8[_0x1c8324(0xe6)],'resolved':_0xfd34a5['solved']===I[_0x1c8324(0x10e)],'unitId':_0x2e4fa0,'subUnitId':_0x4e9185,'text':JSON[_0x1c8324(0x117)](_0x481fb8[_0x1c8324(0xc3)]),'parentId':_0x32523c}),_0x28be8b=_0x1248f4(_0xfd34a5['replies'][0x0]);return{..._0x28be8b,'children':_0xfd34a5['replies'][_0x1c8324(0xdf)](0x1)[_0x1c8324(0x102)](_0x5d26c8=>_0x1248f4(_0x5d26c8,_0x28be8b['id']))};}return null;}let g=class{constructor(_0x28a90a,_0x4f31aa,_0x3472cc,_0x2ade14){const _0x41b48b=_0x510256;this[_0x41b48b(0xbe)]=_0x28a90a,this['_userService']=_0x4f31aa,this[_0x41b48b(0x116)]=_0x3472cc,this['_injector']=_0x2ade14;}async[_0x510256(0x13b)](_0x15a715){const _0xfd2046=_0x510256;var _0xa4678b,_0x17eb6f;const {parentId:_0x3eb691,unitId:_0x2df655,text:_0x3ecddc,threadId:_0x4b3ac3}=_0x15a715,_0x308d45=(_0x17eb6f=(_0xa4678b=_0x3ecddc[_0xfd2046(0x136)])==null?void 0x0:_0xa4678b[_0xfd2046(0xed)](_0x4f8279=>_0x4f8279[_0xfd2046(0x12b)]===c[_0xfd2046(0x112)][_0xfd2046(0xc4)])['map'](_0x4aa563=>_0x4aa563[_0xfd2046(0xc7)]))!=null?_0x17eb6f:[],_0x57bb60=JSON['stringify'](_0x3ecddc),_0x76cde6=(await this[_0xfd2046(0x116)]['requireSession'](_0x2df655))[_0xfd2046(0xf9)]();if(_0x3eb691){const _0x2d2601={'memberId':_0x76cde6,'unitId':_0x2df655,'content':_0x57bb60,'mention':_0x308d45,'threadId':_0x4b3ac3},_0x1868d2=(await this[_0xfd2046(0xbe)][_0xfd2046(0xde)]('/universer-api/comment/unit/'+_0x2df655+'/reply',{'body':_0x2d2601}))[_0xfd2046(0x11a)][_0xfd2046(0x139)];return{..._0x15a715,'id':_0x1868d2[_0xfd2046(0x131)],'dT':c['dayjs'](+_0x1868d2['createTimestamp'])[_0xfd2046(0x11d)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1868d2['userId']};}else{const _0x135ec5={'memberId':_0x76cde6,'unitId':_0x2df655,'content':_0x57bb60,'mention':_0x308d45},_0xdcb25e=await this['_httpService'][_0xfd2046(0xde)]('/universer-api/comment/unit/'+_0x2df655+'/add',{'body':_0x135ec5});return Y(_0xdcb25e[_0xfd2046(0x11a)][_0xfd2046(0xd5)],_0x15a715);}}async['updateComment'](_0x4a8d3a){const _0x74cbe3=_0x510256;var _0x5145cc,_0x1b57b6;const {text:_0x5071d7,unitId:_0x442526}=_0x4a8d3a,_0x55170e=(_0x1b57b6=(_0x5145cc=_0x5071d7['customRanges'])==null?void 0x0:_0x5145cc[_0x74cbe3(0xed)](_0x3bb527=>_0x3bb527['rangeType']===c[_0x74cbe3(0x112)]['COMMENT'])[_0x74cbe3(0x102)](_0x48719c=>_0x48719c['rangeId']))!=null?_0x1b57b6:[],_0x77aa1d=JSON[_0x74cbe3(0xe3)](_0x5071d7),_0x3e6dc9=_0x4a8d3a['threadId'],_0xb49fc6=_0x4a8d3a['id'],_0x16beb5={'memberId':(await this[_0x74cbe3(0x116)][_0x74cbe3(0x11e)](_0x442526))[_0x74cbe3(0xf9)](),'unitId':_0x442526,'threadId':_0x3e6dc9,'mention':_0x55170e,'content':_0x77aa1d,'replyId':_0xb49fc6},_0x5adef8=await this[_0x74cbe3(0xbe)][_0x74cbe3(0xde)](_0x74cbe3(0x108)+_0x442526+'/edit',{'body':_0x16beb5});return!_0x5adef8[_0x74cbe3(0x11a)][_0x74cbe3(0xd3)]||_0x5adef8[_0x74cbe3(0x11a)][_0x74cbe3(0xd3)][_0x74cbe3(0xfa)]===0x1;}async[_0x510256(0xf8)](_0x31062a){const _0x2662f6=_0x510256,{unitId:_0x2c75f1}=_0x31062a,_0x37c28c=_0x31062a[_0x2662f6(0x107)],_0x56fe55={'memberId':this[_0x2662f6(0xd6)]['getCurrentUser']()[_0x2662f6(0x111)],'unitId':_0x2c75f1,'threadId':_0x37c28c,'solved':_0x31062a[_0x2662f6(0xd4)]?I[_0x2662f6(0x10e)]:I['OpenOrReOpen']},_0x1a40c7=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2c75f1+'/solved',{'body':_0x56fe55});return!_0x1a40c7[_0x2662f6(0x11a)][_0x2662f6(0xd3)]||_0x1a40c7[_0x2662f6(0x11a)]['error'][_0x2662f6(0xfa)]===0x1;}async[_0x510256(0x132)](_0x5a653a,_0x2be0eb,_0x866d61,_0x1a839a){const _0x8a72f4=_0x510256,_0x559571={'memberId':(await this[_0x8a72f4(0x116)][_0x8a72f4(0x11e)](_0x5a653a))[_0x8a72f4(0xf9)](),'threadId':_0x866d61,'replyId':_0x1a839a,'unitId':_0x5a653a},_0x5b1714=await this[_0x8a72f4(0xbe)]['post'](_0x8a72f4(0x108)+_0x5a653a+_0x8a72f4(0xe1),{'body':_0x559571});return!_0x5b1714[_0x8a72f4(0x11a)]['error']||_0x5b1714['body'][_0x8a72f4(0xd3)][_0x8a72f4(0xfa)]===0x1;}async['listComments'](_0x25e241,_0x3a8e62,_0xbde8d){const _0x3c619a=_0x510256,_0xb59850={'unitId':_0x25e241,'threadId':_0xbde8d},_0x58a36e=await this[_0x3c619a(0xbe)][_0x3c619a(0xde)](_0x3c619a(0x108)+_0x25e241+'/list',{'body':_0xb59850}),_0x12b9d3=_0xbde8d[_0x3c619a(0x102)](_0x4ba76c=>G(_0x58a36e['body'][_0x3c619a(0x133)][_0x4ba76c],_0x25e241,_0x3a8e62))[_0x3c619a(0xed)](Boolean);return Object[_0x3c619a(0xff)](_0x58a36e[_0x3c619a(0x11a)]['users'])[_0x3c619a(0x128)](_0x4a3871=>{const _0x344d72=_0x3c619a;this[_0x344d72(0xd6)][_0x344d72(0xc2)](_0x4a3871);}),_0x12b9d3;}['saveCommentToSnapshot'](_0x3093b2){const _0x469843=_0x510256;return{'id':_0x3093b2['id'],'threadId':_0x3093b2[_0x469843(0x107)],'ref':_0x3093b2[_0x469843(0xbf)]};}};g=x([_(0x0,c[_0x510256(0x10c)](P[_0x510256(0xd0)])),_(0x1,c[_0x510256(0x10c)](c[_0x510256(0xd1)])),_(0x2,c[_0x510256(0x10c)](b[_0x510256(0x121)])),_(0x3,c[_0x510256(0x10c)](c['Injector']))],g);var H=Object[_0x510256(0xd7)],J=(_0x2d83fa,_0x2567bc,_0x562a4b,_0x342349)=>{const _0x708931=_0x510256;for(var _0x33f107=_0x342349>0x1?void 0x0:_0x342349?H(_0x2567bc,_0x562a4b):_0x2567bc,_0x25373d=_0x2d83fa[_0x708931(0xee)]-0x1,_0x2a27c6;_0x25373d>=0x0;_0x25373d--)(_0x2a27c6=_0x2d83fa[_0x25373d])&&(_0x33f107=_0x2a27c6(_0x33f107)||_0x33f107);return _0x33f107;},y=(_0x2f0306,_0x1f9c4c)=>(_0x196db6,_0x5532b2)=>_0x1f9c4c(_0x196db6,_0x5532b2,_0x2f0306);let C=class extends c[_0x510256(0x122)]{constructor(_0x6a7f0,_0x546415){const _0x2fbca9=_0x510256;super(),this[_0x2fbca9(0xc6)]=_0x6a7f0,this[_0x2fbca9(0xf6)]=_0x546415,this[_0x2fbca9(0xeb)]();}[_0x510256(0xeb)](){const _0x285d00=_0x510256;this[_0x285d00(0xc6)][_0x285d00(0xfc)]=this[_0x285d00(0xf6)],this[_0x285d00(0xc6)][_0x285d00(0xe2)]=!0x1;}};function _0x5c4c(_0x369f89,_0x5b73bc){const _0x2ed1a9=_0x2ed1();return _0x5c4c=function(_0x5c4cd7,_0x30afb0){_0x5c4cd7=_0x5c4cd7-0xbe;let _0x3e7972=_0x2ed1a9[_0x5c4cd7];return _0x3e7972;},_0x5c4c(_0x369f89,_0x5b73bc);}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x510256(0x10c)](g))],C);var F=Object['defineProperty'],L=Object[_0x510256(0xd7)],Z=(_0x5d5128,_0x1444b2,_0x168a95)=>_0x1444b2 in _0x5d5128?F(_0x5d5128,_0x1444b2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x168a95}):_0x5d5128[_0x1444b2]=_0x168a95,W=(_0x253168,_0x18dbd3,_0x527b12,_0xe44e85)=>{for(var _0x42bdb1=_0xe44e85>0x1?void 0x0:_0xe44e85?L(_0x18dbd3,_0x527b12):_0x18dbd3,_0x59d490=_0x253168['length']-0x1,_0x371b20;_0x59d490>=0x0;_0x59d490--)(_0x371b20=_0x253168[_0x59d490])&&(_0x42bdb1=_0x371b20(_0x42bdb1)||_0x42bdb1);return _0x42bdb1;},O=(_0x49297a,_0x21bc3c)=>(_0x17af16,_0x44dc30)=>_0x21bc3c(_0x17af16,_0x44dc30,_0x49297a),N=(_0x67b10f,_0x1e05e2,_0x2b1b81)=>Z(_0x67b10f,typeof _0x1e05e2!=_0x510256(0x130)?_0x1e05e2+'':_0x1e05e2,_0x2b1b81);exports[_0x510256(0x119)]=class extends c[_0x510256(0x120)]{constructor(_0x2db820=D,_0x509886,_0x272e26){const _0x5414fc=_0x510256;super(),this[_0x5414fc(0xc1)]=_0x2db820,this[_0x5414fc(0xf3)]=_0x509886,this['_configService']=_0x272e26;const {..._0x465906}=c[_0x5414fc(0x106)]({},D,this['_config']);this[_0x5414fc(0xca)][_0x5414fc(0x125)](q,_0x465906);}[_0x510256(0xe8)](){const _0x3164f2=_0x510256;[[g],[C],[p]][_0x3164f2(0x128)](_0x6ba0f5=>{const _0xef0bf6=_0x3164f2;this[_0xef0bf6(0xf3)]['add'](_0x6ba0f5);});}[_0x510256(0xcf)](){const _0x561b23=_0x510256;this[_0x561b23(0xf3)][_0x561b23(0x12f)](C),this[_0x561b23(0xf3)][_0x561b23(0x12f)](p);}},N(exports[_0x510256(0x119)],_0x510256(0x103),U),N(exports[_0x510256(0x119)],_0x510256(0x126),c['UniverInstanceType'][_0x510256(0x12e)]),exports[_0x510256(0x119)]=W([c[_0x510256(0x10d)](j[_0x510256(0xcb)],b[_0x510256(0xce)],T['UniverLicensePlugin']),O(0x1,c[_0x510256(0x10c)](c[_0x510256(0xec)])),O(0x2,c[_0x510256(0xd9)])],exports[_0x510256(0x119)]);
|
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 _0xce2f69=_0x15c7;(function(_0x3733f4,_0x19dd5c){const _0x5a3fcc=_0x15c7,_0x4d0e9e=_0x3733f4();while(!![]){try{const _0x2fc738=-parseInt(_0x5a3fcc(0x130))/0x1+-parseInt(_0x5a3fcc(0x134))/0x2+parseInt(_0x5a3fcc(0x120))/0x3+parseInt(_0x5a3fcc(0x126))/0x4*(-parseInt(_0x5a3fcc(0x12e))/0x5)+-parseInt(_0x5a3fcc(0x179))/0x6*(-parseInt(_0x5a3fcc(0x13a))/0x7)+parseInt(_0x5a3fcc(0x14b))/0x8*(-parseInt(_0x5a3fcc(0x143))/0x9)+parseInt(_0x5a3fcc(0x147))/0xa*(parseInt(_0x5a3fcc(0x151))/0xb);if(_0x2fc738===_0x19dd5c)break;else _0x4d0e9e['push'](_0x4d0e9e['shift']());}catch(_0x9107a){_0x4d0e9e['push'](_0x4d0e9e['shift']());}}}(_0x118b,0x7daca));import{CommentService as _0x13af96,CollaborationSessionService as _0x1ff18a,UniverCollaborationClientPlugin as _0x1e3e20}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c73bd}from'@univerjs-pro/license';import{dayjs as _0x3d8f14,UserManagerService as _0x29db7b,Inject as _0x55c0a7,Injector as _0x4d7887,Disposable as _0x84a5da,CustomRangeType as _0x57b07e,UniverInstanceType as _0x367d74,DependentOn as _0x81724e,IConfigService as _0xdea700,Plugin as _0x19c6b0,merge as _0xfa516e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x16f137}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53f515,IThreadCommentDataSourceService as _0x211926}from'@univerjs/thread-comment';import{bufferTime as _0x2b4a68}from'rxjs';function _0x15c7(_0x26e98a,_0x4036f6){const _0x118b44=_0x118b();return _0x15c7=function(_0x15c7af,_0x245785){_0x15c7af=_0x15c7af-0x117;let _0x42add9=_0x118b44[_0x15c7af];return _0x42add9;},_0x15c7(_0x26e98a,_0x4036f6);}import{HTTPService as _0x27bb66}from'@univerjs/network';const W=_0xce2f69(0x14e);var I=(_0xf5e15=>(_0xf5e15[_0xf5e15[_0xce2f69(0x174)]=0x0]=_0xce2f69(0x174),_0xf5e15[_0xf5e15[_0xce2f69(0x131)]=0x1]=_0xce2f69(0x131),_0xf5e15[_0xf5e15[_0xce2f69(0x15d)]=-0x1]=_0xce2f69(0x15d),_0xf5e15))(I||{}),v=(_0x44a538=>(_0x44a538[_0x44a538[_0xce2f69(0x124)]=0x0]='Unknown',_0x44a538[_0x44a538[_0xce2f69(0x16a)]=0x1]=_0xce2f69(0x16a),_0x44a538[_0x44a538[_0xce2f69(0x12c)]=0x2]=_0xce2f69(0x12c),_0x44a538[_0x44a538[_0xce2f69(0x140)]=0x3]=_0xce2f69(0x140),_0x44a538[_0x44a538[_0xce2f69(0x180)]=0x4]=_0xce2f69(0x180),_0x44a538[_0x44a538['Solve']=0x5]='Solve',_0x44a538[_0x44a538['UNRECOGNIZED']=-0x1]=_0xce2f69(0x15d),_0x44a538))(v||{});const D=_0x1fb915=>_0x3d8f14(new Date(+_0x1fb915))[_0xce2f69(0x157)](_0xce2f69(0x17e)),B=async(_0x155b00,_0x13757a)=>{const _0x4ee22c=_0xce2f69,_0x160f7c=_0x155b00[_0x4ee22c(0x17b)](_0x29db7b),_0x3f9bb6=_0x155b00[_0x4ee22c(0x17b)](_0x27bb66);_0x13757a[_0x4ee22c(0x133)](_0x2ccd41=>{const _0x3ec728=_0x4ee22c;_0x160f7c[_0x3ec728(0x16e)](_0x2ccd41)&&_0x13757a[_0x3ec728(0x172)](_0x2ccd41);}),_0x13757a[_0x4ee22c(0x16f)]&&(await _0x3f9bb6[_0x4ee22c(0x17b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13757a]}}))[_0x4ee22c(0x154)][_0x4ee22c(0x12d)][_0x4ee22c(0x133)](_0x35ac8c=>{const _0x6750d6=_0x4ee22c;_0x35ac8c&&_0x160f7c[_0x6750d6(0x13b)](_0x35ac8c);});};var K=Object[_0xce2f69(0x162)],V=(_0x55b215,_0x21bc19,_0x3cc800,_0x22de33)=>{for(var _0x50f494=_0x22de33>0x1?void 0x0:_0x22de33?K(_0x21bc19,_0x3cc800):_0x21bc19,_0x350f73=_0x55b215['length']-0x1,_0x457148;_0x350f73>=0x0;_0x350f73--)(_0x457148=_0x55b215[_0x350f73])&&(_0x50f494=_0x457148(_0x50f494)||_0x50f494);return _0x50f494;},p=(_0x315dea,_0xb4d91)=>(_0x41bed5,_0x1ec3b7)=>_0xb4d91(_0x41bed5,_0x1ec3b7,_0x315dea);let S=class extends _0x84a5da{constructor(_0x57b90e,_0x246dbb,_0x1fcbe4,_0x134a4c){const _0x24a714=_0xce2f69;super(),this['_commentService']=_0x57b90e,this[_0x24a714(0x13d)]=_0x246dbb,this[_0x24a714(0x11d)]=_0x1fcbe4,this[_0x24a714(0x139)]=_0x134a4c,this[_0x24a714(0x178)](),this[_0x24a714(0x164)]();}['_initUserSync'](){const _0x1178fd=_0xce2f69;this[_0x1178fd(0x11b)](this[_0x1178fd(0x13d)][_0x1178fd(0x153)][_0x1178fd(0x166)](_0x2b4a68(0x10))[_0x1178fd(0x12b)](_0x40edb9=>{const _0x1949ae=_0x1178fd,_0x36be6b=new Set();_0x40edb9[_0x1949ae(0x133)](_0x5599d0=>{const _0x5d3cff=_0x1949ae;switch(_0x5599d0['type']){case _0x5d3cff(0x125):{const _0x223ec4=_0x5599d0[_0x5d3cff(0x15a)][_0x5d3cff(0x176)];_0x36be6b[_0x5d3cff(0x125)](_0x223ec4);break;}}}),B(this[_0x1949ae(0x139)],_0x36be6b);}));}['_init'](){const _0x2d7d12=_0xce2f69;this['disposeWithMe'](this['_commentService'][_0x2d7d12(0x153)][_0x2d7d12(0x12b)](async _0x19a16a=>{const _0x221869=_0x2d7d12;var _0x2ca490,_0xdbf3e3,_0x20a583,_0x5aea55;const _0x189531=(_0x2ca490=this[_0x221869(0x13d)][_0x221869(0x13e)](_0x19a16a[_0x221869(0x155)])[_0x221869(0x14a)](_0x323f3b=>_0x323f3b[_0x221869(0x141)]===_0x19a16a[_0x221869(0x141)]))==null?void 0x0:_0x2ca490['root'];if(!_0x189531)return;const {unitId:_0xda946d,subUnitId:_0x3f66f0}=_0x189531;switch(_0x19a16a[_0x221869(0x119)]&&this[_0x221869(0x11d)][_0x221869(0x13b)](_0x19a16a[_0x221869(0x119)]),_0x19a16a[_0x221869(0x173)]){case v[_0x221869(0x16a)]:break;case v[_0x221869(0x12c)]:{this['_threadCommentModel']['addComment'](_0xda946d,_0x3f66f0,{'unitId':_0xda946d,'subUnitId':_0x3f66f0,'ref':'','id':_0x19a16a[_0x221869(0x142)],'dT':D(+_0x19a16a['createTimestamp']),'threadId':_0x19a16a[_0x221869(0x141)],'personId':(_0x20a583=(_0xdbf3e3=_0x19a16a[_0x221869(0x119)])==null?void 0x0:_0xdbf3e3[_0x221869(0x13f)])!=null?_0x20a583:_0x19a16a[_0x221869(0x170)],'text':JSON[_0x221869(0x163)](_0x19a16a[_0x221869(0x136)]),'parentId':_0x189531['id']});break;}case v[_0x221869(0x180)]:{const _0x32fc49=this[_0x221869(0x13d)][_0x221869(0x156)](_0xda946d,_0x3f66f0,_0x19a16a['replyId']);_0x32fc49&&_0x32fc49[_0x221869(0x165)]&&this[_0x221869(0x13d)][_0x221869(0x11e)](_0xda946d,_0x3f66f0,_0x19a16a['replyId']);break;}case v[_0x221869(0x140)]:{this[_0x221869(0x13d)][_0x221869(0x175)](_0xda946d,_0x3f66f0,{'commentId':_0x19a16a[_0x221869(0x142)],'text':JSON['parse'](_0x19a16a[_0x221869(0x136)])});break;}case v['Solve']:{const _0x1bbc07=(_0x5aea55=this[_0x221869(0x13d)][_0x221869(0x13e)](_0x19a16a[_0x221869(0x155)])['find'](_0x7592=>_0x7592[_0x221869(0x141)]===_0x19a16a[_0x221869(0x141)]))==null?void 0x0:_0x5aea55[_0x221869(0x161)];_0x1bbc07&&this[_0x221869(0x13d)]['resolveComment'](_0xda946d,_0x3f66f0,_0x1bbc07['id'],_0x19a16a[_0x221869(0x13c)]===I[_0x221869(0x131)]);break;}}}));}};S=V([p(0x0,_0x55c0a7(_0x13af96)),p(0x1,_0x55c0a7(_0x53f515)),p(0x2,_0x55c0a7(_0x29db7b)),p(0x3,_0x55c0a7(_0x4d7887))],S);const z=_0xce2f69(0x129),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5fca45,_0x368847,_0x2b207c,_0x4bdc1b)=>{const _0xea4a1e=_0xce2f69;for(var _0x54f7f=_0x4bdc1b>0x1?void 0x0:_0x4bdc1b?k(_0x368847,_0x2b207c):_0x368847,_0x9581b7=_0x5fca45[_0xea4a1e(0x14c)]-0x1,_0x6a489a;_0x9581b7>=0x0;_0x9581b7--)(_0x6a489a=_0x5fca45[_0x9581b7])&&(_0x54f7f=_0x6a489a(_0x54f7f)||_0x54f7f);return _0x54f7f;},_=(_0x4c27f8,_0x5ad7f9)=>(_0x3cace8,_0x177a09)=>_0x5ad7f9(_0x3cace8,_0x177a09,_0x4c27f8);function X(_0x4cac96,_0xb64970){const _0x594bba=_0xce2f69,_0x291034=_0x4cac96[_0x594bba(0x14d)][0x0];return{..._0xb64970,'id':_0x291034[_0x594bba(0x142)],'resolved':_0x4cac96[_0x594bba(0x13c)]===0x1,'dT':D(_0x291034[_0x594bba(0x15e)]),'personId':_0x291034[_0x594bba(0x170)],'threadId':_0x291034['threadId']};}function ee(_0x45a18b,_0x5ce037,_0x3bd024){const _0x427911=_0xce2f69;var _0x1a2849,_0x353515;if(((_0x353515=(_0x1a2849=_0x45a18b==null?void 0x0:_0x45a18b[_0x427911(0x14d)])==null?void 0x0:_0x1a2849[_0x427911(0x14c)])!=null?_0x353515:0x0)>0x0){const _0x3fe792=(_0xf26327,_0x5c7723)=>({'id':_0xf26327['replyId'],'threadId':_0xf26327[_0x427911(0x141)],'dT':D(_0xf26327[_0x427911(0x15e)]),'personId':_0xf26327[_0x427911(0x170)],'resolved':_0x45a18b['solved']===I[_0x427911(0x131)],'unitId':_0x5ce037,'subUnitId':_0x3bd024,'text':JSON['parse'](_0xf26327[_0x427911(0x136)]),'parentId':_0x5c7723}),_0x4ad008=_0x3fe792(_0x45a18b['replies'][0x0]);return{..._0x4ad008,'children':_0x45a18b['replies'][_0x427911(0x118)](0x1)[_0x427911(0x167)](_0x4deac3=>_0x3fe792(_0x4deac3,_0x4ad008['id']))};}return null;}let f=class{constructor(_0x5b1cf5,_0x10775e,_0x4c9e6f,_0x1a6ef3){const _0xaa3348=_0xce2f69;this[_0xaa3348(0x152)]=_0x5b1cf5,this[_0xaa3348(0x11d)]=_0x10775e,this[_0xaa3348(0x121)]=_0x4c9e6f,this[_0xaa3348(0x139)]=_0x1a6ef3;}async[_0xce2f69(0x127)](_0x2c293f){const _0x284718=_0xce2f69;var _0x172776,_0x6076f3;const {parentId:_0x24114f,unitId:_0x31c6a6,text:_0x1773c6,threadId:_0x6652f5}=_0x2c293f,_0x56da7f=(_0x6076f3=(_0x172776=_0x1773c6[_0x284718(0x158)])==null?void 0x0:_0x172776[_0x284718(0x11f)](_0x1eaf57=>_0x1eaf57[_0x284718(0x12f)]===_0x57b07e[_0x284718(0x14f)])[_0x284718(0x167)](_0xc880bd=>_0xc880bd['rangeId']))!=null?_0x6076f3:[],_0xa81f3c=JSON['stringify'](_0x1773c6),_0x4e36a3=(await this['_sessionService']['requireSession'](_0x31c6a6))[_0x284718(0x159)]();if(_0x24114f){const _0x2079c3={'memberId':_0x4e36a3,'unitId':_0x31c6a6,'content':_0xa81f3c,'mention':_0x56da7f,'threadId':_0x6652f5},_0x5bbab3=(await this['_httpService']['post'](_0x284718(0x17a)+_0x31c6a6+_0x284718(0x132),{'body':_0x2079c3}))[_0x284718(0x154)][_0x284718(0x15c)];return{..._0x2c293f,'id':_0x5bbab3[_0x284718(0x142)],'dT':_0x3d8f14(+_0x5bbab3[_0x284718(0x15e)])[_0x284718(0x157)](_0x284718(0x17e)),'personId':_0x5bbab3[_0x284718(0x170)]};}else{const _0x532b3={'memberId':_0x4e36a3,'unitId':_0x31c6a6,'content':_0xa81f3c,'mention':_0x56da7f},_0x31608c=await this['_httpService']['post'](_0x284718(0x17a)+_0x31c6a6+_0x284718(0x138),{'body':_0x532b3});return X(_0x31608c[_0x284718(0x154)][_0x284718(0x12a)],_0x2c293f);}}async[_0xce2f69(0x175)](_0x5d1486){const _0x34aefd=_0xce2f69;var _0x3b20e9,_0x211cdb;const {text:_0x185b09,unitId:_0xc0ac78}=_0x5d1486,_0x4b7952=(_0x211cdb=(_0x3b20e9=_0x185b09['customRanges'])==null?void 0x0:_0x3b20e9[_0x34aefd(0x11f)](_0x4ee7f2=>_0x4ee7f2[_0x34aefd(0x12f)]===_0x57b07e[_0x34aefd(0x14f)])['map'](_0x1f86b6=>_0x1f86b6[_0x34aefd(0x135)]))!=null?_0x211cdb:[],_0xec216=JSON[_0x34aefd(0x177)](_0x185b09),_0x4a6b37=_0x5d1486['threadId'],_0x1301dc=_0x5d1486['id'],_0x247255={'memberId':(await this['_sessionService']['requireSession'](_0xc0ac78))[_0x34aefd(0x159)](),'unitId':_0xc0ac78,'threadId':_0x4a6b37,'mention':_0x4b7952,'content':_0xec216,'replyId':_0x1301dc},_0x4992c7=await this['_httpService'][_0x34aefd(0x15f)](_0x34aefd(0x17a)+_0xc0ac78+_0x34aefd(0x15b),{'body':_0x247255});return!_0x4992c7['body'][_0x34aefd(0x16b)]||_0x4992c7[_0x34aefd(0x154)][_0x34aefd(0x16b)][_0x34aefd(0x149)]===0x1;}async[_0xce2f69(0x128)](_0x2a0c88){const _0x579ba4=_0xce2f69,{unitId:_0x215edc}=_0x2a0c88,_0x1f9951=_0x2a0c88[_0x579ba4(0x141)],_0x4afd05={'memberId':this[_0x579ba4(0x11d)][_0x579ba4(0x17c)]()['userID'],'unitId':_0x215edc,'threadId':_0x1f9951,'solved':_0x2a0c88[_0x579ba4(0x11a)]?I[_0x579ba4(0x131)]:I[_0x579ba4(0x174)]},_0x5afabd=await this[_0x579ba4(0x152)][_0x579ba4(0x15f)](_0x579ba4(0x17a)+_0x215edc+_0x579ba4(0x16c),{'body':_0x4afd05});return!_0x5afabd[_0x579ba4(0x154)][_0x579ba4(0x16b)]||_0x5afabd[_0x579ba4(0x154)]['error'][_0x579ba4(0x149)]===0x1;}async['deleteComment'](_0x3fc86a,_0x20a767,_0x2e3e72,_0x120d55){const _0x38485c=_0xce2f69,_0x29f217={'memberId':(await this[_0x38485c(0x121)]['requireSession'](_0x3fc86a))[_0x38485c(0x159)](),'threadId':_0x2e3e72,'replyId':_0x120d55,'unitId':_0x3fc86a},_0x154c88=await this[_0x38485c(0x152)][_0x38485c(0x15f)](_0x38485c(0x17a)+_0x3fc86a+_0x38485c(0x146),{'body':_0x29f217});return!_0x154c88['body'][_0x38485c(0x16b)]||_0x154c88[_0x38485c(0x154)][_0x38485c(0x16b)][_0x38485c(0x149)]===0x1;}async[_0xce2f69(0x168)](_0x33e412,_0x9c924e,_0x2de03d){const _0x1a3215=_0xce2f69,_0x4e9e5f={'unitId':_0x33e412,'threadId':_0x2de03d},_0x209d1d=await this[_0x1a3215(0x152)]['post']('/universer-api/comment/unit/'+_0x33e412+'/list',{'body':_0x4e9e5f}),_0x480945=_0x2de03d[_0x1a3215(0x167)](_0x148a9b=>ee(_0x209d1d[_0x1a3215(0x154)]['comments'][_0x148a9b],_0x33e412,_0x9c924e))[_0x1a3215(0x11f)](Boolean);return Object[_0x1a3215(0x17f)](_0x209d1d['body'][_0x1a3215(0x12d)])[_0x1a3215(0x133)](_0x5d2223=>{const _0x38329a=_0x1a3215;this['_userService'][_0x38329a(0x13b)](_0x5d2223);}),_0x480945;}[_0xce2f69(0x117)](_0x2f2469){const _0x596ab8=_0xce2f69;return{'id':_0x2f2469['id'],'threadId':_0x2f2469['threadId'],'ref':_0x2f2469[_0x596ab8(0x160)]};}};f=Q([_(0x0,_0x55c0a7(_0x27bb66)),_(0x1,_0x55c0a7(_0x29db7b)),_(0x2,_0x55c0a7(_0x1ff18a)),_(0x3,_0x55c0a7(_0x4d7887))],f);var re=Object[_0xce2f69(0x162)],te=(_0x24c9c2,_0x566b1e,_0x5652b2,_0x127256)=>{const _0x94a92c=_0xce2f69;for(var _0x233e1b=_0x127256>0x1?void 0x0:_0x127256?re(_0x566b1e,_0x5652b2):_0x566b1e,_0x143203=_0x24c9c2[_0x94a92c(0x14c)]-0x1,_0x6b9b68;_0x143203>=0x0;_0x143203--)(_0x6b9b68=_0x24c9c2[_0x143203])&&(_0x233e1b=_0x6b9b68(_0x233e1b)||_0x233e1b);return _0x233e1b;},N=(_0x409af7,_0x35071e)=>(_0xeb9922,_0x3ca4da)=>_0x35071e(_0xeb9922,_0x3ca4da,_0x409af7);let g=class extends _0x84a5da{constructor(_0x47a008,_0x4ca9c9){const _0x29ccb9=_0xce2f69;super(),this['_threadCommentDataSourceService']=_0x47a008,this[_0x29ccb9(0x16d)]=_0x4ca9c9,this[_0x29ccb9(0x150)]();}[_0xce2f69(0x150)](){const _0x47632a=_0xce2f69;this['_threadCommentDataSourceService'][_0x47632a(0x17d)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x47632a(0x123)]=!0x1;}};g=te([N(0x0,_0x211926),N(0x1,_0x55c0a7(f))],g);function _0x118b(){const _0x2ef6cf=['parse','_initUserSync','parentId','pipe','map','listComments','UNIVER_UNKNOWN','Add','error','/solved','_threadCommentDataSource','getUser','size','userId','_config','delete','type','OpenOrReOpen','updateComment','personId','stringify','_init','457008ZngIQe','/universer-api/comment/unit/','get','getCurrentUser','dataSource','YYYY/MM/DD\x20HH:mm','values','Delete','saveCommentToSnapshot','slice','user','resolved','disposeWithMe','_configService','_userService','deleteComment','filter','306648RKHJis','_sessionService','onReady','syncUpdateMutationToColla','Unknown','add','248sceBhW','addComment','resolveComment','thread-comment-data-source.config','comment','subscribe','Reply','users','5755EVBaIV','rangeType','590579JkadiU','Solved','/reply','forEach','1724010Hdlpku','rangeId','content','symbol','/add','_injector','70CUAjzv','addUser','solved','_threadCommentModel','getUnit','userID','Edit','threadId','replyId','108nBtNfF','onStarting','defineProperty','/delete','180bQXDht','pluginName','code','find','226496zgfVGU','length','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','_initDataSource','925562hCRghZ','_httpService','commentUpdate$','body','unitId','getComment','format','customRanges','getMemberID','payload','/edit','reply','UNRECOGNIZED','createTimestamp','post','ref','root','getOwnPropertyDescriptor'];_0x118b=function(){return _0x2ef6cf;};return _0x118b();}var se=Object[_0xce2f69(0x145)],oe=Object[_0xce2f69(0x162)],ne=(_0x1d0ae6,_0x537b66,_0x38a7c0)=>_0x537b66 in _0x1d0ae6?se(_0x1d0ae6,_0x537b66,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38a7c0}):_0x1d0ae6[_0x537b66]=_0x38a7c0,ie=(_0x506de6,_0x1d5d41,_0x4987dd,_0x1f93b0)=>{for(var _0x112c03=_0x1f93b0>0x1?void 0x0:_0x1f93b0?oe(_0x1d5d41,_0x4987dd):_0x1d5d41,_0x2c9616=_0x506de6['length']-0x1,_0x65b8f3;_0x2c9616>=0x0;_0x2c9616--)(_0x65b8f3=_0x506de6[_0x2c9616])&&(_0x112c03=_0x65b8f3(_0x112c03)||_0x112c03);return _0x112c03;},w=(_0x2b9efe,_0x20a0ab)=>(_0x598317,_0x258bb4)=>_0x20a0ab(_0x598317,_0x258bb4,_0x2b9efe),$=(_0x3be7ec,_0x503eec,_0x39ed06)=>ne(_0x3be7ec,typeof _0x503eec!=_0xce2f69(0x137)?_0x503eec+'':_0x503eec,_0x39ed06);let b=class extends _0x19c6b0{constructor(_0x31d323=M,_0x1ecf54,_0x1522c5){const _0x324935=_0xce2f69;super(),this[_0x324935(0x171)]=_0x31d323,this[_0x324935(0x139)]=_0x1ecf54,this[_0x324935(0x11c)]=_0x1522c5;const {..._0x546264}=_0xfa516e({},M,this[_0x324935(0x171)]);this[_0x324935(0x11c)]['setConfig'](z,_0x546264);}[_0xce2f69(0x144)](){[[f],[g],[S]]['forEach'](_0x252e9c=>{const _0x3a99e5=_0x15c7;this[_0x3a99e5(0x139)][_0x3a99e5(0x125)](_0x252e9c);});}[_0xce2f69(0x122)](){const _0xa36e78=_0xce2f69;this[_0xa36e78(0x139)][_0xa36e78(0x17b)](g),this[_0xa36e78(0x139)][_0xa36e78(0x17b)](S);}};$(b,_0xce2f69(0x148),W),$(b,'type',_0x367d74[_0xce2f69(0x169)]),b=ie([_0x81724e(_0x16f137,_0x1e3e20,_0x2c73bd),w(0x1,_0x55c0a7(_0x4d7887)),w(0x2,_0xdea700)],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 _0xce2f69=_0x15c7;(function(_0x3733f4,_0x19dd5c){const _0x5a3fcc=_0x15c7,_0x4d0e9e=_0x3733f4();while(!![]){try{const _0x2fc738=-parseInt(_0x5a3fcc(0x130))/0x1+-parseInt(_0x5a3fcc(0x134))/0x2+parseInt(_0x5a3fcc(0x120))/0x3+parseInt(_0x5a3fcc(0x126))/0x4*(-parseInt(_0x5a3fcc(0x12e))/0x5)+-parseInt(_0x5a3fcc(0x179))/0x6*(-parseInt(_0x5a3fcc(0x13a))/0x7)+parseInt(_0x5a3fcc(0x14b))/0x8*(-parseInt(_0x5a3fcc(0x143))/0x9)+parseInt(_0x5a3fcc(0x147))/0xa*(parseInt(_0x5a3fcc(0x151))/0xb);if(_0x2fc738===_0x19dd5c)break;else _0x4d0e9e['push'](_0x4d0e9e['shift']());}catch(_0x9107a){_0x4d0e9e['push'](_0x4d0e9e['shift']());}}}(_0x118b,0x7daca));import{CommentService as _0x13af96,CollaborationSessionService as _0x1ff18a,UniverCollaborationClientPlugin as _0x1e3e20}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2c73bd}from'@univerjs-pro/license';import{dayjs as _0x3d8f14,UserManagerService as _0x29db7b,Inject as _0x55c0a7,Injector as _0x4d7887,Disposable as _0x84a5da,CustomRangeType as _0x57b07e,UniverInstanceType as _0x367d74,DependentOn as _0x81724e,IConfigService as _0xdea700,Plugin as _0x19c6b0,merge as _0xfa516e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x16f137}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53f515,IThreadCommentDataSourceService as _0x211926}from'@univerjs/thread-comment';import{bufferTime as _0x2b4a68}from'rxjs';function _0x15c7(_0x26e98a,_0x4036f6){const _0x118b44=_0x118b();return _0x15c7=function(_0x15c7af,_0x245785){_0x15c7af=_0x15c7af-0x117;let _0x42add9=_0x118b44[_0x15c7af];return _0x42add9;},_0x15c7(_0x26e98a,_0x4036f6);}import{HTTPService as _0x27bb66}from'@univerjs/network';const W=_0xce2f69(0x14e);var I=(_0xf5e15=>(_0xf5e15[_0xf5e15[_0xce2f69(0x174)]=0x0]=_0xce2f69(0x174),_0xf5e15[_0xf5e15[_0xce2f69(0x131)]=0x1]=_0xce2f69(0x131),_0xf5e15[_0xf5e15[_0xce2f69(0x15d)]=-0x1]=_0xce2f69(0x15d),_0xf5e15))(I||{}),v=(_0x44a538=>(_0x44a538[_0x44a538[_0xce2f69(0x124)]=0x0]='Unknown',_0x44a538[_0x44a538[_0xce2f69(0x16a)]=0x1]=_0xce2f69(0x16a),_0x44a538[_0x44a538[_0xce2f69(0x12c)]=0x2]=_0xce2f69(0x12c),_0x44a538[_0x44a538[_0xce2f69(0x140)]=0x3]=_0xce2f69(0x140),_0x44a538[_0x44a538[_0xce2f69(0x180)]=0x4]=_0xce2f69(0x180),_0x44a538[_0x44a538['Solve']=0x5]='Solve',_0x44a538[_0x44a538['UNRECOGNIZED']=-0x1]=_0xce2f69(0x15d),_0x44a538))(v||{});const D=_0x1fb915=>_0x3d8f14(new Date(+_0x1fb915))[_0xce2f69(0x157)](_0xce2f69(0x17e)),B=async(_0x155b00,_0x13757a)=>{const _0x4ee22c=_0xce2f69,_0x160f7c=_0x155b00[_0x4ee22c(0x17b)](_0x29db7b),_0x3f9bb6=_0x155b00[_0x4ee22c(0x17b)](_0x27bb66);_0x13757a[_0x4ee22c(0x133)](_0x2ccd41=>{const _0x3ec728=_0x4ee22c;_0x160f7c[_0x3ec728(0x16e)](_0x2ccd41)&&_0x13757a[_0x3ec728(0x172)](_0x2ccd41);}),_0x13757a[_0x4ee22c(0x16f)]&&(await _0x3f9bb6[_0x4ee22c(0x17b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x13757a]}}))[_0x4ee22c(0x154)][_0x4ee22c(0x12d)][_0x4ee22c(0x133)](_0x35ac8c=>{const _0x6750d6=_0x4ee22c;_0x35ac8c&&_0x160f7c[_0x6750d6(0x13b)](_0x35ac8c);});};var K=Object[_0xce2f69(0x162)],V=(_0x55b215,_0x21bc19,_0x3cc800,_0x22de33)=>{for(var _0x50f494=_0x22de33>0x1?void 0x0:_0x22de33?K(_0x21bc19,_0x3cc800):_0x21bc19,_0x350f73=_0x55b215['length']-0x1,_0x457148;_0x350f73>=0x0;_0x350f73--)(_0x457148=_0x55b215[_0x350f73])&&(_0x50f494=_0x457148(_0x50f494)||_0x50f494);return _0x50f494;},p=(_0x315dea,_0xb4d91)=>(_0x41bed5,_0x1ec3b7)=>_0xb4d91(_0x41bed5,_0x1ec3b7,_0x315dea);let S=class extends _0x84a5da{constructor(_0x57b90e,_0x246dbb,_0x1fcbe4,_0x134a4c){const _0x24a714=_0xce2f69;super(),this['_commentService']=_0x57b90e,this[_0x24a714(0x13d)]=_0x246dbb,this[_0x24a714(0x11d)]=_0x1fcbe4,this[_0x24a714(0x139)]=_0x134a4c,this[_0x24a714(0x178)](),this[_0x24a714(0x164)]();}['_initUserSync'](){const _0x1178fd=_0xce2f69;this[_0x1178fd(0x11b)](this[_0x1178fd(0x13d)][_0x1178fd(0x153)][_0x1178fd(0x166)](_0x2b4a68(0x10))[_0x1178fd(0x12b)](_0x40edb9=>{const _0x1949ae=_0x1178fd,_0x36be6b=new Set();_0x40edb9[_0x1949ae(0x133)](_0x5599d0=>{const _0x5d3cff=_0x1949ae;switch(_0x5599d0['type']){case _0x5d3cff(0x125):{const _0x223ec4=_0x5599d0[_0x5d3cff(0x15a)][_0x5d3cff(0x176)];_0x36be6b[_0x5d3cff(0x125)](_0x223ec4);break;}}}),B(this[_0x1949ae(0x139)],_0x36be6b);}));}['_init'](){const _0x2d7d12=_0xce2f69;this['disposeWithMe'](this['_commentService'][_0x2d7d12(0x153)][_0x2d7d12(0x12b)](async _0x19a16a=>{const _0x221869=_0x2d7d12;var _0x2ca490,_0xdbf3e3,_0x20a583,_0x5aea55;const _0x189531=(_0x2ca490=this[_0x221869(0x13d)][_0x221869(0x13e)](_0x19a16a[_0x221869(0x155)])[_0x221869(0x14a)](_0x323f3b=>_0x323f3b[_0x221869(0x141)]===_0x19a16a[_0x221869(0x141)]))==null?void 0x0:_0x2ca490['root'];if(!_0x189531)return;const {unitId:_0xda946d,subUnitId:_0x3f66f0}=_0x189531;switch(_0x19a16a[_0x221869(0x119)]&&this[_0x221869(0x11d)][_0x221869(0x13b)](_0x19a16a[_0x221869(0x119)]),_0x19a16a[_0x221869(0x173)]){case v[_0x221869(0x16a)]:break;case v[_0x221869(0x12c)]:{this['_threadCommentModel']['addComment'](_0xda946d,_0x3f66f0,{'unitId':_0xda946d,'subUnitId':_0x3f66f0,'ref':'','id':_0x19a16a[_0x221869(0x142)],'dT':D(+_0x19a16a['createTimestamp']),'threadId':_0x19a16a[_0x221869(0x141)],'personId':(_0x20a583=(_0xdbf3e3=_0x19a16a[_0x221869(0x119)])==null?void 0x0:_0xdbf3e3[_0x221869(0x13f)])!=null?_0x20a583:_0x19a16a[_0x221869(0x170)],'text':JSON[_0x221869(0x163)](_0x19a16a[_0x221869(0x136)]),'parentId':_0x189531['id']});break;}case v[_0x221869(0x180)]:{const _0x32fc49=this[_0x221869(0x13d)][_0x221869(0x156)](_0xda946d,_0x3f66f0,_0x19a16a['replyId']);_0x32fc49&&_0x32fc49[_0x221869(0x165)]&&this[_0x221869(0x13d)][_0x221869(0x11e)](_0xda946d,_0x3f66f0,_0x19a16a['replyId']);break;}case v[_0x221869(0x140)]:{this[_0x221869(0x13d)][_0x221869(0x175)](_0xda946d,_0x3f66f0,{'commentId':_0x19a16a[_0x221869(0x142)],'text':JSON['parse'](_0x19a16a[_0x221869(0x136)])});break;}case v['Solve']:{const _0x1bbc07=(_0x5aea55=this[_0x221869(0x13d)][_0x221869(0x13e)](_0x19a16a[_0x221869(0x155)])['find'](_0x7592=>_0x7592[_0x221869(0x141)]===_0x19a16a[_0x221869(0x141)]))==null?void 0x0:_0x5aea55[_0x221869(0x161)];_0x1bbc07&&this[_0x221869(0x13d)]['resolveComment'](_0xda946d,_0x3f66f0,_0x1bbc07['id'],_0x19a16a[_0x221869(0x13c)]===I[_0x221869(0x131)]);break;}}}));}};S=V([p(0x0,_0x55c0a7(_0x13af96)),p(0x1,_0x55c0a7(_0x53f515)),p(0x2,_0x55c0a7(_0x29db7b)),p(0x3,_0x55c0a7(_0x4d7887))],S);const z=_0xce2f69(0x129),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5fca45,_0x368847,_0x2b207c,_0x4bdc1b)=>{const _0xea4a1e=_0xce2f69;for(var _0x54f7f=_0x4bdc1b>0x1?void 0x0:_0x4bdc1b?k(_0x368847,_0x2b207c):_0x368847,_0x9581b7=_0x5fca45[_0xea4a1e(0x14c)]-0x1,_0x6a489a;_0x9581b7>=0x0;_0x9581b7--)(_0x6a489a=_0x5fca45[_0x9581b7])&&(_0x54f7f=_0x6a489a(_0x54f7f)||_0x54f7f);return _0x54f7f;},_=(_0x4c27f8,_0x5ad7f9)=>(_0x3cace8,_0x177a09)=>_0x5ad7f9(_0x3cace8,_0x177a09,_0x4c27f8);function X(_0x4cac96,_0xb64970){const _0x594bba=_0xce2f69,_0x291034=_0x4cac96[_0x594bba(0x14d)][0x0];return{..._0xb64970,'id':_0x291034[_0x594bba(0x142)],'resolved':_0x4cac96[_0x594bba(0x13c)]===0x1,'dT':D(_0x291034[_0x594bba(0x15e)]),'personId':_0x291034[_0x594bba(0x170)],'threadId':_0x291034['threadId']};}function ee(_0x45a18b,_0x5ce037,_0x3bd024){const _0x427911=_0xce2f69;var _0x1a2849,_0x353515;if(((_0x353515=(_0x1a2849=_0x45a18b==null?void 0x0:_0x45a18b[_0x427911(0x14d)])==null?void 0x0:_0x1a2849[_0x427911(0x14c)])!=null?_0x353515:0x0)>0x0){const _0x3fe792=(_0xf26327,_0x5c7723)=>({'id':_0xf26327['replyId'],'threadId':_0xf26327[_0x427911(0x141)],'dT':D(_0xf26327[_0x427911(0x15e)]),'personId':_0xf26327[_0x427911(0x170)],'resolved':_0x45a18b['solved']===I[_0x427911(0x131)],'unitId':_0x5ce037,'subUnitId':_0x3bd024,'text':JSON['parse'](_0xf26327[_0x427911(0x136)]),'parentId':_0x5c7723}),_0x4ad008=_0x3fe792(_0x45a18b['replies'][0x0]);return{..._0x4ad008,'children':_0x45a18b['replies'][_0x427911(0x118)](0x1)[_0x427911(0x167)](_0x4deac3=>_0x3fe792(_0x4deac3,_0x4ad008['id']))};}return null;}let f=class{constructor(_0x5b1cf5,_0x10775e,_0x4c9e6f,_0x1a6ef3){const _0xaa3348=_0xce2f69;this[_0xaa3348(0x152)]=_0x5b1cf5,this[_0xaa3348(0x11d)]=_0x10775e,this[_0xaa3348(0x121)]=_0x4c9e6f,this[_0xaa3348(0x139)]=_0x1a6ef3;}async[_0xce2f69(0x127)](_0x2c293f){const _0x284718=_0xce2f69;var _0x172776,_0x6076f3;const {parentId:_0x24114f,unitId:_0x31c6a6,text:_0x1773c6,threadId:_0x6652f5}=_0x2c293f,_0x56da7f=(_0x6076f3=(_0x172776=_0x1773c6[_0x284718(0x158)])==null?void 0x0:_0x172776[_0x284718(0x11f)](_0x1eaf57=>_0x1eaf57[_0x284718(0x12f)]===_0x57b07e[_0x284718(0x14f)])[_0x284718(0x167)](_0xc880bd=>_0xc880bd['rangeId']))!=null?_0x6076f3:[],_0xa81f3c=JSON['stringify'](_0x1773c6),_0x4e36a3=(await this['_sessionService']['requireSession'](_0x31c6a6))[_0x284718(0x159)]();if(_0x24114f){const _0x2079c3={'memberId':_0x4e36a3,'unitId':_0x31c6a6,'content':_0xa81f3c,'mention':_0x56da7f,'threadId':_0x6652f5},_0x5bbab3=(await this['_httpService']['post'](_0x284718(0x17a)+_0x31c6a6+_0x284718(0x132),{'body':_0x2079c3}))[_0x284718(0x154)][_0x284718(0x15c)];return{..._0x2c293f,'id':_0x5bbab3[_0x284718(0x142)],'dT':_0x3d8f14(+_0x5bbab3[_0x284718(0x15e)])[_0x284718(0x157)](_0x284718(0x17e)),'personId':_0x5bbab3[_0x284718(0x170)]};}else{const _0x532b3={'memberId':_0x4e36a3,'unitId':_0x31c6a6,'content':_0xa81f3c,'mention':_0x56da7f},_0x31608c=await this['_httpService']['post'](_0x284718(0x17a)+_0x31c6a6+_0x284718(0x138),{'body':_0x532b3});return X(_0x31608c[_0x284718(0x154)][_0x284718(0x12a)],_0x2c293f);}}async[_0xce2f69(0x175)](_0x5d1486){const _0x34aefd=_0xce2f69;var _0x3b20e9,_0x211cdb;const {text:_0x185b09,unitId:_0xc0ac78}=_0x5d1486,_0x4b7952=(_0x211cdb=(_0x3b20e9=_0x185b09['customRanges'])==null?void 0x0:_0x3b20e9[_0x34aefd(0x11f)](_0x4ee7f2=>_0x4ee7f2[_0x34aefd(0x12f)]===_0x57b07e[_0x34aefd(0x14f)])['map'](_0x1f86b6=>_0x1f86b6[_0x34aefd(0x135)]))!=null?_0x211cdb:[],_0xec216=JSON[_0x34aefd(0x177)](_0x185b09),_0x4a6b37=_0x5d1486['threadId'],_0x1301dc=_0x5d1486['id'],_0x247255={'memberId':(await this['_sessionService']['requireSession'](_0xc0ac78))[_0x34aefd(0x159)](),'unitId':_0xc0ac78,'threadId':_0x4a6b37,'mention':_0x4b7952,'content':_0xec216,'replyId':_0x1301dc},_0x4992c7=await this['_httpService'][_0x34aefd(0x15f)](_0x34aefd(0x17a)+_0xc0ac78+_0x34aefd(0x15b),{'body':_0x247255});return!_0x4992c7['body'][_0x34aefd(0x16b)]||_0x4992c7[_0x34aefd(0x154)][_0x34aefd(0x16b)][_0x34aefd(0x149)]===0x1;}async[_0xce2f69(0x128)](_0x2a0c88){const _0x579ba4=_0xce2f69,{unitId:_0x215edc}=_0x2a0c88,_0x1f9951=_0x2a0c88[_0x579ba4(0x141)],_0x4afd05={'memberId':this[_0x579ba4(0x11d)][_0x579ba4(0x17c)]()['userID'],'unitId':_0x215edc,'threadId':_0x1f9951,'solved':_0x2a0c88[_0x579ba4(0x11a)]?I[_0x579ba4(0x131)]:I[_0x579ba4(0x174)]},_0x5afabd=await this[_0x579ba4(0x152)][_0x579ba4(0x15f)](_0x579ba4(0x17a)+_0x215edc+_0x579ba4(0x16c),{'body':_0x4afd05});return!_0x5afabd[_0x579ba4(0x154)][_0x579ba4(0x16b)]||_0x5afabd[_0x579ba4(0x154)]['error'][_0x579ba4(0x149)]===0x1;}async['deleteComment'](_0x3fc86a,_0x20a767,_0x2e3e72,_0x120d55){const _0x38485c=_0xce2f69,_0x29f217={'memberId':(await this[_0x38485c(0x121)]['requireSession'](_0x3fc86a))[_0x38485c(0x159)](),'threadId':_0x2e3e72,'replyId':_0x120d55,'unitId':_0x3fc86a},_0x154c88=await this[_0x38485c(0x152)][_0x38485c(0x15f)](_0x38485c(0x17a)+_0x3fc86a+_0x38485c(0x146),{'body':_0x29f217});return!_0x154c88['body'][_0x38485c(0x16b)]||_0x154c88[_0x38485c(0x154)][_0x38485c(0x16b)][_0x38485c(0x149)]===0x1;}async[_0xce2f69(0x168)](_0x33e412,_0x9c924e,_0x2de03d){const _0x1a3215=_0xce2f69,_0x4e9e5f={'unitId':_0x33e412,'threadId':_0x2de03d},_0x209d1d=await this[_0x1a3215(0x152)]['post']('/universer-api/comment/unit/'+_0x33e412+'/list',{'body':_0x4e9e5f}),_0x480945=_0x2de03d[_0x1a3215(0x167)](_0x148a9b=>ee(_0x209d1d[_0x1a3215(0x154)]['comments'][_0x148a9b],_0x33e412,_0x9c924e))[_0x1a3215(0x11f)](Boolean);return Object[_0x1a3215(0x17f)](_0x209d1d['body'][_0x1a3215(0x12d)])[_0x1a3215(0x133)](_0x5d2223=>{const _0x38329a=_0x1a3215;this['_userService'][_0x38329a(0x13b)](_0x5d2223);}),_0x480945;}[_0xce2f69(0x117)](_0x2f2469){const _0x596ab8=_0xce2f69;return{'id':_0x2f2469['id'],'threadId':_0x2f2469['threadId'],'ref':_0x2f2469[_0x596ab8(0x160)]};}};f=Q([_(0x0,_0x55c0a7(_0x27bb66)),_(0x1,_0x55c0a7(_0x29db7b)),_(0x2,_0x55c0a7(_0x1ff18a)),_(0x3,_0x55c0a7(_0x4d7887))],f);var re=Object[_0xce2f69(0x162)],te=(_0x24c9c2,_0x566b1e,_0x5652b2,_0x127256)=>{const _0x94a92c=_0xce2f69;for(var _0x233e1b=_0x127256>0x1?void 0x0:_0x127256?re(_0x566b1e,_0x5652b2):_0x566b1e,_0x143203=_0x24c9c2[_0x94a92c(0x14c)]-0x1,_0x6b9b68;_0x143203>=0x0;_0x143203--)(_0x6b9b68=_0x24c9c2[_0x143203])&&(_0x233e1b=_0x6b9b68(_0x233e1b)||_0x233e1b);return _0x233e1b;},N=(_0x409af7,_0x35071e)=>(_0xeb9922,_0x3ca4da)=>_0x35071e(_0xeb9922,_0x3ca4da,_0x409af7);let g=class extends _0x84a5da{constructor(_0x47a008,_0x4ca9c9){const _0x29ccb9=_0xce2f69;super(),this['_threadCommentDataSourceService']=_0x47a008,this[_0x29ccb9(0x16d)]=_0x4ca9c9,this[_0x29ccb9(0x150)]();}[_0xce2f69(0x150)](){const _0x47632a=_0xce2f69;this['_threadCommentDataSourceService'][_0x47632a(0x17d)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x47632a(0x123)]=!0x1;}};g=te([N(0x0,_0x211926),N(0x1,_0x55c0a7(f))],g);function _0x118b(){const _0x2ef6cf=['parse','_initUserSync','parentId','pipe','map','listComments','UNIVER_UNKNOWN','Add','error','/solved','_threadCommentDataSource','getUser','size','userId','_config','delete','type','OpenOrReOpen','updateComment','personId','stringify','_init','457008ZngIQe','/universer-api/comment/unit/','get','getCurrentUser','dataSource','YYYY/MM/DD\x20HH:mm','values','Delete','saveCommentToSnapshot','slice','user','resolved','disposeWithMe','_configService','_userService','deleteComment','filter','306648RKHJis','_sessionService','onReady','syncUpdateMutationToColla','Unknown','add','248sceBhW','addComment','resolveComment','thread-comment-data-source.config','comment','subscribe','Reply','users','5755EVBaIV','rangeType','590579JkadiU','Solved','/reply','forEach','1724010Hdlpku','rangeId','content','symbol','/add','_injector','70CUAjzv','addUser','solved','_threadCommentModel','getUnit','userID','Edit','threadId','replyId','108nBtNfF','onStarting','defineProperty','/delete','180bQXDht','pluginName','code','find','226496zgfVGU','length','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','COMMENT','_initDataSource','925562hCRghZ','_httpService','commentUpdate$','body','unitId','getComment','format','customRanges','getMemberID','payload','/edit','reply','UNRECOGNIZED','createTimestamp','post','ref','root','getOwnPropertyDescriptor'];_0x118b=function(){return _0x2ef6cf;};return _0x118b();}var se=Object[_0xce2f69(0x145)],oe=Object[_0xce2f69(0x162)],ne=(_0x1d0ae6,_0x537b66,_0x38a7c0)=>_0x537b66 in _0x1d0ae6?se(_0x1d0ae6,_0x537b66,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38a7c0}):_0x1d0ae6[_0x537b66]=_0x38a7c0,ie=(_0x506de6,_0x1d5d41,_0x4987dd,_0x1f93b0)=>{for(var _0x112c03=_0x1f93b0>0x1?void 0x0:_0x1f93b0?oe(_0x1d5d41,_0x4987dd):_0x1d5d41,_0x2c9616=_0x506de6['length']-0x1,_0x65b8f3;_0x2c9616>=0x0;_0x2c9616--)(_0x65b8f3=_0x506de6[_0x2c9616])&&(_0x112c03=_0x65b8f3(_0x112c03)||_0x112c03);return _0x112c03;},w=(_0x2b9efe,_0x20a0ab)=>(_0x598317,_0x258bb4)=>_0x20a0ab(_0x598317,_0x258bb4,_0x2b9efe),$=(_0x3be7ec,_0x503eec,_0x39ed06)=>ne(_0x3be7ec,typeof _0x503eec!=_0xce2f69(0x137)?_0x503eec+'':_0x503eec,_0x39ed06);let b=class extends _0x19c6b0{constructor(_0x31d323=M,_0x1ecf54,_0x1522c5){const _0x324935=_0xce2f69;super(),this[_0x324935(0x171)]=_0x31d323,this[_0x324935(0x139)]=_0x1ecf54,this[_0x324935(0x11c)]=_0x1522c5;const {..._0x546264}=_0xfa516e({},M,this[_0x324935(0x171)]);this[_0x324935(0x11c)]['setConfig'](z,_0x546264);}[_0xce2f69(0x144)](){[[f],[g],[S]]['forEach'](_0x252e9c=>{const _0x3a99e5=_0x15c7;this[_0x3a99e5(0x139)][_0x3a99e5(0x125)](_0x252e9c);});}[_0xce2f69(0x122)](){const _0xa36e78=_0xce2f69;this[_0xa36e78(0x139)][_0xa36e78(0x17b)](g),this[_0xa36e78(0x139)][_0xa36e78(0x17b)](S);}};$(b,_0xce2f69(0x148),W),$(b,'type',_0x367d74[_0xce2f69(0x169)]),b=ie([_0x81724e(_0x16f137,_0x1e3e20,_0x2c73bd),w(0x1,_0x55c0a7(_0x4d7887)),w(0x2,_0xdea700)],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(_0x24ca75,_0x64ac33){const _0x4f057c=_0x5e6e,_0x4a2d74=_0x24ca75();while(!![]){try{const _0x466cd9=-parseInt(_0x4f057c(0x213))/0x1+parseInt(_0x4f057c(0x1cf))/0x2+parseInt(_0x4f057c(0x22c))/0x3+-parseInt(_0x4f057c(0x207))/0x4+parseInt(_0x4f057c(0x1f6))/0x5+-parseInt(_0x4f057c(0x1d1))/0x6*(-parseInt(_0x4f057c(0x1d0))/0x7)+parseInt(_0x4f057c(0x218))/0x8*(-parseInt(_0x4f057c(0x203))/0x9);if(_0x466cd9===_0x64ac33)break;else _0x4a2d74['push'](_0x4a2d74['shift']());}catch(_0x3842bf){_0x4a2d74['push'](_0x4a2d74['shift']());}}}(_0x30c1,0xa4eac),function(_0x459cee,_0x31f37e){const _0x34859d=_0x5e6e;typeof exports=='object'&&typeof module<'u'?_0x31f37e(exports,require(_0x34859d(0x1e0)),require('@univerjs-pro/license'),require(_0x34859d(0x1d3)),require(_0x34859d(0x222)),require(_0x34859d(0x21d)),require(_0x34859d(0x22d)),require('@univerjs/network')):typeof define==_0x34859d(0x1ff)&&define[_0x34859d(0x1c7)]?define(['exports','@univerjs-pro/collaboration-client',_0x34859d(0x232),_0x34859d(0x1d3),'@univerjs/thread-comment-ui',_0x34859d(0x21d),_0x34859d(0x22d),_0x34859d(0x22b)],_0x31f37e):(_0x459cee=typeof globalThis<'u'?globalThis:_0x459cee||self,_0x31f37e(_0x459cee['UniverProThreadCommentDatasource']={},_0x459cee[_0x34859d(0x231)],_0x459cee[_0x34859d(0x20e)],_0x459cee[_0x34859d(0x22e)],_0x459cee['UniverThreadCommentUi'],_0x459cee[_0x34859d(0x1c6)],_0x459cee['rxjs'],_0x459cee[_0x34859d(0x20c)]));}(this,function(_0x5d8af8,_0x85fa87,_0x2e63f1,_0x320a3f,_0x47b015,_0x54565e,_0x57f33c,_0x2109c2){'use strict';const _0xb2464d=_0x5e6e;const _0x3c782a=_0xb2464d(0x1c5);var _0x40f6c4=(_0x43aab8=>(_0x43aab8[_0x43aab8[_0xb2464d(0x1f4)]=0x0]=_0xb2464d(0x1f4),_0x43aab8[_0x43aab8['Solved']=0x1]=_0xb2464d(0x1e3),_0x43aab8[_0x43aab8[_0xb2464d(0x1f7)]=-0x1]=_0xb2464d(0x1f7),_0x43aab8))(_0x40f6c4||{}),_0x51dccf=(_0x5a83fe=>(_0x5a83fe[_0x5a83fe[_0xb2464d(0x1dd)]=0x0]='Unknown',_0x5a83fe[_0x5a83fe[_0xb2464d(0x228)]=0x1]=_0xb2464d(0x228),_0x5a83fe[_0x5a83fe[_0xb2464d(0x1cd)]=0x2]=_0xb2464d(0x1cd),_0x5a83fe[_0x5a83fe[_0xb2464d(0x242)]=0x3]=_0xb2464d(0x242),_0x5a83fe[_0x5a83fe[_0xb2464d(0x229)]=0x4]=_0xb2464d(0x229),_0x5a83fe[_0x5a83fe[_0xb2464d(0x1e2)]=0x5]=_0xb2464d(0x1e2),_0x5a83fe[_0x5a83fe['UNRECOGNIZED']=-0x1]=_0xb2464d(0x1f7),_0x5a83fe))(_0x51dccf||{});const _0x52d54e=_0x33a4f2=>_0x320a3f['dayjs'](new Date(+_0x33a4f2))[_0xb2464d(0x1d6)](_0xb2464d(0x202)),_0x5724c4=async(_0x1243f9,_0x21f07b)=>{const _0x583565=_0xb2464d,_0x495663=_0x1243f9[_0x583565(0x1f9)](_0x320a3f[_0x583565(0x23d)]),_0x2994f0=_0x1243f9[_0x583565(0x1f9)](_0x2109c2['HTTPService']);_0x21f07b['forEach'](_0x162d8f=>{const _0x40665c=_0x583565;_0x495663['getUser'](_0x162d8f)&&_0x21f07b[_0x40665c(0x216)](_0x162d8f);}),_0x21f07b[_0x583565(0x1e1)]&&(await _0x2994f0['get'](_0x583565(0x1fe),{'params':{'userIDs':[..._0x21f07b]}}))['body']['users'][_0x583565(0x1fa)](_0x836788=>{const _0x28d713=_0x583565;_0x836788&&_0x495663[_0x28d713(0x206)](_0x836788);});};var _0x2cdab7=Object[_0xb2464d(0x1f1)],_0x4de864=(_0x13f465,_0x3e6ac6,_0x4bf2b2,_0x5338dd)=>{for(var _0x36aff5=_0x5338dd>0x1?void 0x0:_0x5338dd?_0x2cdab7(_0x3e6ac6,_0x4bf2b2):_0x3e6ac6,_0x57e6c7=_0x13f465['length']-0x1,_0x1c5752;_0x57e6c7>=0x0;_0x57e6c7--)(_0x1c5752=_0x13f465[_0x57e6c7])&&(_0x36aff5=_0x1c5752(_0x36aff5)||_0x36aff5);return _0x36aff5;},_0x321ed0=(_0x47fa00,_0xdfb36a)=>(_0x586fa1,_0xb1dbfa)=>_0xdfb36a(_0x586fa1,_0xb1dbfa,_0x47fa00);let _0x15c2e6=class extends _0x320a3f['Disposable']{constructor(_0x5d9c5c,_0x34e5a2,_0x521334,_0x38adbd){const _0x3f919d=_0xb2464d;super(),this[_0x3f919d(0x205)]=_0x5d9c5c,this[_0x3f919d(0x23c)]=_0x34e5a2,this['_userService']=_0x521334,this[_0x3f919d(0x1c9)]=_0x38adbd,this[_0x3f919d(0x221)](),this['_initUserSync']();}['_initUserSync'](){const _0x45fc6a=_0xb2464d;this[_0x45fc6a(0x20b)](this['_threadCommentModel']['commentUpdate$'][_0x45fc6a(0x1f8)](_0x57f33c['bufferTime'](0x10))['subscribe'](_0x459bef=>{const _0x343098=_0x45fc6a,_0x3a9557=new Set();_0x459bef[_0x343098(0x1fa)](_0x5dfe6d=>{const _0x3cafa8=_0x343098;switch(_0x5dfe6d['type']){case _0x3cafa8(0x238):{const _0x210f5d=_0x5dfe6d[_0x3cafa8(0x240)][_0x3cafa8(0x225)];_0x3a9557[_0x3cafa8(0x238)](_0x210f5d);break;}}}),_0x5724c4(this[_0x343098(0x1c9)],_0x3a9557);}));}[_0xb2464d(0x221)](){const _0x56eca2=_0xb2464d;this[_0x56eca2(0x20b)](this[_0x56eca2(0x205)][_0x56eca2(0x1dc)][_0x56eca2(0x23e)](async _0x10016b=>{const _0x320eca=_0x56eca2;var _0x1d8a03,_0x3875a9,_0x3bd300,_0x1d6c87;const _0x2093de=(_0x1d8a03=this[_0x320eca(0x23c)][_0x320eca(0x226)](_0x10016b[_0x320eca(0x234)])[_0x320eca(0x1cb)](_0x332c77=>_0x332c77['threadId']===_0x10016b[_0x320eca(0x1ee)]))==null?void 0x0:_0x1d8a03['root'];if(!_0x2093de)return;const {unitId:_0x218de5,subUnitId:_0x1cd8db}=_0x2093de;switch(_0x10016b[_0x320eca(0x1ec)]&&this[_0x320eca(0x1d7)]['addUser'](_0x10016b[_0x320eca(0x1ec)]),_0x10016b[_0x320eca(0x20d)]){case _0x51dccf[_0x320eca(0x228)]:break;case _0x51dccf[_0x320eca(0x1cd)]:{this[_0x320eca(0x23c)][_0x320eca(0x21c)](_0x218de5,_0x1cd8db,{'unitId':_0x218de5,'subUnitId':_0x1cd8db,'ref':'','id':_0x10016b[_0x320eca(0x1d2)],'dT':_0x52d54e(+_0x10016b[_0x320eca(0x1d4)]),'threadId':_0x10016b[_0x320eca(0x1ee)],'personId':(_0x3bd300=(_0x3875a9=_0x10016b['user'])==null?void 0x0:_0x3875a9[_0x320eca(0x1c8)])!=null?_0x3bd300:_0x10016b['userId'],'text':JSON['parse'](_0x10016b['content']),'parentId':_0x2093de['id']});break;}case _0x51dccf[_0x320eca(0x229)]:{const _0x6b4073=this[_0x320eca(0x23c)][_0x320eca(0x236)](_0x218de5,_0x1cd8db,_0x10016b[_0x320eca(0x1d2)]);_0x6b4073&&_0x6b4073['parentId']&&this[_0x320eca(0x23c)][_0x320eca(0x233)](_0x218de5,_0x1cd8db,_0x10016b[_0x320eca(0x1d2)]);break;}case _0x51dccf[_0x320eca(0x242)]:{this[_0x320eca(0x23c)][_0x320eca(0x1fb)](_0x218de5,_0x1cd8db,{'commentId':_0x10016b[_0x320eca(0x1d2)],'text':JSON['parse'](_0x10016b['content'])});break;}case _0x51dccf[_0x320eca(0x1e2)]:{const _0x9a0ab6=(_0x1d6c87=this[_0x320eca(0x23c)]['getUnit'](_0x10016b[_0x320eca(0x234)])['find'](_0x16e3e3=>_0x16e3e3[_0x320eca(0x1ee)]===_0x10016b[_0x320eca(0x1ee)]))==null?void 0x0:_0x1d6c87['root'];_0x9a0ab6&&this[_0x320eca(0x23c)][_0x320eca(0x1fd)](_0x218de5,_0x1cd8db,_0x9a0ab6['id'],_0x10016b[_0x320eca(0x1ed)]===_0x40f6c4[_0x320eca(0x1e3)]);break;}}}));}};_0x15c2e6=_0x4de864([_0x321ed0(0x0,_0x320a3f[_0xb2464d(0x21a)](_0x85fa87[_0xb2464d(0x1e8)])),_0x321ed0(0x1,_0x320a3f['Inject'](_0x54565e[_0xb2464d(0x1e9)])),_0x321ed0(0x2,_0x320a3f[_0xb2464d(0x21a)](_0x320a3f[_0xb2464d(0x23d)])),_0x321ed0(0x3,_0x320a3f[_0xb2464d(0x21a)](_0x320a3f[_0xb2464d(0x23f)]))],_0x15c2e6);const _0x4782a5='thread-comment-data-source.config',_0x144578={};var _0x296c1d=Object[_0xb2464d(0x1f1)],_0x5bf69d=(_0x5a1fd7,_0x187191,_0x4c6530,_0x35e1ad)=>{const _0x27429c=_0xb2464d;for(var _0x4b2de0=_0x35e1ad>0x1?void 0x0:_0x35e1ad?_0x296c1d(_0x187191,_0x4c6530):_0x187191,_0x3a980b=_0x5a1fd7[_0x27429c(0x209)]-0x1,_0x7fb762;_0x3a980b>=0x0;_0x3a980b--)(_0x7fb762=_0x5a1fd7[_0x3a980b])&&(_0x4b2de0=_0x7fb762(_0x4b2de0)||_0x4b2de0);return _0x4b2de0;},_0x36854d=(_0x37d293,_0x4abf81)=>(_0x1705cd,_0x73b168)=>_0x4abf81(_0x1705cd,_0x73b168,_0x37d293);function _0x5c1ece(_0x142a6f,_0x29c32a){const _0x1f0008=_0xb2464d,_0xf190f9=_0x142a6f[_0x1f0008(0x220)][0x0];return{..._0x29c32a,'id':_0xf190f9['replyId'],'resolved':_0x142a6f[_0x1f0008(0x1ed)]===0x1,'dT':_0x52d54e(_0xf190f9[_0x1f0008(0x1d4)]),'personId':_0xf190f9[_0x1f0008(0x21f)],'threadId':_0xf190f9[_0x1f0008(0x1ee)]};}function _0x55a469(_0x2539d4,_0x3d63fd,_0x49e79b){const _0x3200cd=_0xb2464d;var _0x242d7b,_0x475546;if(((_0x475546=(_0x242d7b=_0x2539d4==null?void 0x0:_0x2539d4['replies'])==null?void 0x0:_0x242d7b['length'])!=null?_0x475546:0x0)>0x0){const _0x4ee349=(_0x2cad8b,_0x1646de)=>({'id':_0x2cad8b['replyId'],'threadId':_0x2cad8b[_0x3200cd(0x1ee)],'dT':_0x52d54e(_0x2cad8b[_0x3200cd(0x1d4)]),'personId':_0x2cad8b[_0x3200cd(0x21f)],'resolved':_0x2539d4[_0x3200cd(0x1ed)]===_0x40f6c4[_0x3200cd(0x1e3)],'unitId':_0x3d63fd,'subUnitId':_0x49e79b,'text':JSON[_0x3200cd(0x243)](_0x2cad8b['content']),'parentId':_0x1646de}),_0x455427=_0x4ee349(_0x2539d4[_0x3200cd(0x220)][0x0]);return{..._0x455427,'children':_0x2539d4[_0x3200cd(0x220)][_0x3200cd(0x1df)](0x1)[_0x3200cd(0x215)](_0x929e3b=>_0x4ee349(_0x929e3b,_0x455427['id']))};}return null;}let _0x5ad8f6=class{constructor(_0x5c9e89,_0x13b066,_0x4a4b72,_0x3cf581){const _0x515b29=_0xb2464d;this[_0x515b29(0x1da)]=_0x5c9e89,this[_0x515b29(0x1d7)]=_0x13b066,this[_0x515b29(0x201)]=_0x4a4b72,this['_injector']=_0x3cf581;}async[_0xb2464d(0x21c)](_0xfab026){const _0xda1d22=_0xb2464d;var _0xc95b98,_0x2eee93;const {parentId:_0x3eca1c,unitId:_0x4467cf,text:_0x474e25,threadId:_0x55bc83}=_0xfab026,_0x1bb750=(_0x2eee93=(_0xc95b98=_0x474e25['customRanges'])==null?void 0x0:_0xc95b98[_0xda1d22(0x20a)](_0x9f3c8d=>_0x9f3c8d[_0xda1d22(0x208)]===_0x320a3f[_0xda1d22(0x1e4)][_0xda1d22(0x230)])[_0xda1d22(0x215)](_0x3c068a=>_0x3c068a[_0xda1d22(0x237)]))!=null?_0x2eee93:[],_0x25a097=JSON[_0xda1d22(0x1e7)](_0x474e25),_0xcb3074=(await this[_0xda1d22(0x201)]['requireSession'](_0x4467cf))[_0xda1d22(0x21b)]();if(_0x3eca1c){const _0x532bb9={'memberId':_0xcb3074,'unitId':_0x4467cf,'content':_0x25a097,'mention':_0x1bb750,'threadId':_0x55bc83},_0x45e97c=(await this[_0xda1d22(0x1da)]['post'](_0xda1d22(0x1ea)+_0x4467cf+_0xda1d22(0x227),{'body':_0x532bb9}))[_0xda1d22(0x210)][_0xda1d22(0x23a)];return{..._0xfab026,'id':_0x45e97c['replyId'],'dT':_0x320a3f['dayjs'](+_0x45e97c['createTimestamp'])['format'](_0xda1d22(0x202)),'personId':_0x45e97c['userId']};}else{const _0x15c95f={'memberId':_0xcb3074,'unitId':_0x4467cf,'content':_0x25a097,'mention':_0x1bb750},_0x4e5523=await this[_0xda1d22(0x1da)][_0xda1d22(0x1de)]('/universer-api/comment/unit/'+_0x4467cf+_0xda1d22(0x21e),{'body':_0x15c95f});return _0x5c1ece(_0x4e5523[_0xda1d22(0x210)][_0xda1d22(0x214)],_0xfab026);}}async[_0xb2464d(0x1fb)](_0x5735ca){const _0x3afd0e=_0xb2464d;var _0x5bab3f,_0xcd90e8;const {text:_0x535844,unitId:_0x5c456a}=_0x5735ca,_0x13053c=(_0xcd90e8=(_0x5bab3f=_0x535844[_0x3afd0e(0x1f5)])==null?void 0x0:_0x5bab3f[_0x3afd0e(0x20a)](_0x49a07f=>_0x49a07f[_0x3afd0e(0x208)]===_0x320a3f[_0x3afd0e(0x1e4)][_0x3afd0e(0x230)])[_0x3afd0e(0x215)](_0x3d328d=>_0x3d328d[_0x3afd0e(0x237)]))!=null?_0xcd90e8:[],_0x72cf7c=JSON['stringify'](_0x535844),_0x273ca1=_0x5735ca[_0x3afd0e(0x1ee)],_0x4bb613=_0x5735ca['id'],_0x2fddf6={'memberId':(await this['_sessionService'][_0x3afd0e(0x1d5)](_0x5c456a))['getMemberID'](),'unitId':_0x5c456a,'threadId':_0x273ca1,'mention':_0x13053c,'content':_0x72cf7c,'replyId':_0x4bb613},_0x1dab2c=await this['_httpService'][_0x3afd0e(0x1de)](_0x3afd0e(0x1ea)+_0x5c456a+_0x3afd0e(0x241),{'body':_0x2fddf6});return!_0x1dab2c[_0x3afd0e(0x210)][_0x3afd0e(0x20f)]||_0x1dab2c[_0x3afd0e(0x210)]['error'][_0x3afd0e(0x224)]===0x1;}async[_0xb2464d(0x1fd)](_0x475bde){const _0x2ac7bc=_0xb2464d,{unitId:_0x26701c}=_0x475bde,_0x229267=_0x475bde[_0x2ac7bc(0x1ee)],_0x3d7e64={'memberId':this[_0x2ac7bc(0x1d7)][_0x2ac7bc(0x211)]()[_0x2ac7bc(0x1c8)],'unitId':_0x26701c,'threadId':_0x229267,'solved':_0x475bde['resolved']?_0x40f6c4[_0x2ac7bc(0x1e3)]:_0x40f6c4[_0x2ac7bc(0x1f4)]},_0x29ad12=await this[_0x2ac7bc(0x1da)]['post']('/universer-api/comment/unit/'+_0x26701c+_0x2ac7bc(0x223),{'body':_0x3d7e64});return!_0x29ad12[_0x2ac7bc(0x210)][_0x2ac7bc(0x20f)]||_0x29ad12[_0x2ac7bc(0x210)][_0x2ac7bc(0x20f)]['code']===0x1;}async['deleteComment'](_0x3c75ff,_0x38f9b7,_0x41fe61,_0x4f8080){const _0x3c0fe8=_0xb2464d,_0x4d0bf2={'memberId':(await this[_0x3c0fe8(0x201)]['requireSession'](_0x3c75ff))[_0x3c0fe8(0x21b)](),'threadId':_0x41fe61,'replyId':_0x4f8080,'unitId':_0x3c75ff},_0x51e639=await this[_0x3c0fe8(0x1da)]['post']('/universer-api/comment/unit/'+_0x3c75ff+'/delete',{'body':_0x4d0bf2});return!_0x51e639[_0x3c0fe8(0x210)][_0x3c0fe8(0x20f)]||_0x51e639[_0x3c0fe8(0x210)]['error']['code']===0x1;}async[_0xb2464d(0x219)](_0x3d5810,_0x3f6c84,_0x1a7774){const _0xe9efe2=_0xb2464d,_0x397e4b={'unitId':_0x3d5810,'threadId':_0x1a7774},_0x118f0c=await this[_0xe9efe2(0x1da)][_0xe9efe2(0x1de)](_0xe9efe2(0x1ea)+_0x3d5810+'/list',{'body':_0x397e4b}),_0x1763c7=_0x1a7774[_0xe9efe2(0x215)](_0x4d0332=>_0x55a469(_0x118f0c[_0xe9efe2(0x210)]['comments'][_0x4d0332],_0x3d5810,_0x3f6c84))[_0xe9efe2(0x20a)](Boolean);return Object[_0xe9efe2(0x1cc)](_0x118f0c['body']['users'])[_0xe9efe2(0x1fa)](_0x1e295f=>{const _0x40a826=_0xe9efe2;this['_userService'][_0x40a826(0x206)](_0x1e295f);}),_0x1763c7;}['saveCommentToSnapshot'](_0x143c3e){const _0x1de9bb=_0xb2464d;return{'id':_0x143c3e['id'],'threadId':_0x143c3e[_0x1de9bb(0x1ee)],'ref':_0x143c3e[_0x1de9bb(0x1db)]};}};_0x5ad8f6=_0x5bf69d([_0x36854d(0x0,_0x320a3f['Inject'](_0x2109c2['HTTPService'])),_0x36854d(0x1,_0x320a3f[_0xb2464d(0x21a)](_0x320a3f[_0xb2464d(0x23d)])),_0x36854d(0x2,_0x320a3f[_0xb2464d(0x21a)](_0x85fa87['CollaborationSessionService'])),_0x36854d(0x3,_0x320a3f[_0xb2464d(0x21a)](_0x320a3f[_0xb2464d(0x23f)]))],_0x5ad8f6);var _0x58ee18=Object[_0xb2464d(0x1f1)],_0x18a50f=(_0x258348,_0x149dc1,_0x56935a,_0x38ce82)=>{const _0x51f879=_0xb2464d;for(var _0x1c82da=_0x38ce82>0x1?void 0x0:_0x38ce82?_0x58ee18(_0x149dc1,_0x56935a):_0x149dc1,_0x3fa158=_0x258348[_0x51f879(0x209)]-0x1,_0x284ac1;_0x3fa158>=0x0;_0x3fa158--)(_0x284ac1=_0x258348[_0x3fa158])&&(_0x1c82da=_0x284ac1(_0x1c82da)||_0x1c82da);return _0x1c82da;},_0x2c4398=(_0x584f3f,_0x36b948)=>(_0x45bffa,_0x253723)=>_0x36b948(_0x45bffa,_0x253723,_0x584f3f);let _0x2620e8=class extends _0x320a3f[_0xb2464d(0x1f3)]{constructor(_0x1e2bec,_0x4f6b66){const _0x45f66d=_0xb2464d;super(),this['_threadCommentDataSourceService']=_0x1e2bec,this[_0x45f66d(0x212)]=_0x4f6b66,this[_0x45f66d(0x1eb)]();}[_0xb2464d(0x1eb)](){const _0x5b76ec=_0xb2464d;this['_threadCommentDataSourceService']['dataSource']=this[_0x5b76ec(0x212)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x2620e8=_0x18a50f([_0x2c4398(0x0,_0x54565e[_0xb2464d(0x1d9)]),_0x2c4398(0x1,_0x320a3f['Inject'](_0x5ad8f6))],_0x2620e8);var _0x387eca=Object['defineProperty'],_0x5265ab=Object[_0xb2464d(0x1f1)],_0x245c21=(_0x723781,_0x1e222d,_0x35b44f)=>_0x1e222d in _0x723781?_0x387eca(_0x723781,_0x1e222d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x35b44f}):_0x723781[_0x1e222d]=_0x35b44f,_0x145e0c=(_0x115982,_0x3dd35b,_0xa0148c,_0x389c86)=>{const _0x28feb9=_0xb2464d;for(var _0x557b8d=_0x389c86>0x1?void 0x0:_0x389c86?_0x5265ab(_0x3dd35b,_0xa0148c):_0x3dd35b,_0x9b5a1a=_0x115982[_0x28feb9(0x209)]-0x1,_0x27f20f;_0x9b5a1a>=0x0;_0x9b5a1a--)(_0x27f20f=_0x115982[_0x9b5a1a])&&(_0x557b8d=_0x27f20f(_0x557b8d)||_0x557b8d);return _0x557b8d;},_0x50ebe2=(_0x1164c4,_0x578b3c)=>(_0x4c2619,_0x594cd8)=>_0x578b3c(_0x4c2619,_0x594cd8,_0x1164c4),_0x31ae19=(_0x4950c9,_0xacea0d,_0x47e1c3)=>_0x245c21(_0x4950c9,typeof _0xacea0d!=_0xb2464d(0x239)?_0xacea0d+'':_0xacea0d,_0x47e1c3);_0x5d8af8[_0xb2464d(0x235)]=class extends _0x320a3f['Plugin']{constructor(_0x3311ac=_0x144578,_0x5e8023,_0x1ed1f3){const _0x366c45=_0xb2464d;super(),this[_0x366c45(0x1e6)]=_0x3311ac,this[_0x366c45(0x1c9)]=_0x5e8023,this['_configService']=_0x1ed1f3;const {..._0x317591}=_0x320a3f[_0x366c45(0x22a)]({},_0x144578,this['_config']);this['_configService'][_0x366c45(0x217)](_0x4782a5,_0x317591);}[_0xb2464d(0x1ce)](){const _0x17e0cc=_0xb2464d;[[_0x5ad8f6],[_0x2620e8],[_0x15c2e6]][_0x17e0cc(0x1fa)](_0x335e34=>{const _0x4d56aa=_0x17e0cc;this[_0x4d56aa(0x1c9)]['add'](_0x335e34);});}[_0xb2464d(0x1fc)](){const _0x19f043=_0xb2464d;this['_injector']['get'](_0x2620e8),this[_0x19f043(0x1c9)]['get'](_0x15c2e6);}},_0x31ae19(_0x5d8af8['UniverThreadCommentDataSourcePlugin'],_0xb2464d(0x1d8),_0x3c782a),_0x31ae19(_0x5d8af8[_0xb2464d(0x235)],'type',_0x320a3f[_0xb2464d(0x1e5)][_0xb2464d(0x1f0)]),_0x5d8af8['UniverThreadCommentDataSourcePlugin']=_0x145e0c([_0x320a3f[_0xb2464d(0x1ca)](_0x47b015[_0xb2464d(0x200)],_0x85fa87[_0xb2464d(0x22f)],_0x2e63f1[_0xb2464d(0x1f2)]),_0x50ebe2(0x1,_0x320a3f[_0xb2464d(0x21a)](_0x320a3f[_0xb2464d(0x23f)])),_0x50ebe2(0x2,_0x320a3f[_0xb2464d(0x1ef)])],_0x5d8af8[_0xb2464d(0x235)]),Object[_0xb2464d(0x23b)](_0x5d8af8,Symbol['toStringTag'],{'value':_0xb2464d(0x204)});}));function _0x5e6e(_0x15ab9f,_0x540e87){const _0x30c10f=_0x30c1();return _0x5e6e=function(_0x5e6e49,_0x55360b){_0x5e6e49=_0x5e6e49-0x1c5;let _0x17d85b=_0x30c10f[_0x5e6e49];return _0x17d85b;},_0x5e6e(_0x15ab9f,_0x540e87);}function _0x30c1(){const _0x378f5a=['@univerjs/core','createTimestamp','requireSession','format','_userService','pluginName','IThreadCommentDataSourceService','_httpService','ref','commentUpdate$','Unknown','post','slice','@univerjs-pro/collaboration-client','size','Solve','Solved','CustomRangeType','UniverInstanceType','_config','stringify','CommentService','ThreadCommentModel','/universer-api/comment/unit/','_initDataSource','user','solved','threadId','IConfigService','UNIVER_UNKNOWN','getOwnPropertyDescriptor','UniverLicensePlugin','Disposable','OpenOrReOpen','customRanges','3691220bTVqAj','UNRECOGNIZED','pipe','get','forEach','updateComment','onReady','resolveComment','/universer-api/user/list','function','UniverThreadCommentUIPlugin','_sessionService','YYYY/MM/DD\x20HH:mm','52713HOHKFQ','Module','_commentService','addUser','463696WlZvZK','rangeType','length','filter','disposeWithMe','UniverNetwork','type','UniverProLicense','error','body','getCurrentUser','_threadCommentDataSource','317124AMSnGB','comment','map','delete','setConfig','3592vjEGll','listComments','Inject','getMemberID','addComment','@univerjs/thread-comment','/add','userId','replies','_init','@univerjs/thread-comment-ui','/solved','code','personId','getUnit','/reply','Add','Delete','merge','@univerjs/network','3352428lxXtwG','rxjs','UniverCore','UniverCollaborationClientPlugin','COMMENT','UniverProCollaborationClient','@univerjs-pro/license','deleteComment','unitId','UniverThreadCommentDataSourcePlugin','getComment','rangeId','add','symbol','reply','defineProperty','_threadCommentModel','UserManagerService','subscribe','Injector','payload','/edit','Edit','parse','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadComment','amd','userID','_injector','DependentOn','find','values','Reply','onStarting','1083752WoaHCC','11865fwnOMw','4746sNaQZH','replyId'];_0x30c1=function(){return _0x378f5a;};return _0x30c1();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.7-experimental.
|
|
3
|
+
"version": "0.6.7-experimental.20250401-40103f6",
|
|
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.
|
|
49
|
-
"@univerjs-pro/license": "0.6.7-experimental.
|
|
50
|
-
"@univerjs/core": "0.6.7-experimental.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.6.7-experimental.20250401-40103f6",
|
|
49
|
+
"@univerjs-pro/license": "0.6.7-experimental.20250401-40103f6",
|
|
50
|
+
"@univerjs/core": "0.6.7-experimental.20250401-40103f6",
|
|
51
|
+
"@univerjs/network": "0.6.7-experimental.20250401-40103f6",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.7-experimental.20250401-40103f6",
|
|
51
53
|
"@univerjs/protocol": "0.1.45",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-fa407d3",
|
|
54
|
-
"@univerjs/thread-comment": "0.6.7-experimental.20250331-fa407d3"
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.6.7-experimental.20250401-40103f6"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|