@univerjs-pro/thread-comment-datasource 0.10.4 → 0.10.5-nightly.202508290716
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 +10 -10
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x160246=_0x14ee;(function(_0x7f3510,_0xc15499){const _0x3c8db8=_0x14ee,_0x4a7be3=_0x7f3510();while(!![]){try{const _0x244453=parseInt(_0x3c8db8(0x121))/0x1*(parseInt(_0x3c8db8(0x115))/0x2)+-parseInt(_0x3c8db8(0xff))/0x3+-parseInt(_0x3c8db8(0x151))/0x4+-parseInt(_0x3c8db8(0x137))/0x5*(-parseInt(_0x3c8db8(0x124))/0x6)+parseInt(_0x3c8db8(0x16b))/0x7+-parseInt(_0x3c8db8(0x12f))/0x8+-parseInt(_0x3c8db8(0xf7))/0x9*(parseInt(_0x3c8db8(0x105))/0xa);if(_0x244453===_0xc15499)break;else _0x4a7be3['push'](_0x4a7be3['shift']());}catch(_0x482d83){_0x4a7be3['push'](_0x4a7be3['shift']());}}}(_0x5966,0xc4b30));Object['defineProperty'](exports,Symbol[_0x160246(0x10c)],{'value':_0x160246(0x125)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x160246(0x148);var I=(_0x4bfd3b=>(_0x4bfd3b[_0x4bfd3b[_0x160246(0x127)]=0x0]='OpenOrReOpen',_0x4bfd3b[_0x4bfd3b[_0x160246(0x143)]=0x1]=_0x160246(0x143),_0x4bfd3b[_0x4bfd3b[_0x160246(0x141)]=-0x1]='UNRECOGNIZED',_0x4bfd3b))(I||{}),v=(_0x2fa134=>(_0x2fa134[_0x2fa134['Unknown']=0x0]=_0x160246(0x167),_0x2fa134[_0x2fa134['Add']=0x1]=_0x160246(0x112),_0x2fa134[_0x2fa134[_0x160246(0x104)]=0x2]=_0x160246(0x104),_0x2fa134[_0x2fa134[_0x160246(0x118)]=0x3]=_0x160246(0x118),_0x2fa134[_0x2fa134[_0x160246(0x153)]=0x4]='Delete',_0x2fa134[_0x2fa134[_0x160246(0x10a)]=0x5]=_0x160246(0x10a),_0x2fa134[_0x2fa134[_0x160246(0x141)]=-0x1]=_0x160246(0x141),_0x2fa134))(v||{});const f=_0x8d1d73=>c[_0x160246(0x13b)](new Date(+_0x8d1d73))[_0x160246(0x133)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x16d754,_0x3f2782)=>{const _0x1b299f=_0x160246,_0x18111a=_0x16d754['get'](c[_0x1b299f(0x157)]),_0x5b099e=_0x16d754[_0x1b299f(0x11d)](P[_0x1b299f(0x11f)]);_0x3f2782[_0x1b299f(0x117)](_0x284019=>{const _0x32add5=_0x1b299f;_0x18111a[_0x32add5(0x16a)](_0x284019)&&_0x3f2782['delete'](_0x284019);}),_0x3f2782[_0x1b299f(0x146)]&&(await _0x5b099e[_0x1b299f(0x11d)](_0x1b299f(0x10b),{'params':{'userIDs':[..._0x3f2782]}}))['body'][_0x1b299f(0x136)][_0x1b299f(0x117)](_0x26ace4=>{const _0x181c96=_0x1b299f;_0x26ace4&&_0x18111a[_0x181c96(0xf6)](_0x26ace4);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x301fef,_0x1bf904,_0x12d62b,_0x470527)=>{const _0x51dbb0=_0x160246;for(var _0x80a061=_0x470527>0x1?void 0x0:_0x470527?$(_0x1bf904,_0x12d62b):_0x1bf904,_0x2a1c6b=_0x301fef[_0x51dbb0(0x14e)]-0x1,_0x2589a4;_0x2a1c6b>=0x0;_0x2a1c6b--)(_0x2589a4=_0x301fef[_0x2a1c6b])&&(_0x80a061=_0x2589a4(_0x80a061)||_0x80a061);return _0x80a061;},S=(_0x242c7d,_0x5f0004)=>(_0x225251,_0x4d1f5f)=>_0x5f0004(_0x225251,_0x4d1f5f,_0x242c7d);function _0x5966(){const _0x405089=['/delete','/universer-api/comment/unit/','Injector','length','listComments','IConfigService','6269816BVSNJs','ThreadCommentModel','Delete','COMMENT','CustomRangeType','_threadCommentDataSourceService','UserManagerService','map','userId','code','UniverThreadCommentUIPlugin','_injector','root','threadId','_commentService','defineProperty','payload','UniverLicensePlugin','_initUserSync','_userService','error','setConfig','Unknown','add','post','getUser','3934238cqaCzb','replyId','getUnit','addUser','3700287lawVRq','dataSource','_threadCommentModel','user','filter','comment','_config','UniverCollaborationClientPlugin','524286TFPInK','customRanges','UniverInstanceType','Inject','getOwnPropertyDescriptor','Reply','10whGJLz','getCurrentUser','_init','deleteComment','subscribe','Solve','/universer-api/user/list','toStringTag','onStarting','pluginName','/solved','UniverThreadCommentDataSourcePlugin','rangeType','Add','personId','_threadCommentDataSource','2SUPQqx','Disposable','forEach','Edit','find','onReady','/reply','resolved','get','solved','HTTPService','_configService','1261812NwmUbV','commentUpdate$','rangeId','30NgznJY','Module','resolveComment','OpenOrReOpen','merge','thread-comment-data-source.config','addComment','getComment','getMemberID','reply','createTimestamp','3072256qiQpbw','disposeWithMe','_sessionService','DependentOn','format','requireSession','bufferTime','users','1519225kgSVgZ','body','IThreadCommentDataSourceService','userID','dayjs','Plugin','CommentService','_httpService','stringify','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','syncUpdateMutationToColla','Solved','unitId','parse','size','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','replies','content'];_0x5966=function(){return _0x405089;};return _0x5966();}let _=class extends c[_0x160246(0x116)]{constructor(_0x3ea0cb,_0x32bdb1,_0x56e76b,_0x428746){const _0x13ceae=_0x160246;super(),this['_commentService']=_0x3ea0cb,this[_0x13ceae(0xf9)]=_0x32bdb1,this[_0x13ceae(0x164)]=_0x56e76b,this[_0x13ceae(0x15c)]=_0x428746,this[_0x13ceae(0x107)](),this[_0x13ceae(0x163)]();}[_0x160246(0x163)](){const _0x195e3=_0x160246;this['disposeWithMe'](this[_0x195e3(0xf9)][_0x195e3(0x122)]['pipe'](j[_0x195e3(0x135)](0x10))[_0x195e3(0x109)](_0x1021d9=>{const _0x20b88f=_0x195e3,_0x643596=new Set();_0x1021d9[_0x20b88f(0x117)](_0x48d411=>{const _0x57a260=_0x20b88f;switch(_0x48d411[_0x57a260(0x147)]){case _0x57a260(0x168):{const _0x22e78e=_0x48d411[_0x57a260(0x161)][_0x57a260(0x113)];_0x643596[_0x57a260(0x168)](_0x22e78e);break;}}}),R(this[_0x20b88f(0x15c)],_0x643596);}));}[_0x160246(0x107)](){const _0x1304ea=_0x160246;this[_0x1304ea(0x130)](this[_0x1304ea(0x15f)][_0x1304ea(0x122)][_0x1304ea(0x109)](async _0x402da2=>{const _0x2c4b1f=_0x1304ea;var _0x753108,_0x12395b,_0x4d6f6a,_0x4575a1;const _0x1b5e44=(_0x753108=this['_threadCommentModel'][_0x2c4b1f(0xf5)](_0x402da2[_0x2c4b1f(0x144)])[_0x2c4b1f(0x119)](_0x2ca21e=>_0x2ca21e['threadId']===_0x402da2[_0x2c4b1f(0x15e)]))==null?void 0x0:_0x753108['root'];if(!_0x1b5e44)return;const {unitId:_0x134023,subUnitId:_0x149572}=_0x1b5e44;switch(_0x402da2[_0x2c4b1f(0xfa)]&&this[_0x2c4b1f(0x164)][_0x2c4b1f(0xf6)](_0x402da2[_0x2c4b1f(0xfa)]),_0x402da2[_0x2c4b1f(0x147)]){case v[_0x2c4b1f(0x112)]:break;case v[_0x2c4b1f(0x104)]:{this['_threadCommentModel'][_0x2c4b1f(0x12a)](_0x134023,_0x149572,{'unitId':_0x134023,'subUnitId':_0x149572,'ref':'','id':_0x402da2[_0x2c4b1f(0x16c)],'dT':f(+_0x402da2[_0x2c4b1f(0x12e)]),'threadId':_0x402da2[_0x2c4b1f(0x15e)],'personId':(_0x4d6f6a=(_0x12395b=_0x402da2[_0x2c4b1f(0xfa)])==null?void 0x0:_0x12395b[_0x2c4b1f(0x13a)])!=null?_0x4d6f6a:_0x402da2[_0x2c4b1f(0x159)],'text':JSON[_0x2c4b1f(0x145)](_0x402da2[_0x2c4b1f(0x14a)]),'parentId':_0x1b5e44['id']});break;}case v[_0x2c4b1f(0x153)]:{const _0x2ead06=this['_threadCommentModel'][_0x2c4b1f(0x12b)](_0x134023,_0x149572,_0x402da2[_0x2c4b1f(0x16c)]);_0x2ead06&&_0x2ead06['parentId']&&this['_threadCommentModel'][_0x2c4b1f(0x108)](_0x134023,_0x149572,_0x402da2[_0x2c4b1f(0x16c)]);break;}case v[_0x2c4b1f(0x118)]:{this[_0x2c4b1f(0xf9)]['updateComment'](_0x134023,_0x149572,{'commentId':_0x402da2[_0x2c4b1f(0x16c)],'text':JSON[_0x2c4b1f(0x145)](_0x402da2[_0x2c4b1f(0x14a)])});break;}case v[_0x2c4b1f(0x10a)]:{const _0x4df749=(_0x4575a1=this[_0x2c4b1f(0xf9)][_0x2c4b1f(0xf5)](_0x402da2[_0x2c4b1f(0x144)])[_0x2c4b1f(0x119)](_0x4fc042=>_0x4fc042[_0x2c4b1f(0x15e)]===_0x402da2['threadId']))==null?void 0x0:_0x4575a1[_0x2c4b1f(0x15d)];_0x4df749&&this['_threadCommentModel'][_0x2c4b1f(0x126)](_0x134023,_0x149572,_0x4df749['id'],_0x402da2['solved']===I[_0x2c4b1f(0x143)]);break;}}}));}};_=E([S(0x0,c[_0x160246(0x102)](b[_0x160246(0x13d)])),S(0x1,c[_0x160246(0x102)](M[_0x160246(0x152)])),S(0x2,c[_0x160246(0x102)](c[_0x160246(0x157)])),S(0x3,c[_0x160246(0x102)](c[_0x160246(0x14d)]))],_);const q=_0x160246(0x129),D={};var A=Object[_0x160246(0x103)],x=(_0x1ec01f,_0xc38319,_0x169307,_0x5e68c3)=>{const _0xdebd9b=_0x160246;for(var _0x307573=_0x5e68c3>0x1?void 0x0:_0x5e68c3?A(_0xc38319,_0x169307):_0xc38319,_0x2a5695=_0x1ec01f[_0xdebd9b(0x14e)]-0x1,_0x2512fb;_0x2a5695>=0x0;_0x2a5695--)(_0x2512fb=_0x1ec01f[_0x2a5695])&&(_0x307573=_0x2512fb(_0x307573)||_0x307573);return _0x307573;},C=(_0x4c2b06,_0x40bcb8)=>(_0x87b131,_0x36de04)=>_0x40bcb8(_0x87b131,_0x36de04,_0x4c2b06);function Y(_0x570d27,_0x39bf6b){const _0x2b7c70=_0x160246,_0x32463f=_0x570d27[_0x2b7c70(0x149)][0x0];return{..._0x39bf6b,'id':_0x32463f[_0x2b7c70(0x16c)],'resolved':_0x570d27[_0x2b7c70(0x11e)]===0x1,'dT':f(_0x32463f[_0x2b7c70(0x12e)]),'personId':_0x32463f[_0x2b7c70(0x159)],'threadId':_0x32463f['threadId']};}function G(_0x16b94f,_0x554507,_0x3c79c1){const _0x28468e=_0x160246;var _0x50fef3,_0x1a48c0;if(((_0x1a48c0=(_0x50fef3=_0x16b94f==null?void 0x0:_0x16b94f[_0x28468e(0x149)])==null?void 0x0:_0x50fef3[_0x28468e(0x14e)])!=null?_0x1a48c0:0x0)>0x0){const _0x622544=(_0x3d1ba6,_0x3e2b1c)=>({'id':_0x3d1ba6[_0x28468e(0x16c)],'threadId':_0x3d1ba6['threadId'],'dT':f(_0x3d1ba6[_0x28468e(0x12e)]),'personId':_0x3d1ba6[_0x28468e(0x159)],'resolved':_0x16b94f['solved']===I['Solved'],'unitId':_0x554507,'subUnitId':_0x3c79c1,'text':JSON[_0x28468e(0x145)](_0x3d1ba6['content']),'parentId':_0x3e2b1c}),_0x272e06=_0x622544(_0x16b94f[_0x28468e(0x149)][0x0]);return{..._0x272e06,'children':_0x16b94f['replies']['slice'](0x1)[_0x28468e(0x158)](_0x34207f=>_0x622544(_0x34207f,_0x272e06['id']))};}return null;}let p=class{constructor(_0x27ddbd,_0xbc92a3,_0x49c3eb){const _0x2c19f0=_0x160246;this[_0x2c19f0(0x13e)]=_0x27ddbd,this[_0x2c19f0(0x164)]=_0xbc92a3,this[_0x2c19f0(0x131)]=_0x49c3eb;}async[_0x160246(0x12a)](_0x56da60){const _0xe59f3e=_0x160246;var _0x1003cc,_0x5e12d9;const {parentId:_0x3f8470,unitId:_0x4ae093,text:_0x16b997,threadId:_0x581270}=_0x56da60,_0x457696=(_0x5e12d9=(_0x1003cc=_0x16b997[_0xe59f3e(0x100)])==null?void 0x0:_0x1003cc[_0xe59f3e(0xfb)](_0x27b806=>_0x27b806[_0xe59f3e(0x111)]===c[_0xe59f3e(0x155)][_0xe59f3e(0x154)])[_0xe59f3e(0x158)](_0x357565=>_0x357565[_0xe59f3e(0x123)]))!=null?_0x5e12d9:[],_0x449f9d=JSON[_0xe59f3e(0x13f)](_0x16b997),_0x39811f=(await this[_0xe59f3e(0x131)][_0xe59f3e(0x134)](_0x4ae093))['getMemberID']();if(_0x3f8470){const _0x388c66={'memberId':_0x39811f,'unitId':_0x4ae093,'content':_0x449f9d,'mention':_0x457696,'threadId':_0x581270},_0x4632fc=(await this[_0xe59f3e(0x13e)][_0xe59f3e(0x169)](_0xe59f3e(0x14c)+_0x4ae093+_0xe59f3e(0x11b),{'body':_0x388c66}))['body'][_0xe59f3e(0x12d)];return{..._0x56da60,'id':_0x4632fc[_0xe59f3e(0x16c)],'dT':c[_0xe59f3e(0x13b)](+_0x4632fc[_0xe59f3e(0x12e)])['format'](_0xe59f3e(0x140)),'personId':_0x4632fc[_0xe59f3e(0x159)]};}else{const _0x267375={'memberId':_0x39811f,'unitId':_0x4ae093,'content':_0x449f9d,'mention':_0x457696},_0x4219b8=await this[_0xe59f3e(0x13e)][_0xe59f3e(0x169)](_0xe59f3e(0x14c)+_0x4ae093+'/add',{'body':_0x267375});return Y(_0x4219b8['body'][_0xe59f3e(0xfc)],_0x56da60);}}async['updateComment'](_0x499448){const _0x4f9f48=_0x160246;var _0x412d94,_0x13fad7;const {text:_0x126f1a,unitId:_0x5e1a7a}=_0x499448,_0x2a0476=(_0x13fad7=(_0x412d94=_0x126f1a['customRanges'])==null?void 0x0:_0x412d94['filter'](_0x3ab46d=>_0x3ab46d[_0x4f9f48(0x111)]===c[_0x4f9f48(0x155)][_0x4f9f48(0x154)])[_0x4f9f48(0x158)](_0x51f620=>_0x51f620[_0x4f9f48(0x123)]))!=null?_0x13fad7:[],_0x2af9c6=JSON[_0x4f9f48(0x13f)](_0x126f1a),_0x1a61f2=_0x499448[_0x4f9f48(0x15e)],_0x238735=_0x499448['id'],_0x50cff9={'memberId':(await this[_0x4f9f48(0x131)][_0x4f9f48(0x134)](_0x5e1a7a))[_0x4f9f48(0x12c)](),'unitId':_0x5e1a7a,'threadId':_0x1a61f2,'mention':_0x2a0476,'content':_0x2af9c6,'replyId':_0x238735},_0x2b6c78=await this[_0x4f9f48(0x13e)]['post'](_0x4f9f48(0x14c)+_0x5e1a7a+'/edit',{'body':_0x50cff9});return!_0x2b6c78[_0x4f9f48(0x138)][_0x4f9f48(0x165)]||_0x2b6c78[_0x4f9f48(0x138)][_0x4f9f48(0x165)][_0x4f9f48(0x15a)]===0x1;}async[_0x160246(0x126)](_0x1643f1){const _0x8b7900=_0x160246,{unitId:_0x66fde4}=_0x1643f1,_0xa4ca85=_0x1643f1[_0x8b7900(0x15e)],_0x329331={'memberId':this[_0x8b7900(0x164)][_0x8b7900(0x106)]()[_0x8b7900(0x13a)],'unitId':_0x66fde4,'threadId':_0xa4ca85,'solved':_0x1643f1[_0x8b7900(0x11c)]?I[_0x8b7900(0x143)]:I[_0x8b7900(0x127)]},_0x451097=await this[_0x8b7900(0x13e)]['post']('/universer-api/comment/unit/'+_0x66fde4+_0x8b7900(0x10f),{'body':_0x329331});return!_0x451097['body'][_0x8b7900(0x165)]||_0x451097[_0x8b7900(0x138)][_0x8b7900(0x165)]['code']===0x1;}async['deleteComment'](_0x3c44c4,_0x215a73,_0x4d7dea,_0x59fb20){const _0x5b875b=_0x160246,_0x133097={'memberId':(await this[_0x5b875b(0x131)][_0x5b875b(0x134)](_0x3c44c4))[_0x5b875b(0x12c)](),'threadId':_0x4d7dea,'replyId':_0x59fb20,'unitId':_0x3c44c4},_0x4a0e85=await this[_0x5b875b(0x13e)][_0x5b875b(0x169)](_0x5b875b(0x14c)+_0x3c44c4+_0x5b875b(0x14b),{'body':_0x133097});return!_0x4a0e85[_0x5b875b(0x138)][_0x5b875b(0x165)]||_0x4a0e85[_0x5b875b(0x138)][_0x5b875b(0x165)][_0x5b875b(0x15a)]===0x1;}async[_0x160246(0x14f)](_0x19aa03,_0x1585b0,_0x4a1dcd){const _0x58dfaa=_0x160246,_0x42f6b0={'unitId':_0x19aa03,'threadId':_0x4a1dcd},_0x483f2d=await this[_0x58dfaa(0x13e)][_0x58dfaa(0x169)](_0x58dfaa(0x14c)+_0x19aa03+'/list',{'body':_0x42f6b0}),_0x3edb62=_0x4a1dcd[_0x58dfaa(0x158)](_0x5b389f=>G(_0x483f2d[_0x58dfaa(0x138)]['comments'][_0x5b389f],_0x19aa03,_0x1585b0))[_0x58dfaa(0xfb)](Boolean);return Object['values'](_0x483f2d['body'][_0x58dfaa(0x136)])[_0x58dfaa(0x117)](_0x445022=>{const _0x217882=_0x58dfaa;this[_0x217882(0x164)]['addUser'](_0x445022);}),_0x3edb62;}['saveCommentToSnapshot'](_0x5a946f){return{'id':_0x5a946f['id'],'threadId':_0x5a946f['threadId'],'ref':_0x5a946f['ref']};}};function _0x14ee(_0x23d1bd,_0xadf7ec){const _0x5966b0=_0x5966();return _0x14ee=function(_0x14eeaa,_0x4d9861){_0x14eeaa=_0x14eeaa-0xf5;let _0x135ea2=_0x5966b0[_0x14eeaa];return _0x135ea2;},_0x14ee(_0x23d1bd,_0xadf7ec);}p=x([C(0x0,c[_0x160246(0x102)](P[_0x160246(0x11f)])),C(0x1,c[_0x160246(0x102)](c[_0x160246(0x157)])),C(0x2,c[_0x160246(0x102)](b['CollaborationSessionService']))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x5923bc,_0xea9f63,_0x27de2c,_0x3adc75)=>{const _0x2b377e=_0x160246;for(var _0x23e196=_0x3adc75>0x1?void 0x0:_0x3adc75?H(_0xea9f63,_0x27de2c):_0xea9f63,_0x22e8db=_0x5923bc[_0x2b377e(0x14e)]-0x1,_0x3de8e8;_0x22e8db>=0x0;_0x22e8db--)(_0x3de8e8=_0x5923bc[_0x22e8db])&&(_0x23e196=_0x3de8e8(_0x23e196)||_0x23e196);return _0x23e196;},y=(_0x582289,_0x289416)=>(_0x4d3c00,_0x45c004)=>_0x289416(_0x4d3c00,_0x45c004,_0x582289);let g=class extends c[_0x160246(0x116)]{constructor(_0x2378d9,_0x3dcf47){const _0x7127c0=_0x160246;super(),this[_0x7127c0(0x156)]=_0x2378d9,this[_0x7127c0(0x114)]=_0x3dcf47,this['_initDataSource']();}['_initDataSource'](){const _0x27e22f=_0x160246;this[_0x27e22f(0x156)][_0x27e22f(0xf8)]=this[_0x27e22f(0x114)],this[_0x27e22f(0x156)][_0x27e22f(0x142)]=!0x1;}};g=J([y(0x0,M[_0x160246(0x139)]),y(0x1,c[_0x160246(0x102)](p))],g);var F=Object[_0x160246(0x160)],L=Object[_0x160246(0x103)],Z=(_0x4272d3,_0x57b29e,_0x488d69)=>_0x57b29e in _0x4272d3?F(_0x4272d3,_0x57b29e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x488d69}):_0x4272d3[_0x57b29e]=_0x488d69,W=(_0x34eaac,_0x6f1155,_0xd62a72,_0x24da76)=>{for(var _0x24d431=_0x24da76>0x1?void 0x0:_0x24da76?L(_0x6f1155,_0xd62a72):_0x6f1155,_0x4ec8bf=_0x34eaac['length']-0x1,_0x2b1113;_0x4ec8bf>=0x0;_0x4ec8bf--)(_0x2b1113=_0x34eaac[_0x4ec8bf])&&(_0x24d431=_0x2b1113(_0x24d431)||_0x24d431);return _0x24d431;},O=(_0x77ed69,_0x2a6b7d)=>(_0x3720f8,_0x2c2e10)=>_0x2a6b7d(_0x3720f8,_0x2c2e10,_0x77ed69),N=(_0x3b095b,_0x5e00dd,_0x10ae7d)=>Z(_0x3b095b,typeof _0x5e00dd!='symbol'?_0x5e00dd+'':_0x5e00dd,_0x10ae7d);exports[_0x160246(0x110)]=class extends c[_0x160246(0x13c)]{constructor(_0x1fbddb=D,_0x1bc861,_0x3bbd8d){const _0x4cb4f9=_0x160246;super(),this[_0x4cb4f9(0xfd)]=_0x1fbddb,this[_0x4cb4f9(0x15c)]=_0x1bc861,this[_0x4cb4f9(0x120)]=_0x3bbd8d;const {..._0x4387ab}=c[_0x4cb4f9(0x128)]({},D,this[_0x4cb4f9(0xfd)]);this[_0x4cb4f9(0x120)][_0x4cb4f9(0x166)](q,_0x4387ab);}[_0x160246(0x10d)](){const _0x41b1b0=_0x160246;[[p],[g],[_]][_0x41b1b0(0x117)](_0x198228=>{const _0x4b00ca=_0x41b1b0;this[_0x4b00ca(0x15c)][_0x4b00ca(0x168)](_0x198228);});}[_0x160246(0x11a)](){const _0x29ea0c=_0x160246;this[_0x29ea0c(0x15c)][_0x29ea0c(0x11d)](g),this[_0x29ea0c(0x15c)][_0x29ea0c(0x11d)](_);}},N(exports[_0x160246(0x110)],_0x160246(0x10e),U),N(exports[_0x160246(0x110)],_0x160246(0x147),c[_0x160246(0x101)]['UNIVER_UNKNOWN']),exports[_0x160246(0x110)]=W([c[_0x160246(0x132)](w[_0x160246(0x15b)],b[_0x160246(0xfe)],T[_0x160246(0x162)]),O(0x1,c[_0x160246(0x102)](c[_0x160246(0x14d)])),O(0x2,c[_0x160246(0x150)])],exports[_0x160246(0x110)]);
|
|
1
|
+
'use strict';const _0x18ef15=_0x1e63;(function(_0x2eb40f,_0x523a4c){const _0x49a255=_0x1e63,_0x501553=_0x2eb40f();while(!![]){try{const _0x1774ec=parseInt(_0x49a255(0x13d))/0x1+-parseInt(_0x49a255(0x14a))/0x2*(parseInt(_0x49a255(0x148))/0x3)+-parseInt(_0x49a255(0x11a))/0x4+parseInt(_0x49a255(0x11b))/0x5+-parseInt(_0x49a255(0x141))/0x6+parseInt(_0x49a255(0xfd))/0x7*(parseInt(_0x49a255(0x112))/0x8)+parseInt(_0x49a255(0xe3))/0x9*(-parseInt(_0x49a255(0x114))/0xa);if(_0x1774ec===_0x523a4c)break;else _0x501553['push'](_0x501553['shift']());}catch(_0x2e76bb){_0x501553['push'](_0x501553['shift']());}}}(_0x3caf,0x9e0a8));Object[_0x18ef15(0x106)](exports,Symbol['toStringTag'],{'value':_0x18ef15(0xfe)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x18ef15(0x153);var I=(_0x5ad475=>(_0x5ad475[_0x5ad475[_0x18ef15(0x117)]=0x0]=_0x18ef15(0x117),_0x5ad475[_0x5ad475[_0x18ef15(0x102)]=0x1]=_0x18ef15(0x102),_0x5ad475[_0x5ad475[_0x18ef15(0x119)]=-0x1]=_0x18ef15(0x119),_0x5ad475))(I||{}),v=(_0xeb222e=>(_0xeb222e[_0xeb222e[_0x18ef15(0x10e)]=0x0]=_0x18ef15(0x10e),_0xeb222e[_0xeb222e[_0x18ef15(0x10a)]=0x1]=_0x18ef15(0x10a),_0xeb222e[_0xeb222e['Reply']=0x2]=_0x18ef15(0xe7),_0xeb222e[_0xeb222e[_0x18ef15(0x147)]=0x3]=_0x18ef15(0x147),_0xeb222e[_0xeb222e[_0x18ef15(0x129)]=0x4]=_0x18ef15(0x129),_0xeb222e[_0xeb222e['Solve']=0x5]=_0x18ef15(0x104),_0xeb222e[_0xeb222e[_0x18ef15(0x119)]=-0x1]=_0x18ef15(0x119),_0xeb222e))(v||{});const f=_0x464e0c=>c['dayjs'](new Date(+_0x464e0c))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x18957d,_0x36c24a)=>{const _0xaa2bc7=_0x18ef15,_0x5c0d0d=_0x18957d[_0xaa2bc7(0x14e)](c[_0xaa2bc7(0x13a)]),_0x3b7c21=_0x18957d[_0xaa2bc7(0x14e)](P[_0xaa2bc7(0xf9)]);_0x36c24a[_0xaa2bc7(0x145)](_0x173307=>{const _0x245cae=_0xaa2bc7;_0x5c0d0d[_0x245cae(0xf1)](_0x173307)&&_0x36c24a[_0x245cae(0x149)](_0x173307);}),_0x36c24a[_0xaa2bc7(0x158)]&&(await _0x3b7c21[_0xaa2bc7(0x14e)]('/universer-api/user/list',{'params':{'userIDs':[..._0x36c24a]}}))[_0xaa2bc7(0x11c)][_0xaa2bc7(0x13c)][_0xaa2bc7(0x145)](_0x52ce37=>{const _0x2b9ba7=_0xaa2bc7;_0x52ce37&&_0x5c0d0d[_0x2b9ba7(0x111)](_0x52ce37);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x539bd8,_0x12caae,_0x399d5c,_0x17283c)=>{const _0x31bcd0=_0x18ef15;for(var _0x3117b3=_0x17283c>0x1?void 0x0:_0x17283c?$(_0x12caae,_0x399d5c):_0x12caae,_0x1f74d1=_0x539bd8[_0x31bcd0(0x144)]-0x1,_0x20e42d;_0x1f74d1>=0x0;_0x1f74d1--)(_0x20e42d=_0x539bd8[_0x1f74d1])&&(_0x3117b3=_0x20e42d(_0x3117b3)||_0x3117b3);return _0x3117b3;},S=(_0x543657,_0x1f89e7)=>(_0xf1460f,_0x227972)=>_0x1f89e7(_0xf1460f,_0x227972,_0x543657);let _=class extends c[_0x18ef15(0x116)]{constructor(_0x164ae7,_0x1f0fa3,_0x53d325,_0x510bd1){const _0x5be56f=_0x18ef15;super(),this[_0x5be56f(0x155)]=_0x164ae7,this['_threadCommentModel']=_0x1f0fa3,this['_userService']=_0x53d325,this[_0x5be56f(0x123)]=_0x510bd1,this[_0x5be56f(0x11d)](),this[_0x5be56f(0x127)]();}['_initUserSync'](){const _0x4fc352=_0x18ef15;this[_0x4fc352(0x12a)](this[_0x4fc352(0x143)][_0x4fc352(0xf6)][_0x4fc352(0xe4)](j['bufferTime'](0x10))['subscribe'](_0x629eea=>{const _0x512d7f=_0x4fc352,_0x593435=new Set();_0x629eea[_0x512d7f(0x145)](_0x428ffb=>{const _0x87c4f2=_0x512d7f;switch(_0x428ffb[_0x87c4f2(0x136)]){case _0x87c4f2(0x10d):{const _0x28a177=_0x428ffb[_0x87c4f2(0xf8)][_0x87c4f2(0x10f)];_0x593435[_0x87c4f2(0x10d)](_0x28a177);break;}}}),R(this[_0x512d7f(0x123)],_0x593435);}));}[_0x18ef15(0x11d)](){const _0x495402=_0x18ef15;this[_0x495402(0x12a)](this[_0x495402(0x155)][_0x495402(0xf6)]['subscribe'](async _0x108b2d=>{const _0x5500b9=_0x495402;var _0x35eb1e,_0x593149,_0x3c0fcb,_0x1ac8aa;const _0x45ee6c=(_0x35eb1e=this['_threadCommentModel'][_0x5500b9(0x110)](_0x108b2d[_0x5500b9(0xed)])[_0x5500b9(0x140)](_0x211a1a=>_0x211a1a[_0x5500b9(0x132)]===_0x108b2d[_0x5500b9(0x132)]))==null?void 0x0:_0x35eb1e['root'];if(!_0x45ee6c)return;const {unitId:_0x4a1398,subUnitId:_0x1446d6}=_0x45ee6c;switch(_0x108b2d[_0x5500b9(0x120)]&&this['_userService'][_0x5500b9(0x111)](_0x108b2d[_0x5500b9(0x120)]),_0x108b2d[_0x5500b9(0x136)]){case v[_0x5500b9(0x10a)]:break;case v[_0x5500b9(0xe7)]:{this[_0x5500b9(0x143)][_0x5500b9(0xe9)](_0x4a1398,_0x1446d6,{'unitId':_0x4a1398,'subUnitId':_0x1446d6,'ref':'','id':_0x108b2d[_0x5500b9(0x122)],'dT':f(+_0x108b2d[_0x5500b9(0x118)]),'threadId':_0x108b2d[_0x5500b9(0x132)],'personId':(_0x3c0fcb=(_0x593149=_0x108b2d[_0x5500b9(0x120)])==null?void 0x0:_0x593149['userID'])!=null?_0x3c0fcb:_0x108b2d['userId'],'text':JSON[_0x5500b9(0x137)](_0x108b2d[_0x5500b9(0xeb)]),'parentId':_0x45ee6c['id']});break;}case v['Delete']:{const _0x4df7e8=this[_0x5500b9(0x143)][_0x5500b9(0xef)](_0x4a1398,_0x1446d6,_0x108b2d[_0x5500b9(0x122)]);_0x4df7e8&&_0x4df7e8[_0x5500b9(0x130)]&&this['_threadCommentModel'][_0x5500b9(0x12b)](_0x4a1398,_0x1446d6,_0x108b2d['replyId']);break;}case v['Edit']:{this[_0x5500b9(0x143)]['updateComment'](_0x4a1398,_0x1446d6,{'commentId':_0x108b2d['replyId'],'text':JSON[_0x5500b9(0x137)](_0x108b2d[_0x5500b9(0xeb)])});break;}case v[_0x5500b9(0x104)]:{const _0x36e1a4=(_0x1ac8aa=this[_0x5500b9(0x143)][_0x5500b9(0x110)](_0x108b2d['unitId'])[_0x5500b9(0x140)](_0x4229d2=>_0x4229d2[_0x5500b9(0x132)]===_0x108b2d[_0x5500b9(0x132)]))==null?void 0x0:_0x1ac8aa[_0x5500b9(0x14b)];_0x36e1a4&&this[_0x5500b9(0x143)][_0x5500b9(0x146)](_0x4a1398,_0x1446d6,_0x36e1a4['id'],_0x108b2d[_0x5500b9(0x13b)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x18ef15(0x14c)](b['CommentService'])),S(0x1,c[_0x18ef15(0x14c)](M[_0x18ef15(0x128)])),S(0x2,c['Inject'](c[_0x18ef15(0x13a)])),S(0x3,c[_0x18ef15(0x14c)](c[_0x18ef15(0x135)]))],_);const q=_0x18ef15(0x152),D={};var A=Object[_0x18ef15(0xe8)],x=(_0x370881,_0x551716,_0x33da49,_0x4cfd7e)=>{const _0xd0097=_0x18ef15;for(var _0x388a75=_0x4cfd7e>0x1?void 0x0:_0x4cfd7e?A(_0x551716,_0x33da49):_0x551716,_0xfb3144=_0x370881[_0xd0097(0x144)]-0x1,_0x3bf4cf;_0xfb3144>=0x0;_0xfb3144--)(_0x3bf4cf=_0x370881[_0xfb3144])&&(_0x388a75=_0x3bf4cf(_0x388a75)||_0x388a75);return _0x388a75;},C=(_0x19c0da,_0x12af01)=>(_0x1ec499,_0x16144f)=>_0x12af01(_0x1ec499,_0x16144f,_0x19c0da);function Y(_0x5a60e9,_0x3073fe){const _0x529808=_0x18ef15,_0x213d96=_0x5a60e9[_0x529808(0x113)][0x0];return{..._0x3073fe,'id':_0x213d96[_0x529808(0x122)],'resolved':_0x5a60e9[_0x529808(0x13b)]===0x1,'dT':f(_0x213d96[_0x529808(0x118)]),'personId':_0x213d96[_0x529808(0x126)],'threadId':_0x213d96[_0x529808(0x132)]};}function G(_0x26b9b9,_0x6df85f,_0x5e48d1){const _0xae10cf=_0x18ef15;var _0x4534dd,_0x15d9c3;if(((_0x15d9c3=(_0x4534dd=_0x26b9b9==null?void 0x0:_0x26b9b9[_0xae10cf(0x113)])==null?void 0x0:_0x4534dd['length'])!=null?_0x15d9c3:0x0)>0x0){const _0xcb9c22=(_0x361afc,_0x4107a4)=>({'id':_0x361afc['replyId'],'threadId':_0x361afc[_0xae10cf(0x132)],'dT':f(_0x361afc[_0xae10cf(0x118)]),'personId':_0x361afc[_0xae10cf(0x126)],'resolved':_0x26b9b9['solved']===I['Solved'],'unitId':_0x6df85f,'subUnitId':_0x5e48d1,'text':JSON[_0xae10cf(0x137)](_0x361afc['content']),'parentId':_0x4107a4}),_0x4a0892=_0xcb9c22(_0x26b9b9['replies'][0x0]);return{..._0x4a0892,'children':_0x26b9b9['replies'][_0xae10cf(0x12e)](0x1)[_0xae10cf(0x125)](_0x5c208a=>_0xcb9c22(_0x5c208a,_0x4a0892['id']))};}return null;}function _0x3caf(){const _0x7f64a0=['_threadCommentDataSourceService','UniverInstanceType','rangeId','commentUpdate$','YYYY/MM/DD\x20HH:mm','payload','HTTPService','/universer-api/comment/unit/','merge','CustomRangeType','3849944ryDMvi','Module','pluginName','code','comment','Solved','getCurrentUser','Solve','_userService','defineProperty','getMemberID','requireSession','CollaborationSessionService','Add','ref','UniverThreadCommentUIPlugin','add','Unknown','personId','getUnit','addUser','8TEvTZG','replies','7670SQJAIj','reply','Disposable','OpenOrReOpen','createTimestamp','UNRECOGNIZED','1417820hGaYur','3760390VtoQeu','body','_init','onStarting','dayjs','user','error','replyId','_injector','dataSource','map','userId','_initUserSync','ThreadCommentModel','Delete','disposeWithMe','deleteComment','post','/reply','slice','format','parentId','_configService','threadId','_initDataSource','resolved','Injector','type','parse','/list','UniverCollaborationClientPlugin','UserManagerService','solved','users','817196wADRZh','values','_sessionService','find','6410076FhXIOK','UniverLicensePlugin','_threadCommentModel','length','forEach','resolveComment','Edit','42NWIjQn','delete','5594BWLPfM','root','Inject','onReady','get','_httpService','setConfig','Plugin','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','filter','_commentService','stringify','syncUpdateMutationToColla','size','listComments','_threadCommentDataSource','updateComment','UNIVER_UNKNOWN','IThreadCommentDataSourceService','/solved','COMMENT','117BFGNbA','pipe','_config','/add','Reply','getOwnPropertyDescriptor','addComment','rangeType','content','/edit','unitId','saveCommentToSnapshot','getComment','UniverThreadCommentDataSourcePlugin','getUser','customRanges'];_0x3caf=function(){return _0x7f64a0;};return _0x3caf();}let p=class{constructor(_0x3fabcd,_0x7b1973,_0x4f4d97){const _0x3134d8=_0x18ef15;this[_0x3134d8(0x14f)]=_0x3fabcd,this[_0x3134d8(0x105)]=_0x7b1973,this[_0x3134d8(0x13f)]=_0x4f4d97;}async[_0x18ef15(0xe9)](_0x350329){const _0x1cc2ca=_0x18ef15;var _0x113307,_0x4b56e6;const {parentId:_0x3044c6,unitId:_0x29f69c,text:_0x410ba3,threadId:_0x1de5b0}=_0x350329,_0x4e7ba0=(_0x4b56e6=(_0x113307=_0x410ba3[_0x1cc2ca(0xf2)])==null?void 0x0:_0x113307[_0x1cc2ca(0x154)](_0x100dc4=>_0x100dc4[_0x1cc2ca(0xea)]===c[_0x1cc2ca(0xfc)][_0x1cc2ca(0xe2)])[_0x1cc2ca(0x125)](_0x464889=>_0x464889[_0x1cc2ca(0xf5)]))!=null?_0x4b56e6:[],_0x4d4c6f=JSON[_0x1cc2ca(0x156)](_0x410ba3),_0x1f6d3f=(await this['_sessionService'][_0x1cc2ca(0x108)](_0x29f69c))[_0x1cc2ca(0x107)]();if(_0x3044c6){const _0x2a090e={'memberId':_0x1f6d3f,'unitId':_0x29f69c,'content':_0x4d4c6f,'mention':_0x4e7ba0,'threadId':_0x1de5b0},_0x419234=(await this[_0x1cc2ca(0x14f)][_0x1cc2ca(0x12c)](_0x1cc2ca(0xfa)+_0x29f69c+_0x1cc2ca(0x12d),{'body':_0x2a090e}))['body'][_0x1cc2ca(0x115)];return{..._0x350329,'id':_0x419234['replyId'],'dT':c[_0x1cc2ca(0x11f)](+_0x419234[_0x1cc2ca(0x118)])[_0x1cc2ca(0x12f)](_0x1cc2ca(0xf7)),'personId':_0x419234['userId']};}else{const _0x45f81e={'memberId':_0x1f6d3f,'unitId':_0x29f69c,'content':_0x4d4c6f,'mention':_0x4e7ba0},_0x3f0312=await this['_httpService'][_0x1cc2ca(0x12c)](_0x1cc2ca(0xfa)+_0x29f69c+_0x1cc2ca(0xe6),{'body':_0x45f81e});return Y(_0x3f0312[_0x1cc2ca(0x11c)][_0x1cc2ca(0x101)],_0x350329);}}async[_0x18ef15(0x15b)](_0x3f3e27){const _0x449c14=_0x18ef15;var _0x5ee790,_0x286c7c;const {text:_0x6608df,unitId:_0x11f621}=_0x3f3e27,_0x123cce=(_0x286c7c=(_0x5ee790=_0x6608df[_0x449c14(0xf2)])==null?void 0x0:_0x5ee790[_0x449c14(0x154)](_0x1dbec6=>_0x1dbec6[_0x449c14(0xea)]===c[_0x449c14(0xfc)][_0x449c14(0xe2)])[_0x449c14(0x125)](_0x27bae2=>_0x27bae2[_0x449c14(0xf5)]))!=null?_0x286c7c:[],_0x34da0c=JSON[_0x449c14(0x156)](_0x6608df),_0x2d5610=_0x3f3e27[_0x449c14(0x132)],_0x1f47a5=_0x3f3e27['id'],_0x31293a={'memberId':(await this[_0x449c14(0x13f)][_0x449c14(0x108)](_0x11f621))['getMemberID'](),'unitId':_0x11f621,'threadId':_0x2d5610,'mention':_0x123cce,'content':_0x34da0c,'replyId':_0x1f47a5},_0x28f834=await this[_0x449c14(0x14f)][_0x449c14(0x12c)](_0x449c14(0xfa)+_0x11f621+_0x449c14(0xec),{'body':_0x31293a});return!_0x28f834['body'][_0x449c14(0x121)]||_0x28f834[_0x449c14(0x11c)][_0x449c14(0x121)][_0x449c14(0x100)]===0x1;}async['resolveComment'](_0x5a8421){const _0x26031d=_0x18ef15,{unitId:_0x20c95d}=_0x5a8421,_0x402f98=_0x5a8421[_0x26031d(0x132)],_0x139053={'memberId':this[_0x26031d(0x105)][_0x26031d(0x103)]()['userID'],'unitId':_0x20c95d,'threadId':_0x402f98,'solved':_0x5a8421[_0x26031d(0x134)]?I[_0x26031d(0x102)]:I[_0x26031d(0x117)]},_0x223c78=await this['_httpService'][_0x26031d(0x12c)](_0x26031d(0xfa)+_0x20c95d+_0x26031d(0x15e),{'body':_0x139053});return!_0x223c78[_0x26031d(0x11c)][_0x26031d(0x121)]||_0x223c78[_0x26031d(0x11c)][_0x26031d(0x121)][_0x26031d(0x100)]===0x1;}async[_0x18ef15(0x12b)](_0x22a094,_0x410a33,_0x59a9f6,_0x106233){const _0x584aef=_0x18ef15,_0x4d0ecc={'memberId':(await this[_0x584aef(0x13f)][_0x584aef(0x108)](_0x22a094))[_0x584aef(0x107)](),'threadId':_0x59a9f6,'replyId':_0x106233,'unitId':_0x22a094},_0x3fa4dc=await this['_httpService'][_0x584aef(0x12c)]('/universer-api/comment/unit/'+_0x22a094+'/delete',{'body':_0x4d0ecc});return!_0x3fa4dc['body'][_0x584aef(0x121)]||_0x3fa4dc[_0x584aef(0x11c)][_0x584aef(0x121)]['code']===0x1;}async[_0x18ef15(0x159)](_0x252371,_0x339220,_0x11f056){const _0x4bd5a3=_0x18ef15,_0x397e41={'unitId':_0x252371,'threadId':_0x11f056},_0x46efca=await this[_0x4bd5a3(0x14f)][_0x4bd5a3(0x12c)](_0x4bd5a3(0xfa)+_0x252371+_0x4bd5a3(0x138),{'body':_0x397e41}),_0x2f8eb0=_0x11f056[_0x4bd5a3(0x125)](_0x239fca=>G(_0x46efca[_0x4bd5a3(0x11c)]['comments'][_0x239fca],_0x252371,_0x339220))[_0x4bd5a3(0x154)](Boolean);return Object[_0x4bd5a3(0x13e)](_0x46efca[_0x4bd5a3(0x11c)]['users'])['forEach'](_0x2bc7e6=>{const _0x2e9aea=_0x4bd5a3;this[_0x2e9aea(0x105)][_0x2e9aea(0x111)](_0x2bc7e6);}),_0x2f8eb0;}[_0x18ef15(0xee)](_0x276c5f){const _0x9232de=_0x18ef15;return{'id':_0x276c5f['id'],'threadId':_0x276c5f[_0x9232de(0x132)],'ref':_0x276c5f[_0x9232de(0x10b)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x18ef15(0x14c)](c[_0x18ef15(0x13a)])),C(0x2,c[_0x18ef15(0x14c)](b[_0x18ef15(0x109)]))],p);var H=Object[_0x18ef15(0xe8)],J=(_0x1c7c66,_0x126821,_0x9914d,_0x4ee688)=>{const _0x1b78c6=_0x18ef15;for(var _0x82b9cc=_0x4ee688>0x1?void 0x0:_0x4ee688?H(_0x126821,_0x9914d):_0x126821,_0x2647ce=_0x1c7c66[_0x1b78c6(0x144)]-0x1,_0x438150;_0x2647ce>=0x0;_0x2647ce--)(_0x438150=_0x1c7c66[_0x2647ce])&&(_0x82b9cc=_0x438150(_0x82b9cc)||_0x82b9cc);return _0x82b9cc;},y=(_0x4002f6,_0x34a8fe)=>(_0x45fdbf,_0x1001da)=>_0x34a8fe(_0x45fdbf,_0x1001da,_0x4002f6);function _0x1e63(_0x1d2e21,_0x5024d4){const _0x3cafa5=_0x3caf();return _0x1e63=function(_0x1e636c,_0xa74451){_0x1e636c=_0x1e636c-0xe2;let _0x5a6d4b=_0x3cafa5[_0x1e636c];return _0x5a6d4b;},_0x1e63(_0x1d2e21,_0x5024d4);}let g=class extends c['Disposable']{constructor(_0xea9b47,_0x4f67ae){const _0x2d4ee6=_0x18ef15;super(),this[_0x2d4ee6(0xf3)]=_0xea9b47,this['_threadCommentDataSource']=_0x4f67ae,this[_0x2d4ee6(0x133)]();}[_0x18ef15(0x133)](){const _0x3f6aa2=_0x18ef15;this[_0x3f6aa2(0xf3)][_0x3f6aa2(0x124)]=this[_0x3f6aa2(0x15a)],this[_0x3f6aa2(0xf3)][_0x3f6aa2(0x157)]=!0x1;}};g=J([y(0x0,M[_0x18ef15(0x15d)]),y(0x1,c[_0x18ef15(0x14c)](p))],g);var F=Object[_0x18ef15(0x106)],L=Object[_0x18ef15(0xe8)],Z=(_0x23e747,_0x154af0,_0x39304f)=>_0x154af0 in _0x23e747?F(_0x23e747,_0x154af0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39304f}):_0x23e747[_0x154af0]=_0x39304f,W=(_0x11ed95,_0x54104a,_0x4bd527,_0x551e6a)=>{for(var _0x35bd98=_0x551e6a>0x1?void 0x0:_0x551e6a?L(_0x54104a,_0x4bd527):_0x54104a,_0x365148=_0x11ed95['length']-0x1,_0x2f406f;_0x365148>=0x0;_0x365148--)(_0x2f406f=_0x11ed95[_0x365148])&&(_0x35bd98=_0x2f406f(_0x35bd98)||_0x35bd98);return _0x35bd98;},O=(_0x3041c0,_0x556c0b)=>(_0x3c049f,_0x27285f)=>_0x556c0b(_0x3c049f,_0x27285f,_0x3041c0),N=(_0x526033,_0x1867b7,_0x3f1134)=>Z(_0x526033,typeof _0x1867b7!='symbol'?_0x1867b7+'':_0x1867b7,_0x3f1134);exports[_0x18ef15(0xf0)]=class extends c[_0x18ef15(0x151)]{constructor(_0x2d63d9=D,_0x548d93,_0x7249bf){const _0x4be808=_0x18ef15;super(),this[_0x4be808(0xe5)]=_0x2d63d9,this['_injector']=_0x548d93,this['_configService']=_0x7249bf;const {..._0x4e7dd0}=c[_0x4be808(0xfb)]({},D,this[_0x4be808(0xe5)]);this[_0x4be808(0x131)][_0x4be808(0x150)](q,_0x4e7dd0);}[_0x18ef15(0x11e)](){const _0x17583a=_0x18ef15;[[p],[g],[_]][_0x17583a(0x145)](_0x52877f=>{const _0x27e212=_0x17583a;this[_0x27e212(0x123)]['add'](_0x52877f);});}[_0x18ef15(0x14d)](){const _0x5ce9d3=_0x18ef15;this[_0x5ce9d3(0x123)][_0x5ce9d3(0x14e)](g),this['_injector'][_0x5ce9d3(0x14e)](_);}},N(exports[_0x18ef15(0xf0)],_0x18ef15(0xff),U),N(exports[_0x18ef15(0xf0)],_0x18ef15(0x136),c[_0x18ef15(0xf4)][_0x18ef15(0x15c)]),exports[_0x18ef15(0xf0)]=W([c['DependentOn'](w[_0x18ef15(0x10c)],b[_0x18ef15(0x139)],T[_0x18ef15(0x142)]),O(0x1,c[_0x18ef15(0x14c)](c[_0x18ef15(0x135)])),O(0x2,c['IConfigService'])],exports[_0x18ef15(0xf0)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x10bff5=_0x21bb;(function(_0x285a34,_0x32f08f){const _0x1dd46c=_0x21bb,_0x53c875=_0x285a34();while(!![]){try{const _0x587b42=-parseInt(_0x1dd46c(0x1e3))/0x1*(parseInt(_0x1dd46c(0x216))/0x2)+-parseInt(_0x1dd46c(0x1ee))/0x3+-parseInt(_0x1dd46c(0x1fe))/0x4+parseInt(_0x1dd46c(0x206))/0x5*(-parseInt(_0x1dd46c(0x22c))/0x6)+-parseInt(_0x1dd46c(0x1d6))/0x7*(-parseInt(_0x1dd46c(0x1e1))/0x8)+-parseInt(_0x1dd46c(0x205))/0x9*(parseInt(_0x1dd46c(0x22e))/0xa)+-parseInt(_0x1dd46c(0x1d1))/0xb*(-parseInt(_0x1dd46c(0x1d5))/0xc);if(_0x587b42===_0x32f08f)break;else _0x53c875['push'](_0x53c875['shift']());}catch(_0x68118d){_0x53c875['push'](_0x53c875['shift']());}}}(_0x2126,0x9dafd));import{CommentService as _0x18e6ec,CollaborationSessionService as _0x524314,UniverCollaborationClientPlugin as _0x288191}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46bf69}from'@univerjs-pro/license';import{dayjs as _0x1e783b,UserManagerService as _0xc08702,Inject as _0x346acf,Injector as _0x542fad,Disposable as _0x2b6fd7,CustomRangeType as _0x236405,UniverInstanceType as _0x1eb642,DependentOn as _0x50acbf,IConfigService as _0x194b79,Plugin as _0x44e740,merge as _0x544057}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b94fa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x46dddc,IThreadCommentDataSourceService as _0x4edee4}from'@univerjs/thread-comment';import{bufferTime as _0x272284}from'rxjs';import{HTTPService as _0x1851b4}from'@univerjs/network';const W=_0x10bff5(0x209);function _0x21bb(_0x55305d,_0x2a1559){const _0x212694=_0x2126();return _0x21bb=function(_0x21bbc9,_0x21615f){_0x21bbc9=_0x21bbc9-0x1ca;let _0x3485e6=_0x212694[_0x21bbc9];return _0x3485e6;},_0x21bb(_0x55305d,_0x2a1559);}var I=(_0x56f932=>(_0x56f932[_0x56f932[_0x10bff5(0x21a)]=0x0]=_0x10bff5(0x21a),_0x56f932[_0x56f932[_0x10bff5(0x1d0)]=0x1]=_0x10bff5(0x1d0),_0x56f932[_0x56f932[_0x10bff5(0x201)]=-0x1]=_0x10bff5(0x201),_0x56f932))(I||{}),v=(_0x3a7062=>(_0x3a7062[_0x3a7062[_0x10bff5(0x1e8)]=0x0]=_0x10bff5(0x1e8),_0x3a7062[_0x3a7062['Add']=0x1]=_0x10bff5(0x1ca),_0x3a7062[_0x3a7062['Reply']=0x2]='Reply',_0x3a7062[_0x3a7062[_0x10bff5(0x1e7)]=0x3]='Edit',_0x3a7062[_0x3a7062['Delete']=0x4]=_0x10bff5(0x211),_0x3a7062[_0x3a7062['Solve']=0x5]='Solve',_0x3a7062[_0x3a7062[_0x10bff5(0x201)]=-0x1]=_0x10bff5(0x201),_0x3a7062))(v||{});const y=_0x543274=>_0x1e783b(new Date(+_0x543274))[_0x10bff5(0x1ff)](_0x10bff5(0x204)),B=async(_0x385d36,_0xf7ce8a)=>{const _0x5e2e44=_0x10bff5,_0x27b137=_0x385d36[_0x5e2e44(0x218)](_0xc08702),_0x2cab8d=_0x385d36['get'](_0x1851b4);_0xf7ce8a[_0x5e2e44(0x1f0)](_0x724427=>{const _0x13f80e=_0x5e2e44;_0x27b137[_0x13f80e(0x213)](_0x724427)&&_0xf7ce8a[_0x13f80e(0x21e)](_0x724427);}),_0xf7ce8a[_0x5e2e44(0x21f)]&&(await _0x2cab8d[_0x5e2e44(0x218)](_0x5e2e44(0x1de),{'params':{'userIDs':[..._0xf7ce8a]}}))['body'][_0x5e2e44(0x203)]['forEach'](_0x474e6c=>{const _0x20b3be=_0x5e2e44;_0x474e6c&&_0x27b137[_0x20b3be(0x20f)](_0x474e6c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x469777,_0x39d587,_0x4707e0,_0x38a992)=>{const _0x421c96=_0x10bff5;for(var _0x48f97e=_0x38a992>0x1?void 0x0:_0x38a992?K(_0x39d587,_0x4707e0):_0x39d587,_0x55019e=_0x469777[_0x421c96(0x1f7)]-0x1,_0x11b8ef;_0x55019e>=0x0;_0x55019e--)(_0x11b8ef=_0x469777[_0x55019e])&&(_0x48f97e=_0x11b8ef(_0x48f97e)||_0x48f97e);return _0x48f97e;},p=(_0x5ee64,_0x5c7b7e)=>(_0x53b028,_0x1970b7)=>_0x5c7b7e(_0x53b028,_0x1970b7,_0x5ee64);let _=class extends _0x2b6fd7{constructor(_0x29c931,_0x2fcd85,_0x2eaf60,_0x3ebd69){const _0x3366eb=_0x10bff5;super(),this[_0x3366eb(0x21c)]=_0x29c931,this[_0x3366eb(0x20d)]=_0x2fcd85,this['_userService']=_0x2eaf60,this['_injector']=_0x3ebd69,this[_0x3366eb(0x1e4)](),this['_initUserSync']();}[_0x10bff5(0x207)](){const _0x334203=_0x10bff5;this[_0x334203(0x1e9)](this[_0x334203(0x20d)][_0x334203(0x1ce)][_0x334203(0x1fc)](_0x272284(0x10))['subscribe'](_0x1fb4f4=>{const _0x6f3543=_0x334203,_0x1309e5=new Set();_0x1fb4f4[_0x6f3543(0x1f0)](_0x16f268=>{const _0x31b3ca=_0x6f3543;switch(_0x16f268['type']){case _0x31b3ca(0x1f5):{const _0x16bbaf=_0x16f268[_0x31b3ca(0x20e)][_0x31b3ca(0x208)];_0x1309e5[_0x31b3ca(0x1f5)](_0x16bbaf);break;}}}),B(this[_0x6f3543(0x228)],_0x1309e5);}));}[_0x10bff5(0x1e4)](){const _0x10e29b=_0x10bff5;this[_0x10e29b(0x1e9)](this['_commentService']['commentUpdate$'][_0x10e29b(0x1fd)](async _0xbbdf65=>{const _0x370088=_0x10e29b;var _0x840651,_0x2de963,_0x2cc4f3,_0x1ed5b8;const _0x1fcd33=(_0x840651=this[_0x370088(0x20d)]['getUnit'](_0xbbdf65[_0x370088(0x1f2)])[_0x370088(0x1e0)](_0x482723=>_0x482723[_0x370088(0x1e2)]===_0xbbdf65[_0x370088(0x1e2)]))==null?void 0x0:_0x840651[_0x370088(0x1d9)];if(!_0x1fcd33)return;const {unitId:_0x39b3f7,subUnitId:_0x16b354}=_0x1fcd33;switch(_0xbbdf65['user']&&this[_0x370088(0x1d2)][_0x370088(0x20f)](_0xbbdf65['user']),_0xbbdf65[_0x370088(0x200)]){case v[_0x370088(0x1ca)]:break;case v[_0x370088(0x212)]:{this['_threadCommentModel']['addComment'](_0x39b3f7,_0x16b354,{'unitId':_0x39b3f7,'subUnitId':_0x16b354,'ref':'','id':_0xbbdf65[_0x370088(0x219)],'dT':y(+_0xbbdf65[_0x370088(0x1dd)]),'threadId':_0xbbdf65[_0x370088(0x1e2)],'personId':(_0x2cc4f3=(_0x2de963=_0xbbdf65[_0x370088(0x1df)])==null?void 0x0:_0x2de963[_0x370088(0x230)])!=null?_0x2cc4f3:_0xbbdf65[_0x370088(0x1cd)],'text':JSON[_0x370088(0x231)](_0xbbdf65[_0x370088(0x224)]),'parentId':_0x1fcd33['id']});break;}case v[_0x370088(0x211)]:{const _0x38e15d=this['_threadCommentModel'][_0x370088(0x1fb)](_0x39b3f7,_0x16b354,_0xbbdf65['replyId']);_0x38e15d&&_0x38e15d['parentId']&&this[_0x370088(0x20d)][_0x370088(0x1cb)](_0x39b3f7,_0x16b354,_0xbbdf65[_0x370088(0x219)]);break;}case v[_0x370088(0x1e7)]:{this['_threadCommentModel'][_0x370088(0x1f1)](_0x39b3f7,_0x16b354,{'commentId':_0xbbdf65[_0x370088(0x219)],'text':JSON[_0x370088(0x231)](_0xbbdf65['content'])});break;}case v['Solve']:{const _0x19f1dc=(_0x1ed5b8=this[_0x370088(0x20d)][_0x370088(0x226)](_0xbbdf65[_0x370088(0x1f2)])[_0x370088(0x1e0)](_0x5957d2=>_0x5957d2[_0x370088(0x1e2)]===_0xbbdf65[_0x370088(0x1e2)]))==null?void 0x0:_0x1ed5b8['root'];_0x19f1dc&&this['_threadCommentModel']['resolveComment'](_0x39b3f7,_0x16b354,_0x19f1dc['id'],_0xbbdf65[_0x370088(0x227)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x346acf(_0x18e6ec)),p(0x1,_0x346acf(_0x46dddc)),p(0x2,_0x346acf(_0xc08702)),p(0x3,_0x346acf(_0x542fad))],_);const z=_0x10bff5(0x1cf),O={};var k=Object[_0x10bff5(0x20b)],Q=(_0x1e1833,_0x47f973,_0x4428cf,_0x3cdf79)=>{for(var _0x50dfc0=_0x3cdf79>0x1?void 0x0:_0x3cdf79?k(_0x47f973,_0x4428cf):_0x47f973,_0x179b46=_0x1e1833['length']-0x1,_0x4f9773;_0x179b46>=0x0;_0x179b46--)(_0x4f9773=_0x1e1833[_0x179b46])&&(_0x50dfc0=_0x4f9773(_0x50dfc0)||_0x50dfc0);return _0x50dfc0;},b=(_0x13d331,_0x19ce6e)=>(_0x2bf489,_0x2dee88)=>_0x19ce6e(_0x2bf489,_0x2dee88,_0x13d331);function X(_0x9649af,_0x54948b){const _0x41b52a=_0x10bff5,_0x55275a=_0x9649af[_0x41b52a(0x1db)][0x0];return{..._0x54948b,'id':_0x55275a['replyId'],'resolved':_0x9649af[_0x41b52a(0x227)]===0x1,'dT':y(_0x55275a[_0x41b52a(0x1dd)]),'personId':_0x55275a[_0x41b52a(0x1cd)],'threadId':_0x55275a[_0x41b52a(0x1e2)]};}function ee(_0x5f5350,_0x5e16dd,_0x151115){const _0x2a4b8a=_0x10bff5;var _0x1e31f3,_0x108149;if(((_0x108149=(_0x1e31f3=_0x5f5350==null?void 0x0:_0x5f5350['replies'])==null?void 0x0:_0x1e31f3[_0x2a4b8a(0x1f7)])!=null?_0x108149:0x0)>0x0){const _0xebdfe8=(_0x3809eb,_0x431bcd)=>({'id':_0x3809eb[_0x2a4b8a(0x219)],'threadId':_0x3809eb[_0x2a4b8a(0x1e2)],'dT':y(_0x3809eb['createTimestamp']),'personId':_0x3809eb[_0x2a4b8a(0x1cd)],'resolved':_0x5f5350[_0x2a4b8a(0x227)]===I[_0x2a4b8a(0x1d0)],'unitId':_0x5e16dd,'subUnitId':_0x151115,'text':JSON[_0x2a4b8a(0x231)](_0x3809eb[_0x2a4b8a(0x224)]),'parentId':_0x431bcd}),_0x5d52b6=_0xebdfe8(_0x5f5350[_0x2a4b8a(0x1db)][0x0]);return{..._0x5d52b6,'children':_0x5f5350[_0x2a4b8a(0x1db)][_0x2a4b8a(0x210)](0x1)[_0x2a4b8a(0x1ec)](_0x400af1=>_0xebdfe8(_0x400af1,_0x5d52b6['id']))};}return null;}let S=class{constructor(_0x1a9962,_0x1f911a,_0x28f3d7){const _0x26ef9e=_0x10bff5;this['_httpService']=_0x1a9962,this[_0x26ef9e(0x1d2)]=_0x1f911a,this[_0x26ef9e(0x202)]=_0x28f3d7;}async[_0x10bff5(0x1f4)](_0x32867f){const _0x4886e6=_0x10bff5;var _0x5668ec,_0x1db651;const {parentId:_0x1733a,unitId:_0x13b78f,text:_0x56ecf9,threadId:_0x6849db}=_0x32867f,_0x2e4719=(_0x1db651=(_0x5668ec=_0x56ecf9[_0x4886e6(0x232)])==null?void 0x0:_0x5668ec[_0x4886e6(0x223)](_0xffc7f8=>_0xffc7f8[_0x4886e6(0x1ed)]===_0x236405[_0x4886e6(0x215)])[_0x4886e6(0x1ec)](_0x11fc2b=>_0x11fc2b['rangeId']))!=null?_0x1db651:[],_0x3a9ec4=JSON['stringify'](_0x56ecf9),_0x3c20f9=(await this[_0x4886e6(0x202)][_0x4886e6(0x21d)](_0x13b78f))[_0x4886e6(0x234)]();if(_0x1733a){const _0xd162e8={'memberId':_0x3c20f9,'unitId':_0x13b78f,'content':_0x3a9ec4,'mention':_0x2e4719,'threadId':_0x6849db},_0x1d1cd2=(await this[_0x4886e6(0x22d)]['post']('/universer-api/comment/unit/'+_0x13b78f+_0x4886e6(0x1dc),{'body':_0xd162e8}))[_0x4886e6(0x1f3)][_0x4886e6(0x221)];return{..._0x32867f,'id':_0x1d1cd2[_0x4886e6(0x219)],'dT':_0x1e783b(+_0x1d1cd2[_0x4886e6(0x1dd)])[_0x4886e6(0x1ff)](_0x4886e6(0x204)),'personId':_0x1d1cd2[_0x4886e6(0x1cd)]};}else{const _0x151524={'memberId':_0x3c20f9,'unitId':_0x13b78f,'content':_0x3a9ec4,'mention':_0x2e4719},_0x410ada=await this[_0x4886e6(0x22d)][_0x4886e6(0x1ea)](_0x4886e6(0x1d8)+_0x13b78f+_0x4886e6(0x1eb),{'body':_0x151524});return X(_0x410ada[_0x4886e6(0x1f3)][_0x4886e6(0x214)],_0x32867f);}}async[_0x10bff5(0x1f1)](_0x3c4b74){const _0x311ed7=_0x10bff5;var _0xe96652,_0x338ca0;const {text:_0x4fbd12,unitId:_0x5c9aea}=_0x3c4b74,_0x41929b=(_0x338ca0=(_0xe96652=_0x4fbd12[_0x311ed7(0x232)])==null?void 0x0:_0xe96652['filter'](_0x3f0236=>_0x3f0236[_0x311ed7(0x1ed)]===_0x236405['COMMENT'])[_0x311ed7(0x1ec)](_0x15a562=>_0x15a562[_0x311ed7(0x21b)]))!=null?_0x338ca0:[],_0x80689a=JSON[_0x311ed7(0x1f8)](_0x4fbd12),_0xad2581=_0x3c4b74[_0x311ed7(0x1e2)],_0x543bb5=_0x3c4b74['id'],_0x1ecd3f={'memberId':(await this['_sessionService']['requireSession'](_0x5c9aea))[_0x311ed7(0x234)](),'unitId':_0x5c9aea,'threadId':_0xad2581,'mention':_0x41929b,'content':_0x80689a,'replyId':_0x543bb5},_0x203d09=await this['_httpService']['post'](_0x311ed7(0x1d8)+_0x5c9aea+'/edit',{'body':_0x1ecd3f});return!_0x203d09[_0x311ed7(0x1f3)][_0x311ed7(0x222)]||_0x203d09[_0x311ed7(0x1f3)][_0x311ed7(0x222)][_0x311ed7(0x225)]===0x1;}async[_0x10bff5(0x1d4)](_0x28eec4){const _0x582462=_0x10bff5,{unitId:_0x3b7a11}=_0x28eec4,_0x4e39b9=_0x28eec4[_0x582462(0x1e2)],_0x47d274={'memberId':this[_0x582462(0x1d2)]['getCurrentUser']()[_0x582462(0x230)],'unitId':_0x3b7a11,'threadId':_0x4e39b9,'solved':_0x28eec4[_0x582462(0x220)]?I[_0x582462(0x1d0)]:I['OpenOrReOpen']},_0x2919a4=await this[_0x582462(0x22d)][_0x582462(0x1ea)](_0x582462(0x1d8)+_0x3b7a11+_0x582462(0x1cc),{'body':_0x47d274});return!_0x2919a4[_0x582462(0x1f3)][_0x582462(0x222)]||_0x2919a4[_0x582462(0x1f3)]['error'][_0x582462(0x225)]===0x1;}async[_0x10bff5(0x1cb)](_0x4a593c,_0x261dce,_0x1cf9ac,_0x5af762){const _0xea7756=_0x10bff5,_0x3a233f={'memberId':(await this['_sessionService'][_0xea7756(0x21d)](_0x4a593c))['getMemberID'](),'threadId':_0x1cf9ac,'replyId':_0x5af762,'unitId':_0x4a593c},_0x463a2d=await this['_httpService'][_0xea7756(0x1ea)]('/universer-api/comment/unit/'+_0x4a593c+_0xea7756(0x20a),{'body':_0x3a233f});return!_0x463a2d[_0xea7756(0x1f3)][_0xea7756(0x222)]||_0x463a2d[_0xea7756(0x1f3)][_0xea7756(0x222)]['code']===0x1;}async[_0x10bff5(0x22a)](_0x42fbcd,_0x4a621a,_0x5a46e4){const _0x1f92b8=_0x10bff5,_0x517c3f={'unitId':_0x42fbcd,'threadId':_0x5a46e4},_0x238857=await this[_0x1f92b8(0x22d)]['post']('/universer-api/comment/unit/'+_0x42fbcd+_0x1f92b8(0x1d7),{'body':_0x517c3f}),_0x534d3a=_0x5a46e4[_0x1f92b8(0x1ec)](_0x153410=>ee(_0x238857['body']['comments'][_0x153410],_0x42fbcd,_0x4a621a))[_0x1f92b8(0x223)](Boolean);return Object[_0x1f92b8(0x1e5)](_0x238857['body']['users'])[_0x1f92b8(0x1f0)](_0x8c6a55=>{const _0x2de03e=_0x1f92b8;this[_0x2de03e(0x1d2)]['addUser'](_0x8c6a55);}),_0x534d3a;}[_0x10bff5(0x1da)](_0x2f9a72){const _0x52ccff=_0x10bff5;return{'id':_0x2f9a72['id'],'threadId':_0x2f9a72[_0x52ccff(0x1e2)],'ref':_0x2f9a72['ref']};}};S=Q([b(0x0,_0x346acf(_0x1851b4)),b(0x1,_0x346acf(_0xc08702)),b(0x2,_0x346acf(_0x524314))],S);function _0x2126(){const _0x1c0020=['/reply','createTimestamp','/universer-api/user/list','user','find','76984RvQZSl','threadId','43rnLkqh','_init','values','onReady','Edit','Unknown','disposeWithMe','post','/add','map','rangeType','1150347VqGkfJ','_threadCommentDataSourceService','forEach','updateComment','unitId','body','addComment','add','onStarting','length','stringify','dataSource','pluginName','getComment','pipe','subscribe','4069420kIYKqH','format','type','UNRECOGNIZED','_sessionService','users','YYYY/MM/DD\x20HH:mm','306CGtIkH','78745dDkuNJ','_initUserSync','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','getOwnPropertyDescriptor','symbol','_threadCommentModel','payload','addUser','slice','Delete','Reply','getUser','comment','COMMENT','2706BxiulY','defineProperty','get','replyId','OpenOrReOpen','rangeId','_commentService','requireSession','delete','size','resolved','reply','error','filter','content','code','getUnit','solved','_injector','_configService','listComments','_initDataSource','438iNvQia','_httpService','241510ZxmgPo','_config','userID','parse','customRanges','_threadCommentDataSource','getMemberID','Add','deleteComment','/solved','userId','commentUpdate$','thread-comment-data-source.config','Solved','110WanZFg','_userService','UNIVER_UNKNOWN','resolveComment','4163316QMDDNO','441fUEliH','/list','/universer-api/comment/unit/','root','saveCommentToSnapshot','replies'];_0x2126=function(){return _0x1c0020;};return _0x2126();}var re=Object[_0x10bff5(0x20b)],te=(_0x5afbba,_0xed95f5,_0x54d474,_0x2e01b1)=>{const _0x3e3155=_0x10bff5;for(var _0x304b91=_0x2e01b1>0x1?void 0x0:_0x2e01b1?re(_0xed95f5,_0x54d474):_0xed95f5,_0x82b4a3=_0x5afbba[_0x3e3155(0x1f7)]-0x1,_0x4ec756;_0x82b4a3>=0x0;_0x82b4a3--)(_0x4ec756=_0x5afbba[_0x82b4a3])&&(_0x304b91=_0x4ec756(_0x304b91)||_0x304b91);return _0x304b91;},M=(_0xfce24b,_0xed2172)=>(_0x1d1c74,_0x3b89a6)=>_0xed2172(_0x1d1c74,_0x3b89a6,_0xfce24b);let f=class extends _0x2b6fd7{constructor(_0x14ab74,_0x10ca7c){const _0x348c19=_0x10bff5;super(),this[_0x348c19(0x1ef)]=_0x14ab74,this['_threadCommentDataSource']=_0x10ca7c,this[_0x348c19(0x22b)]();}['_initDataSource'](){const _0x59a133=_0x10bff5;this[_0x59a133(0x1ef)][_0x59a133(0x1f9)]=this[_0x59a133(0x233)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4edee4),M(0x1,_0x346acf(S))],f);var se=Object[_0x10bff5(0x217)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1c5fb8,_0x5f14a6,_0x436d5b)=>_0x5f14a6 in _0x1c5fb8?se(_0x1c5fb8,_0x5f14a6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x436d5b}):_0x1c5fb8[_0x5f14a6]=_0x436d5b,ie=(_0x55e766,_0x2e623b,_0x3dd359,_0x2c7791)=>{const _0x22f9bf=_0x10bff5;for(var _0x274cce=_0x2c7791>0x1?void 0x0:_0x2c7791?oe(_0x2e623b,_0x3dd359):_0x2e623b,_0x25970f=_0x55e766[_0x22f9bf(0x1f7)]-0x1,_0x2a5639;_0x25970f>=0x0;_0x25970f--)(_0x2a5639=_0x55e766[_0x25970f])&&(_0x274cce=_0x2a5639(_0x274cce)||_0x274cce);return _0x274cce;},N=(_0x2b0485,_0x18646e)=>(_0x22d13d,_0x2b0701)=>_0x18646e(_0x22d13d,_0x2b0701,_0x2b0485),$=(_0x4fbad8,_0x4c4206,_0x15091a)=>ne(_0x4fbad8,typeof _0x4c4206!=_0x10bff5(0x20c)?_0x4c4206+'':_0x4c4206,_0x15091a);let g=class extends _0x44e740{constructor(_0x1d993c=O,_0x2a5fe6,_0x4536d4){const _0x44cd9e=_0x10bff5;super(),this[_0x44cd9e(0x22f)]=_0x1d993c,this[_0x44cd9e(0x228)]=_0x2a5fe6,this[_0x44cd9e(0x229)]=_0x4536d4;const {..._0x37486c}=_0x544057({},O,this['_config']);this[_0x44cd9e(0x229)]['setConfig'](z,_0x37486c);}[_0x10bff5(0x1f6)](){const _0x1bcc0c=_0x10bff5;[[S],[f],[_]][_0x1bcc0c(0x1f0)](_0x2faefa=>{const _0x5e8ece=_0x1bcc0c;this[_0x5e8ece(0x228)][_0x5e8ece(0x1f5)](_0x2faefa);});}[_0x10bff5(0x1e6)](){const _0x4943f4=_0x10bff5;this['_injector'][_0x4943f4(0x218)](f),this[_0x4943f4(0x228)][_0x4943f4(0x218)](_);}};$(g,_0x10bff5(0x1fa),W),$(g,_0x10bff5(0x200),_0x1eb642[_0x10bff5(0x1d3)]),g=ie([_0x50acbf(_0x1b94fa,_0x288191,_0x46bf69),N(0x1,_0x346acf(_0x542fad)),N(0x2,_0x194b79)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4be5b3=_0x1a8d;(function(_0x344bd3,_0x3af6ac){const _0x39c542=_0x1a8d,_0x11c253=_0x344bd3();while(!![]){try{const _0x217d4e=-parseInt(_0x39c542(0x18d))/0x1*(-parseInt(_0x39c542(0x1ea))/0x2)+parseInt(_0x39c542(0x1a5))/0x3*(parseInt(_0x39c542(0x1b9))/0x4)+-parseInt(_0x39c542(0x1bc))/0x5+-parseInt(_0x39c542(0x1a9))/0x6+parseInt(_0x39c542(0x1d6))/0x7*(-parseInt(_0x39c542(0x1c8))/0x8)+-parseInt(_0x39c542(0x1a4))/0x9*(-parseInt(_0x39c542(0x1c7))/0xa)+parseInt(_0x39c542(0x1ba))/0xb*(parseInt(_0x39c542(0x1af))/0xc);if(_0x217d4e===_0x3af6ac)break;else _0x11c253['push'](_0x11c253['shift']());}catch(_0x266e2c){_0x11c253['push'](_0x11c253['shift']());}}}(_0x34cc,0x464c5));import{CommentService as _0x3e43f1,CollaborationSessionService as _0x26789c,UniverCollaborationClientPlugin as _0x632fbe}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4dad28}from'@univerjs-pro/license';import{dayjs as _0x36859c,UserManagerService as _0x394c60,Inject as _0x33e49e,Injector as _0x36e64b,Disposable as _0x55890b,CustomRangeType as _0x1616aa,UniverInstanceType as _0x471339,DependentOn as _0x41b532,IConfigService as _0x707352,Plugin as _0x4bb65f,merge as _0x5765b9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b0062}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x242492,IThreadCommentDataSourceService as _0x1fe3bb}from'@univerjs/thread-comment';import{bufferTime as _0x4ed255}from'rxjs';import{HTTPService as _0x480aa6}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x77b600=>(_0x77b600[_0x77b600[_0x4be5b3(0x1d3)]=0x0]=_0x4be5b3(0x1d3),_0x77b600[_0x77b600['Solved']=0x1]='Solved',_0x77b600[_0x77b600[_0x4be5b3(0x18b)]=-0x1]=_0x4be5b3(0x18b),_0x77b600))(I||{}),v=(_0x283d3f=>(_0x283d3f[_0x283d3f[_0x4be5b3(0x189)]=0x0]=_0x4be5b3(0x189),_0x283d3f[_0x283d3f[_0x4be5b3(0x1d8)]=0x1]=_0x4be5b3(0x1d8),_0x283d3f[_0x283d3f[_0x4be5b3(0x193)]=0x2]=_0x4be5b3(0x193),_0x283d3f[_0x283d3f[_0x4be5b3(0x1b2)]=0x3]='Edit',_0x283d3f[_0x283d3f[_0x4be5b3(0x194)]=0x4]='Delete',_0x283d3f[_0x283d3f[_0x4be5b3(0x1e8)]=0x5]='Solve',_0x283d3f[_0x283d3f[_0x4be5b3(0x18b)]=-0x1]='UNRECOGNIZED',_0x283d3f))(v||{});const y=_0x2313d9=>_0x36859c(new Date(+_0x2313d9))[_0x4be5b3(0x1e2)](_0x4be5b3(0x1b7)),B=async(_0x1ac2c1,_0x41cd9a)=>{const _0x46f118=_0x4be5b3,_0x3e008d=_0x1ac2c1[_0x46f118(0x1ad)](_0x394c60),_0x5d07bb=_0x1ac2c1['get'](_0x480aa6);_0x41cd9a['forEach'](_0x57a124=>{_0x3e008d['getUser'](_0x57a124)&&_0x41cd9a['delete'](_0x57a124);}),_0x41cd9a['size']&&(await _0x5d07bb[_0x46f118(0x1ad)](_0x46f118(0x18a),{'params':{'userIDs':[..._0x41cd9a]}}))[_0x46f118(0x1eb)][_0x46f118(0x197)][_0x46f118(0x1e3)](_0x3a3d11=>{const _0x487a1b=_0x46f118;_0x3a3d11&&_0x3e008d[_0x487a1b(0x1d9)](_0x3a3d11);});};var K=Object[_0x4be5b3(0x1a0)],V=(_0x5405d2,_0x226810,_0xdca34a,_0x43127a)=>{const _0x2599da=_0x4be5b3;for(var _0x451077=_0x43127a>0x1?void 0x0:_0x43127a?K(_0x226810,_0xdca34a):_0x226810,_0x2fcadc=_0x5405d2[_0x2599da(0x1d4)]-0x1,_0x5a4b73;_0x2fcadc>=0x0;_0x2fcadc--)(_0x5a4b73=_0x5405d2[_0x2fcadc])&&(_0x451077=_0x5a4b73(_0x451077)||_0x451077);return _0x451077;},p=(_0x303215,_0x3dd8e8)=>(_0x38c83e,_0x1b3da2)=>_0x3dd8e8(_0x38c83e,_0x1b3da2,_0x303215);let _=class extends _0x55890b{constructor(_0xe30f39,_0x2ca75e,_0x56abdc,_0x463d97){const _0x5e9af6=_0x4be5b3;super(),this['_commentService']=_0xe30f39,this[_0x5e9af6(0x1c9)]=_0x2ca75e,this[_0x5e9af6(0x1a7)]=_0x56abdc,this['_injector']=_0x463d97,this[_0x5e9af6(0x1aa)](),this[_0x5e9af6(0x1da)]();}['_initUserSync'](){const _0x5ba8d9=_0x4be5b3;this['disposeWithMe'](this[_0x5ba8d9(0x1c9)][_0x5ba8d9(0x18f)][_0x5ba8d9(0x1de)](_0x4ed255(0x10))[_0x5ba8d9(0x1ca)](_0x1353a3=>{const _0x35f7b5=new Set();_0x1353a3['forEach'](_0x7dca46=>{const _0x3f33fe=_0x1a8d;switch(_0x7dca46['type']){case _0x3f33fe(0x1bf):{const _0x45ea17=_0x7dca46[_0x3f33fe(0x1e9)]['personId'];_0x35f7b5[_0x3f33fe(0x1bf)](_0x45ea17);break;}}}),B(this['_injector'],_0x35f7b5);}));}[_0x4be5b3(0x1aa)](){const _0x5ceba0=_0x4be5b3;this[_0x5ceba0(0x18c)](this['_commentService'][_0x5ceba0(0x18f)][_0x5ceba0(0x1ca)](async _0x17d0a5=>{const _0x825e42=_0x5ceba0;var _0x4a3781,_0x5c7ea2,_0x207b7b,_0x436de2;const _0x1cfa86=(_0x4a3781=this[_0x825e42(0x1c9)][_0x825e42(0x1d1)](_0x17d0a5[_0x825e42(0x1d5)])['find'](_0x498a34=>_0x498a34[_0x825e42(0x1ae)]===_0x17d0a5['threadId']))==null?void 0x0:_0x4a3781[_0x825e42(0x1b5)];if(!_0x1cfa86)return;const {unitId:_0x151a2f,subUnitId:_0x532867}=_0x1cfa86;switch(_0x17d0a5[_0x825e42(0x1c1)]&&this[_0x825e42(0x1a7)]['addUser'](_0x17d0a5[_0x825e42(0x1c1)]),_0x17d0a5[_0x825e42(0x190)]){case v['Add']:break;case v[_0x825e42(0x193)]:{this[_0x825e42(0x1c9)]['addComment'](_0x151a2f,_0x532867,{'unitId':_0x151a2f,'subUnitId':_0x532867,'ref':'','id':_0x17d0a5['replyId'],'dT':y(+_0x17d0a5['createTimestamp']),'threadId':_0x17d0a5[_0x825e42(0x1ae)],'personId':(_0x207b7b=(_0x5c7ea2=_0x17d0a5[_0x825e42(0x1c1)])==null?void 0x0:_0x5c7ea2['userID'])!=null?_0x207b7b:_0x17d0a5[_0x825e42(0x1dc)],'text':JSON[_0x825e42(0x1b4)](_0x17d0a5[_0x825e42(0x1d0)]),'parentId':_0x1cfa86['id']});break;}case v[_0x825e42(0x194)]:{const _0x3d4d65=this[_0x825e42(0x1c9)][_0x825e42(0x1a3)](_0x151a2f,_0x532867,_0x17d0a5['replyId']);_0x3d4d65&&_0x3d4d65[_0x825e42(0x1cd)]&&this[_0x825e42(0x1c9)][_0x825e42(0x1df)](_0x151a2f,_0x532867,_0x17d0a5[_0x825e42(0x1cb)]);break;}case v[_0x825e42(0x1b2)]:{this['_threadCommentModel']['updateComment'](_0x151a2f,_0x532867,{'commentId':_0x17d0a5[_0x825e42(0x1cb)],'text':JSON['parse'](_0x17d0a5[_0x825e42(0x1d0)])});break;}case v[_0x825e42(0x1e8)]:{const _0x3e084f=(_0x436de2=this[_0x825e42(0x1c9)][_0x825e42(0x1d1)](_0x17d0a5['unitId'])[_0x825e42(0x1bb)](_0xe3db71=>_0xe3db71[_0x825e42(0x1ae)]===_0x17d0a5['threadId']))==null?void 0x0:_0x436de2['root'];_0x3e084f&&this[_0x825e42(0x1c9)][_0x825e42(0x195)](_0x151a2f,_0x532867,_0x3e084f['id'],_0x17d0a5[_0x825e42(0x1a2)]===I[_0x825e42(0x1c6)]);break;}}}));}};_=V([p(0x0,_0x33e49e(_0x3e43f1)),p(0x1,_0x33e49e(_0x242492)),p(0x2,_0x33e49e(_0x394c60)),p(0x3,_0x33e49e(_0x36e64b))],_);const z='thread-comment-data-source.config',O={};function _0x1a8d(_0x32b13c,_0x1138f8){const _0x34ccdc=_0x34cc();return _0x1a8d=function(_0x1a8dc3,_0x517058){_0x1a8dc3=_0x1a8dc3-0x189;let _0x2d137a=_0x34ccdc[_0x1a8dc3];return _0x2d137a;},_0x1a8d(_0x32b13c,_0x1138f8);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x40aeba,_0x400b51,_0x44a011,_0x403705)=>{for(var _0x1cfc60=_0x403705>0x1?void 0x0:_0x403705?k(_0x400b51,_0x44a011):_0x400b51,_0x37750b=_0x40aeba['length']-0x1,_0x11c5cf;_0x37750b>=0x0;_0x37750b--)(_0x11c5cf=_0x40aeba[_0x37750b])&&(_0x1cfc60=_0x11c5cf(_0x1cfc60)||_0x1cfc60);return _0x1cfc60;},b=(_0x329240,_0x57f6e9)=>(_0x508c6d,_0x4158c4)=>_0x57f6e9(_0x508c6d,_0x4158c4,_0x329240);function X(_0x5c1ee7,_0x5e2bce){const _0xd9b56f=_0x4be5b3,_0x4058a0=_0x5c1ee7[_0xd9b56f(0x1b0)][0x0];return{..._0x5e2bce,'id':_0x4058a0[_0xd9b56f(0x1cb)],'resolved':_0x5c1ee7[_0xd9b56f(0x1a2)]===0x1,'dT':y(_0x4058a0[_0xd9b56f(0x1c4)]),'personId':_0x4058a0[_0xd9b56f(0x1dc)],'threadId':_0x4058a0[_0xd9b56f(0x1ae)]};}function ee(_0x1657ee,_0x538f54,_0x5efc50){const _0x50adf8=_0x4be5b3;var _0x8c08bf,_0x5615c0;if(((_0x5615c0=(_0x8c08bf=_0x1657ee==null?void 0x0:_0x1657ee[_0x50adf8(0x1b0)])==null?void 0x0:_0x8c08bf['length'])!=null?_0x5615c0:0x0)>0x0){const _0x56810b=(_0x263b5f,_0x162537)=>({'id':_0x263b5f['replyId'],'threadId':_0x263b5f[_0x50adf8(0x1ae)],'dT':y(_0x263b5f[_0x50adf8(0x1c4)]),'personId':_0x263b5f[_0x50adf8(0x1dc)],'resolved':_0x1657ee['solved']===I[_0x50adf8(0x1c6)],'unitId':_0x538f54,'subUnitId':_0x5efc50,'text':JSON[_0x50adf8(0x1b4)](_0x263b5f['content']),'parentId':_0x162537}),_0x293a85=_0x56810b(_0x1657ee[_0x50adf8(0x1b0)][0x0]);return{..._0x293a85,'children':_0x1657ee[_0x50adf8(0x1b0)][_0x50adf8(0x19a)](0x1)[_0x50adf8(0x198)](_0x99d8cf=>_0x56810b(_0x99d8cf,_0x293a85['id']))};}return null;}let S=class{constructor(_0x40c14a,_0x5ce7d5,_0x55de4b){const _0x123821=_0x4be5b3;this[_0x123821(0x1d7)]=_0x40c14a,this[_0x123821(0x1a7)]=_0x5ce7d5,this[_0x123821(0x19f)]=_0x55de4b;}async['addComment'](_0x58c55d){const _0x45ceed=_0x4be5b3;var _0x3e12b6,_0x1e052c;const {parentId:_0x4df7d4,unitId:_0x591586,text:_0x43494a,threadId:_0x2bf97a}=_0x58c55d,_0x3c88dd=(_0x1e052c=(_0x3e12b6=_0x43494a['customRanges'])==null?void 0x0:_0x3e12b6[_0x45ceed(0x1bd)](_0x340868=>_0x340868['rangeType']===_0x1616aa[_0x45ceed(0x1e7)])[_0x45ceed(0x198)](_0x22f17f=>_0x22f17f[_0x45ceed(0x18e)]))!=null?_0x1e052c:[],_0x3d9c9c=JSON[_0x45ceed(0x1c3)](_0x43494a),_0x2e9da5=(await this[_0x45ceed(0x19f)][_0x45ceed(0x1a1)](_0x591586))[_0x45ceed(0x19b)]();if(_0x4df7d4){const _0x17a410={'memberId':_0x2e9da5,'unitId':_0x591586,'content':_0x3d9c9c,'mention':_0x3c88dd,'threadId':_0x2bf97a},_0x5c5879=(await this[_0x45ceed(0x1d7)][_0x45ceed(0x1e5)]('/universer-api/comment/unit/'+_0x591586+'/reply',{'body':_0x17a410}))[_0x45ceed(0x1eb)]['reply'];return{..._0x58c55d,'id':_0x5c5879[_0x45ceed(0x1cb)],'dT':_0x36859c(+_0x5c5879[_0x45ceed(0x1c4)])[_0x45ceed(0x1e2)](_0x45ceed(0x1b7)),'personId':_0x5c5879['userId']};}else{const _0x4422dd={'memberId':_0x2e9da5,'unitId':_0x591586,'content':_0x3d9c9c,'mention':_0x3c88dd},_0x4a9ec9=await this[_0x45ceed(0x1d7)][_0x45ceed(0x1e5)](_0x45ceed(0x1a6)+_0x591586+_0x45ceed(0x19d),{'body':_0x4422dd});return X(_0x4a9ec9[_0x45ceed(0x1eb)]['comment'],_0x58c55d);}}async[_0x4be5b3(0x1e6)](_0x1ac0dd){const _0x24cc5b=_0x4be5b3;var _0x5200cc,_0x16fc21;const {text:_0x68b12e,unitId:_0x3adde9}=_0x1ac0dd,_0x14adf6=(_0x16fc21=(_0x5200cc=_0x68b12e['customRanges'])==null?void 0x0:_0x5200cc['filter'](_0x18f2cb=>_0x18f2cb[_0x24cc5b(0x1e4)]===_0x1616aa[_0x24cc5b(0x1e7)])[_0x24cc5b(0x198)](_0x2aff4c=>_0x2aff4c[_0x24cc5b(0x18e)]))!=null?_0x16fc21:[],_0x27d2a3=JSON[_0x24cc5b(0x1c3)](_0x68b12e),_0x213781=_0x1ac0dd['threadId'],_0x110ae8=_0x1ac0dd['id'],_0x2e7412={'memberId':(await this[_0x24cc5b(0x19f)]['requireSession'](_0x3adde9))[_0x24cc5b(0x19b)](),'unitId':_0x3adde9,'threadId':_0x213781,'mention':_0x14adf6,'content':_0x27d2a3,'replyId':_0x110ae8},_0x1541fc=await this[_0x24cc5b(0x1d7)]['post'](_0x24cc5b(0x1a6)+_0x3adde9+'/edit',{'body':_0x2e7412});return!_0x1541fc['body'][_0x24cc5b(0x1ce)]||_0x1541fc[_0x24cc5b(0x1eb)][_0x24cc5b(0x1ce)][_0x24cc5b(0x1e1)]===0x1;}async[_0x4be5b3(0x195)](_0x179726){const _0x272026=_0x4be5b3,{unitId:_0x50c08e}=_0x179726,_0x385703=_0x179726['threadId'],_0x1b930c={'memberId':this[_0x272026(0x1a7)]['getCurrentUser']()['userID'],'unitId':_0x50c08e,'threadId':_0x385703,'solved':_0x179726[_0x272026(0x1ac)]?I[_0x272026(0x1c6)]:I[_0x272026(0x1d3)]},_0x21a1d2=await this[_0x272026(0x1d7)]['post']('/universer-api/comment/unit/'+_0x50c08e+_0x272026(0x1cc),{'body':_0x1b930c});return!_0x21a1d2[_0x272026(0x1eb)][_0x272026(0x1ce)]||_0x21a1d2[_0x272026(0x1eb)]['error']['code']===0x1;}async[_0x4be5b3(0x1df)](_0x5311c1,_0x50d0ac,_0x23524e,_0x456054){const _0x1654f0=_0x4be5b3,_0x31f401={'memberId':(await this[_0x1654f0(0x19f)][_0x1654f0(0x1a1)](_0x5311c1))[_0x1654f0(0x19b)](),'threadId':_0x23524e,'replyId':_0x456054,'unitId':_0x5311c1},_0xb13796=await this['_httpService'][_0x1654f0(0x1e5)](_0x1654f0(0x1a6)+_0x5311c1+_0x1654f0(0x1be),{'body':_0x31f401});return!_0xb13796[_0x1654f0(0x1eb)][_0x1654f0(0x1ce)]||_0xb13796['body'][_0x1654f0(0x1ce)][_0x1654f0(0x1e1)]===0x1;}async[_0x4be5b3(0x1c5)](_0x3f4fd1,_0x1b4c5f,_0x3308c7){const _0x23955b=_0x4be5b3,_0x24d00c={'unitId':_0x3f4fd1,'threadId':_0x3308c7},_0x3cd45a=await this['_httpService']['post'](_0x23955b(0x1a6)+_0x3f4fd1+_0x23955b(0x1c2),{'body':_0x24d00c}),_0x211e1f=_0x3308c7[_0x23955b(0x198)](_0x5578ac=>ee(_0x3cd45a[_0x23955b(0x1eb)][_0x23955b(0x1b1)][_0x5578ac],_0x3f4fd1,_0x1b4c5f))[_0x23955b(0x1bd)](Boolean);return Object[_0x23955b(0x191)](_0x3cd45a['body'][_0x23955b(0x197)])[_0x23955b(0x1e3)](_0x4d0b71=>{const _0x4c417c=_0x23955b;this[_0x4c417c(0x1a7)][_0x4c417c(0x1d9)](_0x4d0b71);}),_0x211e1f;}[_0x4be5b3(0x1b3)](_0x5eacf1){const _0x1d83bc=_0x4be5b3;return{'id':_0x5eacf1['id'],'threadId':_0x5eacf1['threadId'],'ref':_0x5eacf1[_0x1d83bc(0x1d2)]};}};S=Q([b(0x0,_0x33e49e(_0x480aa6)),b(0x1,_0x33e49e(_0x394c60)),b(0x2,_0x33e49e(_0x26789c))],S);var re=Object[_0x4be5b3(0x1a0)],te=(_0x338c07,_0x46c708,_0x7f2c61,_0x3945d9)=>{for(var _0x35d075=_0x3945d9>0x1?void 0x0:_0x3945d9?re(_0x46c708,_0x7f2c61):_0x46c708,_0xd66b61=_0x338c07['length']-0x1,_0x450687;_0xd66b61>=0x0;_0xd66b61--)(_0x450687=_0x338c07[_0xd66b61])&&(_0x35d075=_0x450687(_0x35d075)||_0x35d075);return _0x35d075;},M=(_0x9e05aa,_0x479a0c)=>(_0x497713,_0xf4d726)=>_0x479a0c(_0x497713,_0xf4d726,_0x9e05aa);let f=class extends _0x55890b{constructor(_0xb27e14,_0x1635f6){const _0x560b61=_0x4be5b3;super(),this[_0x560b61(0x19e)]=_0xb27e14,this[_0x560b61(0x1cf)]=_0x1635f6,this[_0x560b61(0x199)]();}[_0x4be5b3(0x199)](){const _0x4f9ec1=_0x4be5b3;this[_0x4f9ec1(0x19e)][_0x4f9ec1(0x1a8)]=this[_0x4f9ec1(0x1cf)],this[_0x4f9ec1(0x19e)][_0x4f9ec1(0x1db)]=!0x1;}};f=te([M(0x0,_0x1fe3bb),M(0x1,_0x33e49e(S))],f);var se=Object[_0x4be5b3(0x1b8)],oe=Object[_0x4be5b3(0x1a0)],ne=(_0x5b557e,_0xd09fd3,_0x3b826a)=>_0xd09fd3 in _0x5b557e?se(_0x5b557e,_0xd09fd3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b826a}):_0x5b557e[_0xd09fd3]=_0x3b826a,ie=(_0x323644,_0x58a8ed,_0x392cd8,_0x102a56)=>{const _0x2502fc=_0x4be5b3;for(var _0x46a692=_0x102a56>0x1?void 0x0:_0x102a56?oe(_0x58a8ed,_0x392cd8):_0x58a8ed,_0x2d6fe4=_0x323644[_0x2502fc(0x1d4)]-0x1,_0x7a68ff;_0x2d6fe4>=0x0;_0x2d6fe4--)(_0x7a68ff=_0x323644[_0x2d6fe4])&&(_0x46a692=_0x7a68ff(_0x46a692)||_0x46a692);return _0x46a692;},N=(_0x43564b,_0x400142)=>(_0x1688dc,_0x4c6459)=>_0x400142(_0x1688dc,_0x4c6459,_0x43564b),$=(_0xf48b47,_0x1caab6,_0x12f446)=>ne(_0xf48b47,typeof _0x1caab6!=_0x4be5b3(0x196)?_0x1caab6+'':_0x1caab6,_0x12f446);let g=class extends _0x4bb65f{constructor(_0xc5acac=O,_0x32b2fb,_0x47878b){const _0x3feb41=_0x4be5b3;super(),this[_0x3feb41(0x1e0)]=_0xc5acac,this['_injector']=_0x32b2fb,this['_configService']=_0x47878b;const {..._0x2415cd}=_0x5765b9({},O,this[_0x3feb41(0x1e0)]);this[_0x3feb41(0x192)][_0x3feb41(0x1ab)](z,_0x2415cd);}[_0x4be5b3(0x1b6)](){[[S],[f],[_]]['forEach'](_0x3de745=>{const _0x4f6067=_0x1a8d;this[_0x4f6067(0x1dd)]['add'](_0x3de745);});}[_0x4be5b3(0x19c)](){const _0x3cbe5d=_0x4be5b3;this[_0x3cbe5d(0x1dd)][_0x3cbe5d(0x1ad)](f),this[_0x3cbe5d(0x1dd)][_0x3cbe5d(0x1ad)](_);}};function _0x34cc(){const _0x181439=['forEach','rangeType','post','updateComment','COMMENT','Solve','payload','424884abwKZI','body','Unknown','/universer-api/user/list','UNRECOGNIZED','disposeWithMe','2NDMHQz','rangeId','commentUpdate$','type','values','_configService','Reply','Delete','resolveComment','symbol','users','map','_initDataSource','slice','getMemberID','onReady','/add','_threadCommentDataSourceService','_sessionService','getOwnPropertyDescriptor','requireSession','solved','getComment','152199xNsJNo','780411paobWA','/universer-api/comment/unit/','_userService','dataSource','1362546scPgnO','_init','setConfig','resolved','get','threadId','80460nItmkz','replies','comments','Edit','saveCommentToSnapshot','parse','root','onStarting','YYYY/MM/DD\x20HH:mm','defineProperty','4prQdaz','407VIOWdl','find','1602055YdMvBH','filter','/delete','add','UNIVER_UNKNOWN','user','/list','stringify','createTimestamp','listComments','Solved','50IHpiUi','728872gnzMxY','_threadCommentModel','subscribe','replyId','/solved','parentId','error','_threadCommentDataSource','content','getUnit','ref','OpenOrReOpen','length','unitId','14ZCiQWC','_httpService','Add','addUser','_initUserSync','syncUpdateMutationToColla','userId','_injector','pipe','deleteComment','_config','code','format'];_0x34cc=function(){return _0x181439;};return _0x34cc();}$(g,'pluginName',W),$(g,'type',_0x471339[_0x4be5b3(0x1c0)]),g=ie([_0x41b532(_0x2b0062,_0x632fbe,_0x4dad28),N(0x1,_0x33e49e(_0x36e64b)),N(0x2,_0x707352)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x10bff5=_0x21bb;(function(_0x285a34,_0x32f08f){const _0x1dd46c=_0x21bb,_0x53c875=_0x285a34();while(!![]){try{const _0x587b42=-parseInt(_0x1dd46c(0x1e3))/0x1*(parseInt(_0x1dd46c(0x216))/0x2)+-parseInt(_0x1dd46c(0x1ee))/0x3+-parseInt(_0x1dd46c(0x1fe))/0x4+parseInt(_0x1dd46c(0x206))/0x5*(-parseInt(_0x1dd46c(0x22c))/0x6)+-parseInt(_0x1dd46c(0x1d6))/0x7*(-parseInt(_0x1dd46c(0x1e1))/0x8)+-parseInt(_0x1dd46c(0x205))/0x9*(parseInt(_0x1dd46c(0x22e))/0xa)+-parseInt(_0x1dd46c(0x1d1))/0xb*(-parseInt(_0x1dd46c(0x1d5))/0xc);if(_0x587b42===_0x32f08f)break;else _0x53c875['push'](_0x53c875['shift']());}catch(_0x68118d){_0x53c875['push'](_0x53c875['shift']());}}}(_0x2126,0x9dafd));import{CommentService as _0x18e6ec,CollaborationSessionService as _0x524314,UniverCollaborationClientPlugin as _0x288191}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x46bf69}from'@univerjs-pro/license';import{dayjs as _0x1e783b,UserManagerService as _0xc08702,Inject as _0x346acf,Injector as _0x542fad,Disposable as _0x2b6fd7,CustomRangeType as _0x236405,UniverInstanceType as _0x1eb642,DependentOn as _0x50acbf,IConfigService as _0x194b79,Plugin as _0x44e740,merge as _0x544057}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b94fa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x46dddc,IThreadCommentDataSourceService as _0x4edee4}from'@univerjs/thread-comment';import{bufferTime as _0x272284}from'rxjs';import{HTTPService as _0x1851b4}from'@univerjs/network';const W=_0x10bff5(0x209);function _0x21bb(_0x55305d,_0x2a1559){const _0x212694=_0x2126();return _0x21bb=function(_0x21bbc9,_0x21615f){_0x21bbc9=_0x21bbc9-0x1ca;let _0x3485e6=_0x212694[_0x21bbc9];return _0x3485e6;},_0x21bb(_0x55305d,_0x2a1559);}var I=(_0x56f932=>(_0x56f932[_0x56f932[_0x10bff5(0x21a)]=0x0]=_0x10bff5(0x21a),_0x56f932[_0x56f932[_0x10bff5(0x1d0)]=0x1]=_0x10bff5(0x1d0),_0x56f932[_0x56f932[_0x10bff5(0x201)]=-0x1]=_0x10bff5(0x201),_0x56f932))(I||{}),v=(_0x3a7062=>(_0x3a7062[_0x3a7062[_0x10bff5(0x1e8)]=0x0]=_0x10bff5(0x1e8),_0x3a7062[_0x3a7062['Add']=0x1]=_0x10bff5(0x1ca),_0x3a7062[_0x3a7062['Reply']=0x2]='Reply',_0x3a7062[_0x3a7062[_0x10bff5(0x1e7)]=0x3]='Edit',_0x3a7062[_0x3a7062['Delete']=0x4]=_0x10bff5(0x211),_0x3a7062[_0x3a7062['Solve']=0x5]='Solve',_0x3a7062[_0x3a7062[_0x10bff5(0x201)]=-0x1]=_0x10bff5(0x201),_0x3a7062))(v||{});const y=_0x543274=>_0x1e783b(new Date(+_0x543274))[_0x10bff5(0x1ff)](_0x10bff5(0x204)),B=async(_0x385d36,_0xf7ce8a)=>{const _0x5e2e44=_0x10bff5,_0x27b137=_0x385d36[_0x5e2e44(0x218)](_0xc08702),_0x2cab8d=_0x385d36['get'](_0x1851b4);_0xf7ce8a[_0x5e2e44(0x1f0)](_0x724427=>{const _0x13f80e=_0x5e2e44;_0x27b137[_0x13f80e(0x213)](_0x724427)&&_0xf7ce8a[_0x13f80e(0x21e)](_0x724427);}),_0xf7ce8a[_0x5e2e44(0x21f)]&&(await _0x2cab8d[_0x5e2e44(0x218)](_0x5e2e44(0x1de),{'params':{'userIDs':[..._0xf7ce8a]}}))['body'][_0x5e2e44(0x203)]['forEach'](_0x474e6c=>{const _0x20b3be=_0x5e2e44;_0x474e6c&&_0x27b137[_0x20b3be(0x20f)](_0x474e6c);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x469777,_0x39d587,_0x4707e0,_0x38a992)=>{const _0x421c96=_0x10bff5;for(var _0x48f97e=_0x38a992>0x1?void 0x0:_0x38a992?K(_0x39d587,_0x4707e0):_0x39d587,_0x55019e=_0x469777[_0x421c96(0x1f7)]-0x1,_0x11b8ef;_0x55019e>=0x0;_0x55019e--)(_0x11b8ef=_0x469777[_0x55019e])&&(_0x48f97e=_0x11b8ef(_0x48f97e)||_0x48f97e);return _0x48f97e;},p=(_0x5ee64,_0x5c7b7e)=>(_0x53b028,_0x1970b7)=>_0x5c7b7e(_0x53b028,_0x1970b7,_0x5ee64);let _=class extends _0x2b6fd7{constructor(_0x29c931,_0x2fcd85,_0x2eaf60,_0x3ebd69){const _0x3366eb=_0x10bff5;super(),this[_0x3366eb(0x21c)]=_0x29c931,this[_0x3366eb(0x20d)]=_0x2fcd85,this['_userService']=_0x2eaf60,this['_injector']=_0x3ebd69,this[_0x3366eb(0x1e4)](),this['_initUserSync']();}[_0x10bff5(0x207)](){const _0x334203=_0x10bff5;this[_0x334203(0x1e9)](this[_0x334203(0x20d)][_0x334203(0x1ce)][_0x334203(0x1fc)](_0x272284(0x10))['subscribe'](_0x1fb4f4=>{const _0x6f3543=_0x334203,_0x1309e5=new Set();_0x1fb4f4[_0x6f3543(0x1f0)](_0x16f268=>{const _0x31b3ca=_0x6f3543;switch(_0x16f268['type']){case _0x31b3ca(0x1f5):{const _0x16bbaf=_0x16f268[_0x31b3ca(0x20e)][_0x31b3ca(0x208)];_0x1309e5[_0x31b3ca(0x1f5)](_0x16bbaf);break;}}}),B(this[_0x6f3543(0x228)],_0x1309e5);}));}[_0x10bff5(0x1e4)](){const _0x10e29b=_0x10bff5;this[_0x10e29b(0x1e9)](this['_commentService']['commentUpdate$'][_0x10e29b(0x1fd)](async _0xbbdf65=>{const _0x370088=_0x10e29b;var _0x840651,_0x2de963,_0x2cc4f3,_0x1ed5b8;const _0x1fcd33=(_0x840651=this[_0x370088(0x20d)]['getUnit'](_0xbbdf65[_0x370088(0x1f2)])[_0x370088(0x1e0)](_0x482723=>_0x482723[_0x370088(0x1e2)]===_0xbbdf65[_0x370088(0x1e2)]))==null?void 0x0:_0x840651[_0x370088(0x1d9)];if(!_0x1fcd33)return;const {unitId:_0x39b3f7,subUnitId:_0x16b354}=_0x1fcd33;switch(_0xbbdf65['user']&&this[_0x370088(0x1d2)][_0x370088(0x20f)](_0xbbdf65['user']),_0xbbdf65[_0x370088(0x200)]){case v[_0x370088(0x1ca)]:break;case v[_0x370088(0x212)]:{this['_threadCommentModel']['addComment'](_0x39b3f7,_0x16b354,{'unitId':_0x39b3f7,'subUnitId':_0x16b354,'ref':'','id':_0xbbdf65[_0x370088(0x219)],'dT':y(+_0xbbdf65[_0x370088(0x1dd)]),'threadId':_0xbbdf65[_0x370088(0x1e2)],'personId':(_0x2cc4f3=(_0x2de963=_0xbbdf65[_0x370088(0x1df)])==null?void 0x0:_0x2de963[_0x370088(0x230)])!=null?_0x2cc4f3:_0xbbdf65[_0x370088(0x1cd)],'text':JSON[_0x370088(0x231)](_0xbbdf65[_0x370088(0x224)]),'parentId':_0x1fcd33['id']});break;}case v[_0x370088(0x211)]:{const _0x38e15d=this['_threadCommentModel'][_0x370088(0x1fb)](_0x39b3f7,_0x16b354,_0xbbdf65['replyId']);_0x38e15d&&_0x38e15d['parentId']&&this[_0x370088(0x20d)][_0x370088(0x1cb)](_0x39b3f7,_0x16b354,_0xbbdf65[_0x370088(0x219)]);break;}case v[_0x370088(0x1e7)]:{this['_threadCommentModel'][_0x370088(0x1f1)](_0x39b3f7,_0x16b354,{'commentId':_0xbbdf65[_0x370088(0x219)],'text':JSON[_0x370088(0x231)](_0xbbdf65['content'])});break;}case v['Solve']:{const _0x19f1dc=(_0x1ed5b8=this[_0x370088(0x20d)][_0x370088(0x226)](_0xbbdf65[_0x370088(0x1f2)])[_0x370088(0x1e0)](_0x5957d2=>_0x5957d2[_0x370088(0x1e2)]===_0xbbdf65[_0x370088(0x1e2)]))==null?void 0x0:_0x1ed5b8['root'];_0x19f1dc&&this['_threadCommentModel']['resolveComment'](_0x39b3f7,_0x16b354,_0x19f1dc['id'],_0xbbdf65[_0x370088(0x227)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x346acf(_0x18e6ec)),p(0x1,_0x346acf(_0x46dddc)),p(0x2,_0x346acf(_0xc08702)),p(0x3,_0x346acf(_0x542fad))],_);const z=_0x10bff5(0x1cf),O={};var k=Object[_0x10bff5(0x20b)],Q=(_0x1e1833,_0x47f973,_0x4428cf,_0x3cdf79)=>{for(var _0x50dfc0=_0x3cdf79>0x1?void 0x0:_0x3cdf79?k(_0x47f973,_0x4428cf):_0x47f973,_0x179b46=_0x1e1833['length']-0x1,_0x4f9773;_0x179b46>=0x0;_0x179b46--)(_0x4f9773=_0x1e1833[_0x179b46])&&(_0x50dfc0=_0x4f9773(_0x50dfc0)||_0x50dfc0);return _0x50dfc0;},b=(_0x13d331,_0x19ce6e)=>(_0x2bf489,_0x2dee88)=>_0x19ce6e(_0x2bf489,_0x2dee88,_0x13d331);function X(_0x9649af,_0x54948b){const _0x41b52a=_0x10bff5,_0x55275a=_0x9649af[_0x41b52a(0x1db)][0x0];return{..._0x54948b,'id':_0x55275a['replyId'],'resolved':_0x9649af[_0x41b52a(0x227)]===0x1,'dT':y(_0x55275a[_0x41b52a(0x1dd)]),'personId':_0x55275a[_0x41b52a(0x1cd)],'threadId':_0x55275a[_0x41b52a(0x1e2)]};}function ee(_0x5f5350,_0x5e16dd,_0x151115){const _0x2a4b8a=_0x10bff5;var _0x1e31f3,_0x108149;if(((_0x108149=(_0x1e31f3=_0x5f5350==null?void 0x0:_0x5f5350['replies'])==null?void 0x0:_0x1e31f3[_0x2a4b8a(0x1f7)])!=null?_0x108149:0x0)>0x0){const _0xebdfe8=(_0x3809eb,_0x431bcd)=>({'id':_0x3809eb[_0x2a4b8a(0x219)],'threadId':_0x3809eb[_0x2a4b8a(0x1e2)],'dT':y(_0x3809eb['createTimestamp']),'personId':_0x3809eb[_0x2a4b8a(0x1cd)],'resolved':_0x5f5350[_0x2a4b8a(0x227)]===I[_0x2a4b8a(0x1d0)],'unitId':_0x5e16dd,'subUnitId':_0x151115,'text':JSON[_0x2a4b8a(0x231)](_0x3809eb[_0x2a4b8a(0x224)]),'parentId':_0x431bcd}),_0x5d52b6=_0xebdfe8(_0x5f5350[_0x2a4b8a(0x1db)][0x0]);return{..._0x5d52b6,'children':_0x5f5350[_0x2a4b8a(0x1db)][_0x2a4b8a(0x210)](0x1)[_0x2a4b8a(0x1ec)](_0x400af1=>_0xebdfe8(_0x400af1,_0x5d52b6['id']))};}return null;}let S=class{constructor(_0x1a9962,_0x1f911a,_0x28f3d7){const _0x26ef9e=_0x10bff5;this['_httpService']=_0x1a9962,this[_0x26ef9e(0x1d2)]=_0x1f911a,this[_0x26ef9e(0x202)]=_0x28f3d7;}async[_0x10bff5(0x1f4)](_0x32867f){const _0x4886e6=_0x10bff5;var _0x5668ec,_0x1db651;const {parentId:_0x1733a,unitId:_0x13b78f,text:_0x56ecf9,threadId:_0x6849db}=_0x32867f,_0x2e4719=(_0x1db651=(_0x5668ec=_0x56ecf9[_0x4886e6(0x232)])==null?void 0x0:_0x5668ec[_0x4886e6(0x223)](_0xffc7f8=>_0xffc7f8[_0x4886e6(0x1ed)]===_0x236405[_0x4886e6(0x215)])[_0x4886e6(0x1ec)](_0x11fc2b=>_0x11fc2b['rangeId']))!=null?_0x1db651:[],_0x3a9ec4=JSON['stringify'](_0x56ecf9),_0x3c20f9=(await this[_0x4886e6(0x202)][_0x4886e6(0x21d)](_0x13b78f))[_0x4886e6(0x234)]();if(_0x1733a){const _0xd162e8={'memberId':_0x3c20f9,'unitId':_0x13b78f,'content':_0x3a9ec4,'mention':_0x2e4719,'threadId':_0x6849db},_0x1d1cd2=(await this[_0x4886e6(0x22d)]['post']('/universer-api/comment/unit/'+_0x13b78f+_0x4886e6(0x1dc),{'body':_0xd162e8}))[_0x4886e6(0x1f3)][_0x4886e6(0x221)];return{..._0x32867f,'id':_0x1d1cd2[_0x4886e6(0x219)],'dT':_0x1e783b(+_0x1d1cd2[_0x4886e6(0x1dd)])[_0x4886e6(0x1ff)](_0x4886e6(0x204)),'personId':_0x1d1cd2[_0x4886e6(0x1cd)]};}else{const _0x151524={'memberId':_0x3c20f9,'unitId':_0x13b78f,'content':_0x3a9ec4,'mention':_0x2e4719},_0x410ada=await this[_0x4886e6(0x22d)][_0x4886e6(0x1ea)](_0x4886e6(0x1d8)+_0x13b78f+_0x4886e6(0x1eb),{'body':_0x151524});return X(_0x410ada[_0x4886e6(0x1f3)][_0x4886e6(0x214)],_0x32867f);}}async[_0x10bff5(0x1f1)](_0x3c4b74){const _0x311ed7=_0x10bff5;var _0xe96652,_0x338ca0;const {text:_0x4fbd12,unitId:_0x5c9aea}=_0x3c4b74,_0x41929b=(_0x338ca0=(_0xe96652=_0x4fbd12[_0x311ed7(0x232)])==null?void 0x0:_0xe96652['filter'](_0x3f0236=>_0x3f0236[_0x311ed7(0x1ed)]===_0x236405['COMMENT'])[_0x311ed7(0x1ec)](_0x15a562=>_0x15a562[_0x311ed7(0x21b)]))!=null?_0x338ca0:[],_0x80689a=JSON[_0x311ed7(0x1f8)](_0x4fbd12),_0xad2581=_0x3c4b74[_0x311ed7(0x1e2)],_0x543bb5=_0x3c4b74['id'],_0x1ecd3f={'memberId':(await this['_sessionService']['requireSession'](_0x5c9aea))[_0x311ed7(0x234)](),'unitId':_0x5c9aea,'threadId':_0xad2581,'mention':_0x41929b,'content':_0x80689a,'replyId':_0x543bb5},_0x203d09=await this['_httpService']['post'](_0x311ed7(0x1d8)+_0x5c9aea+'/edit',{'body':_0x1ecd3f});return!_0x203d09[_0x311ed7(0x1f3)][_0x311ed7(0x222)]||_0x203d09[_0x311ed7(0x1f3)][_0x311ed7(0x222)][_0x311ed7(0x225)]===0x1;}async[_0x10bff5(0x1d4)](_0x28eec4){const _0x582462=_0x10bff5,{unitId:_0x3b7a11}=_0x28eec4,_0x4e39b9=_0x28eec4[_0x582462(0x1e2)],_0x47d274={'memberId':this[_0x582462(0x1d2)]['getCurrentUser']()[_0x582462(0x230)],'unitId':_0x3b7a11,'threadId':_0x4e39b9,'solved':_0x28eec4[_0x582462(0x220)]?I[_0x582462(0x1d0)]:I['OpenOrReOpen']},_0x2919a4=await this[_0x582462(0x22d)][_0x582462(0x1ea)](_0x582462(0x1d8)+_0x3b7a11+_0x582462(0x1cc),{'body':_0x47d274});return!_0x2919a4[_0x582462(0x1f3)][_0x582462(0x222)]||_0x2919a4[_0x582462(0x1f3)]['error'][_0x582462(0x225)]===0x1;}async[_0x10bff5(0x1cb)](_0x4a593c,_0x261dce,_0x1cf9ac,_0x5af762){const _0xea7756=_0x10bff5,_0x3a233f={'memberId':(await this['_sessionService'][_0xea7756(0x21d)](_0x4a593c))['getMemberID'](),'threadId':_0x1cf9ac,'replyId':_0x5af762,'unitId':_0x4a593c},_0x463a2d=await this['_httpService'][_0xea7756(0x1ea)]('/universer-api/comment/unit/'+_0x4a593c+_0xea7756(0x20a),{'body':_0x3a233f});return!_0x463a2d[_0xea7756(0x1f3)][_0xea7756(0x222)]||_0x463a2d[_0xea7756(0x1f3)][_0xea7756(0x222)]['code']===0x1;}async[_0x10bff5(0x22a)](_0x42fbcd,_0x4a621a,_0x5a46e4){const _0x1f92b8=_0x10bff5,_0x517c3f={'unitId':_0x42fbcd,'threadId':_0x5a46e4},_0x238857=await this[_0x1f92b8(0x22d)]['post']('/universer-api/comment/unit/'+_0x42fbcd+_0x1f92b8(0x1d7),{'body':_0x517c3f}),_0x534d3a=_0x5a46e4[_0x1f92b8(0x1ec)](_0x153410=>ee(_0x238857['body']['comments'][_0x153410],_0x42fbcd,_0x4a621a))[_0x1f92b8(0x223)](Boolean);return Object[_0x1f92b8(0x1e5)](_0x238857['body']['users'])[_0x1f92b8(0x1f0)](_0x8c6a55=>{const _0x2de03e=_0x1f92b8;this[_0x2de03e(0x1d2)]['addUser'](_0x8c6a55);}),_0x534d3a;}[_0x10bff5(0x1da)](_0x2f9a72){const _0x52ccff=_0x10bff5;return{'id':_0x2f9a72['id'],'threadId':_0x2f9a72[_0x52ccff(0x1e2)],'ref':_0x2f9a72['ref']};}};S=Q([b(0x0,_0x346acf(_0x1851b4)),b(0x1,_0x346acf(_0xc08702)),b(0x2,_0x346acf(_0x524314))],S);function _0x2126(){const _0x1c0020=['/reply','createTimestamp','/universer-api/user/list','user','find','76984RvQZSl','threadId','43rnLkqh','_init','values','onReady','Edit','Unknown','disposeWithMe','post','/add','map','rangeType','1150347VqGkfJ','_threadCommentDataSourceService','forEach','updateComment','unitId','body','addComment','add','onStarting','length','stringify','dataSource','pluginName','getComment','pipe','subscribe','4069420kIYKqH','format','type','UNRECOGNIZED','_sessionService','users','YYYY/MM/DD\x20HH:mm','306CGtIkH','78745dDkuNJ','_initUserSync','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','getOwnPropertyDescriptor','symbol','_threadCommentModel','payload','addUser','slice','Delete','Reply','getUser','comment','COMMENT','2706BxiulY','defineProperty','get','replyId','OpenOrReOpen','rangeId','_commentService','requireSession','delete','size','resolved','reply','error','filter','content','code','getUnit','solved','_injector','_configService','listComments','_initDataSource','438iNvQia','_httpService','241510ZxmgPo','_config','userID','parse','customRanges','_threadCommentDataSource','getMemberID','Add','deleteComment','/solved','userId','commentUpdate$','thread-comment-data-source.config','Solved','110WanZFg','_userService','UNIVER_UNKNOWN','resolveComment','4163316QMDDNO','441fUEliH','/list','/universer-api/comment/unit/','root','saveCommentToSnapshot','replies'];_0x2126=function(){return _0x1c0020;};return _0x2126();}var re=Object[_0x10bff5(0x20b)],te=(_0x5afbba,_0xed95f5,_0x54d474,_0x2e01b1)=>{const _0x3e3155=_0x10bff5;for(var _0x304b91=_0x2e01b1>0x1?void 0x0:_0x2e01b1?re(_0xed95f5,_0x54d474):_0xed95f5,_0x82b4a3=_0x5afbba[_0x3e3155(0x1f7)]-0x1,_0x4ec756;_0x82b4a3>=0x0;_0x82b4a3--)(_0x4ec756=_0x5afbba[_0x82b4a3])&&(_0x304b91=_0x4ec756(_0x304b91)||_0x304b91);return _0x304b91;},M=(_0xfce24b,_0xed2172)=>(_0x1d1c74,_0x3b89a6)=>_0xed2172(_0x1d1c74,_0x3b89a6,_0xfce24b);let f=class extends _0x2b6fd7{constructor(_0x14ab74,_0x10ca7c){const _0x348c19=_0x10bff5;super(),this[_0x348c19(0x1ef)]=_0x14ab74,this['_threadCommentDataSource']=_0x10ca7c,this[_0x348c19(0x22b)]();}['_initDataSource'](){const _0x59a133=_0x10bff5;this[_0x59a133(0x1ef)][_0x59a133(0x1f9)]=this[_0x59a133(0x233)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4edee4),M(0x1,_0x346acf(S))],f);var se=Object[_0x10bff5(0x217)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x1c5fb8,_0x5f14a6,_0x436d5b)=>_0x5f14a6 in _0x1c5fb8?se(_0x1c5fb8,_0x5f14a6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x436d5b}):_0x1c5fb8[_0x5f14a6]=_0x436d5b,ie=(_0x55e766,_0x2e623b,_0x3dd359,_0x2c7791)=>{const _0x22f9bf=_0x10bff5;for(var _0x274cce=_0x2c7791>0x1?void 0x0:_0x2c7791?oe(_0x2e623b,_0x3dd359):_0x2e623b,_0x25970f=_0x55e766[_0x22f9bf(0x1f7)]-0x1,_0x2a5639;_0x25970f>=0x0;_0x25970f--)(_0x2a5639=_0x55e766[_0x25970f])&&(_0x274cce=_0x2a5639(_0x274cce)||_0x274cce);return _0x274cce;},N=(_0x2b0485,_0x18646e)=>(_0x22d13d,_0x2b0701)=>_0x18646e(_0x22d13d,_0x2b0701,_0x2b0485),$=(_0x4fbad8,_0x4c4206,_0x15091a)=>ne(_0x4fbad8,typeof _0x4c4206!=_0x10bff5(0x20c)?_0x4c4206+'':_0x4c4206,_0x15091a);let g=class extends _0x44e740{constructor(_0x1d993c=O,_0x2a5fe6,_0x4536d4){const _0x44cd9e=_0x10bff5;super(),this[_0x44cd9e(0x22f)]=_0x1d993c,this[_0x44cd9e(0x228)]=_0x2a5fe6,this[_0x44cd9e(0x229)]=_0x4536d4;const {..._0x37486c}=_0x544057({},O,this['_config']);this[_0x44cd9e(0x229)]['setConfig'](z,_0x37486c);}[_0x10bff5(0x1f6)](){const _0x1bcc0c=_0x10bff5;[[S],[f],[_]][_0x1bcc0c(0x1f0)](_0x2faefa=>{const _0x5e8ece=_0x1bcc0c;this[_0x5e8ece(0x228)][_0x5e8ece(0x1f5)](_0x2faefa);});}[_0x10bff5(0x1e6)](){const _0x4943f4=_0x10bff5;this['_injector'][_0x4943f4(0x218)](f),this[_0x4943f4(0x228)][_0x4943f4(0x218)](_);}};$(g,_0x10bff5(0x1fa),W),$(g,_0x10bff5(0x200),_0x1eb642[_0x10bff5(0x1d3)]),g=ie([_0x50acbf(_0x1b94fa,_0x288191,_0x46bf69),N(0x1,_0x346acf(_0x542fad)),N(0x2,_0x194b79)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x4be5b3=_0x1a8d;(function(_0x344bd3,_0x3af6ac){const _0x39c542=_0x1a8d,_0x11c253=_0x344bd3();while(!![]){try{const _0x217d4e=-parseInt(_0x39c542(0x18d))/0x1*(-parseInt(_0x39c542(0x1ea))/0x2)+parseInt(_0x39c542(0x1a5))/0x3*(parseInt(_0x39c542(0x1b9))/0x4)+-parseInt(_0x39c542(0x1bc))/0x5+-parseInt(_0x39c542(0x1a9))/0x6+parseInt(_0x39c542(0x1d6))/0x7*(-parseInt(_0x39c542(0x1c8))/0x8)+-parseInt(_0x39c542(0x1a4))/0x9*(-parseInt(_0x39c542(0x1c7))/0xa)+parseInt(_0x39c542(0x1ba))/0xb*(parseInt(_0x39c542(0x1af))/0xc);if(_0x217d4e===_0x3af6ac)break;else _0x11c253['push'](_0x11c253['shift']());}catch(_0x266e2c){_0x11c253['push'](_0x11c253['shift']());}}}(_0x34cc,0x464c5));import{CommentService as _0x3e43f1,CollaborationSessionService as _0x26789c,UniverCollaborationClientPlugin as _0x632fbe}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4dad28}from'@univerjs-pro/license';import{dayjs as _0x36859c,UserManagerService as _0x394c60,Inject as _0x33e49e,Injector as _0x36e64b,Disposable as _0x55890b,CustomRangeType as _0x1616aa,UniverInstanceType as _0x471339,DependentOn as _0x41b532,IConfigService as _0x707352,Plugin as _0x4bb65f,merge as _0x5765b9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b0062}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x242492,IThreadCommentDataSourceService as _0x1fe3bb}from'@univerjs/thread-comment';import{bufferTime as _0x4ed255}from'rxjs';import{HTTPService as _0x480aa6}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x77b600=>(_0x77b600[_0x77b600[_0x4be5b3(0x1d3)]=0x0]=_0x4be5b3(0x1d3),_0x77b600[_0x77b600['Solved']=0x1]='Solved',_0x77b600[_0x77b600[_0x4be5b3(0x18b)]=-0x1]=_0x4be5b3(0x18b),_0x77b600))(I||{}),v=(_0x283d3f=>(_0x283d3f[_0x283d3f[_0x4be5b3(0x189)]=0x0]=_0x4be5b3(0x189),_0x283d3f[_0x283d3f[_0x4be5b3(0x1d8)]=0x1]=_0x4be5b3(0x1d8),_0x283d3f[_0x283d3f[_0x4be5b3(0x193)]=0x2]=_0x4be5b3(0x193),_0x283d3f[_0x283d3f[_0x4be5b3(0x1b2)]=0x3]='Edit',_0x283d3f[_0x283d3f[_0x4be5b3(0x194)]=0x4]='Delete',_0x283d3f[_0x283d3f[_0x4be5b3(0x1e8)]=0x5]='Solve',_0x283d3f[_0x283d3f[_0x4be5b3(0x18b)]=-0x1]='UNRECOGNIZED',_0x283d3f))(v||{});const y=_0x2313d9=>_0x36859c(new Date(+_0x2313d9))[_0x4be5b3(0x1e2)](_0x4be5b3(0x1b7)),B=async(_0x1ac2c1,_0x41cd9a)=>{const _0x46f118=_0x4be5b3,_0x3e008d=_0x1ac2c1[_0x46f118(0x1ad)](_0x394c60),_0x5d07bb=_0x1ac2c1['get'](_0x480aa6);_0x41cd9a['forEach'](_0x57a124=>{_0x3e008d['getUser'](_0x57a124)&&_0x41cd9a['delete'](_0x57a124);}),_0x41cd9a['size']&&(await _0x5d07bb[_0x46f118(0x1ad)](_0x46f118(0x18a),{'params':{'userIDs':[..._0x41cd9a]}}))[_0x46f118(0x1eb)][_0x46f118(0x197)][_0x46f118(0x1e3)](_0x3a3d11=>{const _0x487a1b=_0x46f118;_0x3a3d11&&_0x3e008d[_0x487a1b(0x1d9)](_0x3a3d11);});};var K=Object[_0x4be5b3(0x1a0)],V=(_0x5405d2,_0x226810,_0xdca34a,_0x43127a)=>{const _0x2599da=_0x4be5b3;for(var _0x451077=_0x43127a>0x1?void 0x0:_0x43127a?K(_0x226810,_0xdca34a):_0x226810,_0x2fcadc=_0x5405d2[_0x2599da(0x1d4)]-0x1,_0x5a4b73;_0x2fcadc>=0x0;_0x2fcadc--)(_0x5a4b73=_0x5405d2[_0x2fcadc])&&(_0x451077=_0x5a4b73(_0x451077)||_0x451077);return _0x451077;},p=(_0x303215,_0x3dd8e8)=>(_0x38c83e,_0x1b3da2)=>_0x3dd8e8(_0x38c83e,_0x1b3da2,_0x303215);let _=class extends _0x55890b{constructor(_0xe30f39,_0x2ca75e,_0x56abdc,_0x463d97){const _0x5e9af6=_0x4be5b3;super(),this['_commentService']=_0xe30f39,this[_0x5e9af6(0x1c9)]=_0x2ca75e,this[_0x5e9af6(0x1a7)]=_0x56abdc,this['_injector']=_0x463d97,this[_0x5e9af6(0x1aa)](),this[_0x5e9af6(0x1da)]();}['_initUserSync'](){const _0x5ba8d9=_0x4be5b3;this['disposeWithMe'](this[_0x5ba8d9(0x1c9)][_0x5ba8d9(0x18f)][_0x5ba8d9(0x1de)](_0x4ed255(0x10))[_0x5ba8d9(0x1ca)](_0x1353a3=>{const _0x35f7b5=new Set();_0x1353a3['forEach'](_0x7dca46=>{const _0x3f33fe=_0x1a8d;switch(_0x7dca46['type']){case _0x3f33fe(0x1bf):{const _0x45ea17=_0x7dca46[_0x3f33fe(0x1e9)]['personId'];_0x35f7b5[_0x3f33fe(0x1bf)](_0x45ea17);break;}}}),B(this['_injector'],_0x35f7b5);}));}[_0x4be5b3(0x1aa)](){const _0x5ceba0=_0x4be5b3;this[_0x5ceba0(0x18c)](this['_commentService'][_0x5ceba0(0x18f)][_0x5ceba0(0x1ca)](async _0x17d0a5=>{const _0x825e42=_0x5ceba0;var _0x4a3781,_0x5c7ea2,_0x207b7b,_0x436de2;const _0x1cfa86=(_0x4a3781=this[_0x825e42(0x1c9)][_0x825e42(0x1d1)](_0x17d0a5[_0x825e42(0x1d5)])['find'](_0x498a34=>_0x498a34[_0x825e42(0x1ae)]===_0x17d0a5['threadId']))==null?void 0x0:_0x4a3781[_0x825e42(0x1b5)];if(!_0x1cfa86)return;const {unitId:_0x151a2f,subUnitId:_0x532867}=_0x1cfa86;switch(_0x17d0a5[_0x825e42(0x1c1)]&&this[_0x825e42(0x1a7)]['addUser'](_0x17d0a5[_0x825e42(0x1c1)]),_0x17d0a5[_0x825e42(0x190)]){case v['Add']:break;case v[_0x825e42(0x193)]:{this[_0x825e42(0x1c9)]['addComment'](_0x151a2f,_0x532867,{'unitId':_0x151a2f,'subUnitId':_0x532867,'ref':'','id':_0x17d0a5['replyId'],'dT':y(+_0x17d0a5['createTimestamp']),'threadId':_0x17d0a5[_0x825e42(0x1ae)],'personId':(_0x207b7b=(_0x5c7ea2=_0x17d0a5[_0x825e42(0x1c1)])==null?void 0x0:_0x5c7ea2['userID'])!=null?_0x207b7b:_0x17d0a5[_0x825e42(0x1dc)],'text':JSON[_0x825e42(0x1b4)](_0x17d0a5[_0x825e42(0x1d0)]),'parentId':_0x1cfa86['id']});break;}case v[_0x825e42(0x194)]:{const _0x3d4d65=this[_0x825e42(0x1c9)][_0x825e42(0x1a3)](_0x151a2f,_0x532867,_0x17d0a5['replyId']);_0x3d4d65&&_0x3d4d65[_0x825e42(0x1cd)]&&this[_0x825e42(0x1c9)][_0x825e42(0x1df)](_0x151a2f,_0x532867,_0x17d0a5[_0x825e42(0x1cb)]);break;}case v[_0x825e42(0x1b2)]:{this['_threadCommentModel']['updateComment'](_0x151a2f,_0x532867,{'commentId':_0x17d0a5[_0x825e42(0x1cb)],'text':JSON['parse'](_0x17d0a5[_0x825e42(0x1d0)])});break;}case v[_0x825e42(0x1e8)]:{const _0x3e084f=(_0x436de2=this[_0x825e42(0x1c9)][_0x825e42(0x1d1)](_0x17d0a5['unitId'])[_0x825e42(0x1bb)](_0xe3db71=>_0xe3db71[_0x825e42(0x1ae)]===_0x17d0a5['threadId']))==null?void 0x0:_0x436de2['root'];_0x3e084f&&this[_0x825e42(0x1c9)][_0x825e42(0x195)](_0x151a2f,_0x532867,_0x3e084f['id'],_0x17d0a5[_0x825e42(0x1a2)]===I[_0x825e42(0x1c6)]);break;}}}));}};_=V([p(0x0,_0x33e49e(_0x3e43f1)),p(0x1,_0x33e49e(_0x242492)),p(0x2,_0x33e49e(_0x394c60)),p(0x3,_0x33e49e(_0x36e64b))],_);const z='thread-comment-data-source.config',O={};function _0x1a8d(_0x32b13c,_0x1138f8){const _0x34ccdc=_0x34cc();return _0x1a8d=function(_0x1a8dc3,_0x517058){_0x1a8dc3=_0x1a8dc3-0x189;let _0x2d137a=_0x34ccdc[_0x1a8dc3];return _0x2d137a;},_0x1a8d(_0x32b13c,_0x1138f8);}var k=Object['getOwnPropertyDescriptor'],Q=(_0x40aeba,_0x400b51,_0x44a011,_0x403705)=>{for(var _0x1cfc60=_0x403705>0x1?void 0x0:_0x403705?k(_0x400b51,_0x44a011):_0x400b51,_0x37750b=_0x40aeba['length']-0x1,_0x11c5cf;_0x37750b>=0x0;_0x37750b--)(_0x11c5cf=_0x40aeba[_0x37750b])&&(_0x1cfc60=_0x11c5cf(_0x1cfc60)||_0x1cfc60);return _0x1cfc60;},b=(_0x329240,_0x57f6e9)=>(_0x508c6d,_0x4158c4)=>_0x57f6e9(_0x508c6d,_0x4158c4,_0x329240);function X(_0x5c1ee7,_0x5e2bce){const _0xd9b56f=_0x4be5b3,_0x4058a0=_0x5c1ee7[_0xd9b56f(0x1b0)][0x0];return{..._0x5e2bce,'id':_0x4058a0[_0xd9b56f(0x1cb)],'resolved':_0x5c1ee7[_0xd9b56f(0x1a2)]===0x1,'dT':y(_0x4058a0[_0xd9b56f(0x1c4)]),'personId':_0x4058a0[_0xd9b56f(0x1dc)],'threadId':_0x4058a0[_0xd9b56f(0x1ae)]};}function ee(_0x1657ee,_0x538f54,_0x5efc50){const _0x50adf8=_0x4be5b3;var _0x8c08bf,_0x5615c0;if(((_0x5615c0=(_0x8c08bf=_0x1657ee==null?void 0x0:_0x1657ee[_0x50adf8(0x1b0)])==null?void 0x0:_0x8c08bf['length'])!=null?_0x5615c0:0x0)>0x0){const _0x56810b=(_0x263b5f,_0x162537)=>({'id':_0x263b5f['replyId'],'threadId':_0x263b5f[_0x50adf8(0x1ae)],'dT':y(_0x263b5f[_0x50adf8(0x1c4)]),'personId':_0x263b5f[_0x50adf8(0x1dc)],'resolved':_0x1657ee['solved']===I[_0x50adf8(0x1c6)],'unitId':_0x538f54,'subUnitId':_0x5efc50,'text':JSON[_0x50adf8(0x1b4)](_0x263b5f['content']),'parentId':_0x162537}),_0x293a85=_0x56810b(_0x1657ee[_0x50adf8(0x1b0)][0x0]);return{..._0x293a85,'children':_0x1657ee[_0x50adf8(0x1b0)][_0x50adf8(0x19a)](0x1)[_0x50adf8(0x198)](_0x99d8cf=>_0x56810b(_0x99d8cf,_0x293a85['id']))};}return null;}let S=class{constructor(_0x40c14a,_0x5ce7d5,_0x55de4b){const _0x123821=_0x4be5b3;this[_0x123821(0x1d7)]=_0x40c14a,this[_0x123821(0x1a7)]=_0x5ce7d5,this[_0x123821(0x19f)]=_0x55de4b;}async['addComment'](_0x58c55d){const _0x45ceed=_0x4be5b3;var _0x3e12b6,_0x1e052c;const {parentId:_0x4df7d4,unitId:_0x591586,text:_0x43494a,threadId:_0x2bf97a}=_0x58c55d,_0x3c88dd=(_0x1e052c=(_0x3e12b6=_0x43494a['customRanges'])==null?void 0x0:_0x3e12b6[_0x45ceed(0x1bd)](_0x340868=>_0x340868['rangeType']===_0x1616aa[_0x45ceed(0x1e7)])[_0x45ceed(0x198)](_0x22f17f=>_0x22f17f[_0x45ceed(0x18e)]))!=null?_0x1e052c:[],_0x3d9c9c=JSON[_0x45ceed(0x1c3)](_0x43494a),_0x2e9da5=(await this[_0x45ceed(0x19f)][_0x45ceed(0x1a1)](_0x591586))[_0x45ceed(0x19b)]();if(_0x4df7d4){const _0x17a410={'memberId':_0x2e9da5,'unitId':_0x591586,'content':_0x3d9c9c,'mention':_0x3c88dd,'threadId':_0x2bf97a},_0x5c5879=(await this[_0x45ceed(0x1d7)][_0x45ceed(0x1e5)]('/universer-api/comment/unit/'+_0x591586+'/reply',{'body':_0x17a410}))[_0x45ceed(0x1eb)]['reply'];return{..._0x58c55d,'id':_0x5c5879[_0x45ceed(0x1cb)],'dT':_0x36859c(+_0x5c5879[_0x45ceed(0x1c4)])[_0x45ceed(0x1e2)](_0x45ceed(0x1b7)),'personId':_0x5c5879['userId']};}else{const _0x4422dd={'memberId':_0x2e9da5,'unitId':_0x591586,'content':_0x3d9c9c,'mention':_0x3c88dd},_0x4a9ec9=await this[_0x45ceed(0x1d7)][_0x45ceed(0x1e5)](_0x45ceed(0x1a6)+_0x591586+_0x45ceed(0x19d),{'body':_0x4422dd});return X(_0x4a9ec9[_0x45ceed(0x1eb)]['comment'],_0x58c55d);}}async[_0x4be5b3(0x1e6)](_0x1ac0dd){const _0x24cc5b=_0x4be5b3;var _0x5200cc,_0x16fc21;const {text:_0x68b12e,unitId:_0x3adde9}=_0x1ac0dd,_0x14adf6=(_0x16fc21=(_0x5200cc=_0x68b12e['customRanges'])==null?void 0x0:_0x5200cc['filter'](_0x18f2cb=>_0x18f2cb[_0x24cc5b(0x1e4)]===_0x1616aa[_0x24cc5b(0x1e7)])[_0x24cc5b(0x198)](_0x2aff4c=>_0x2aff4c[_0x24cc5b(0x18e)]))!=null?_0x16fc21:[],_0x27d2a3=JSON[_0x24cc5b(0x1c3)](_0x68b12e),_0x213781=_0x1ac0dd['threadId'],_0x110ae8=_0x1ac0dd['id'],_0x2e7412={'memberId':(await this[_0x24cc5b(0x19f)]['requireSession'](_0x3adde9))[_0x24cc5b(0x19b)](),'unitId':_0x3adde9,'threadId':_0x213781,'mention':_0x14adf6,'content':_0x27d2a3,'replyId':_0x110ae8},_0x1541fc=await this[_0x24cc5b(0x1d7)]['post'](_0x24cc5b(0x1a6)+_0x3adde9+'/edit',{'body':_0x2e7412});return!_0x1541fc['body'][_0x24cc5b(0x1ce)]||_0x1541fc[_0x24cc5b(0x1eb)][_0x24cc5b(0x1ce)][_0x24cc5b(0x1e1)]===0x1;}async[_0x4be5b3(0x195)](_0x179726){const _0x272026=_0x4be5b3,{unitId:_0x50c08e}=_0x179726,_0x385703=_0x179726['threadId'],_0x1b930c={'memberId':this[_0x272026(0x1a7)]['getCurrentUser']()['userID'],'unitId':_0x50c08e,'threadId':_0x385703,'solved':_0x179726[_0x272026(0x1ac)]?I[_0x272026(0x1c6)]:I[_0x272026(0x1d3)]},_0x21a1d2=await this[_0x272026(0x1d7)]['post']('/universer-api/comment/unit/'+_0x50c08e+_0x272026(0x1cc),{'body':_0x1b930c});return!_0x21a1d2[_0x272026(0x1eb)][_0x272026(0x1ce)]||_0x21a1d2[_0x272026(0x1eb)]['error']['code']===0x1;}async[_0x4be5b3(0x1df)](_0x5311c1,_0x50d0ac,_0x23524e,_0x456054){const _0x1654f0=_0x4be5b3,_0x31f401={'memberId':(await this[_0x1654f0(0x19f)][_0x1654f0(0x1a1)](_0x5311c1))[_0x1654f0(0x19b)](),'threadId':_0x23524e,'replyId':_0x456054,'unitId':_0x5311c1},_0xb13796=await this['_httpService'][_0x1654f0(0x1e5)](_0x1654f0(0x1a6)+_0x5311c1+_0x1654f0(0x1be),{'body':_0x31f401});return!_0xb13796[_0x1654f0(0x1eb)][_0x1654f0(0x1ce)]||_0xb13796['body'][_0x1654f0(0x1ce)][_0x1654f0(0x1e1)]===0x1;}async[_0x4be5b3(0x1c5)](_0x3f4fd1,_0x1b4c5f,_0x3308c7){const _0x23955b=_0x4be5b3,_0x24d00c={'unitId':_0x3f4fd1,'threadId':_0x3308c7},_0x3cd45a=await this['_httpService']['post'](_0x23955b(0x1a6)+_0x3f4fd1+_0x23955b(0x1c2),{'body':_0x24d00c}),_0x211e1f=_0x3308c7[_0x23955b(0x198)](_0x5578ac=>ee(_0x3cd45a[_0x23955b(0x1eb)][_0x23955b(0x1b1)][_0x5578ac],_0x3f4fd1,_0x1b4c5f))[_0x23955b(0x1bd)](Boolean);return Object[_0x23955b(0x191)](_0x3cd45a['body'][_0x23955b(0x197)])[_0x23955b(0x1e3)](_0x4d0b71=>{const _0x4c417c=_0x23955b;this[_0x4c417c(0x1a7)][_0x4c417c(0x1d9)](_0x4d0b71);}),_0x211e1f;}[_0x4be5b3(0x1b3)](_0x5eacf1){const _0x1d83bc=_0x4be5b3;return{'id':_0x5eacf1['id'],'threadId':_0x5eacf1['threadId'],'ref':_0x5eacf1[_0x1d83bc(0x1d2)]};}};S=Q([b(0x0,_0x33e49e(_0x480aa6)),b(0x1,_0x33e49e(_0x394c60)),b(0x2,_0x33e49e(_0x26789c))],S);var re=Object[_0x4be5b3(0x1a0)],te=(_0x338c07,_0x46c708,_0x7f2c61,_0x3945d9)=>{for(var _0x35d075=_0x3945d9>0x1?void 0x0:_0x3945d9?re(_0x46c708,_0x7f2c61):_0x46c708,_0xd66b61=_0x338c07['length']-0x1,_0x450687;_0xd66b61>=0x0;_0xd66b61--)(_0x450687=_0x338c07[_0xd66b61])&&(_0x35d075=_0x450687(_0x35d075)||_0x35d075);return _0x35d075;},M=(_0x9e05aa,_0x479a0c)=>(_0x497713,_0xf4d726)=>_0x479a0c(_0x497713,_0xf4d726,_0x9e05aa);let f=class extends _0x55890b{constructor(_0xb27e14,_0x1635f6){const _0x560b61=_0x4be5b3;super(),this[_0x560b61(0x19e)]=_0xb27e14,this[_0x560b61(0x1cf)]=_0x1635f6,this[_0x560b61(0x199)]();}[_0x4be5b3(0x199)](){const _0x4f9ec1=_0x4be5b3;this[_0x4f9ec1(0x19e)][_0x4f9ec1(0x1a8)]=this[_0x4f9ec1(0x1cf)],this[_0x4f9ec1(0x19e)][_0x4f9ec1(0x1db)]=!0x1;}};f=te([M(0x0,_0x1fe3bb),M(0x1,_0x33e49e(S))],f);var se=Object[_0x4be5b3(0x1b8)],oe=Object[_0x4be5b3(0x1a0)],ne=(_0x5b557e,_0xd09fd3,_0x3b826a)=>_0xd09fd3 in _0x5b557e?se(_0x5b557e,_0xd09fd3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b826a}):_0x5b557e[_0xd09fd3]=_0x3b826a,ie=(_0x323644,_0x58a8ed,_0x392cd8,_0x102a56)=>{const _0x2502fc=_0x4be5b3;for(var _0x46a692=_0x102a56>0x1?void 0x0:_0x102a56?oe(_0x58a8ed,_0x392cd8):_0x58a8ed,_0x2d6fe4=_0x323644[_0x2502fc(0x1d4)]-0x1,_0x7a68ff;_0x2d6fe4>=0x0;_0x2d6fe4--)(_0x7a68ff=_0x323644[_0x2d6fe4])&&(_0x46a692=_0x7a68ff(_0x46a692)||_0x46a692);return _0x46a692;},N=(_0x43564b,_0x400142)=>(_0x1688dc,_0x4c6459)=>_0x400142(_0x1688dc,_0x4c6459,_0x43564b),$=(_0xf48b47,_0x1caab6,_0x12f446)=>ne(_0xf48b47,typeof _0x1caab6!=_0x4be5b3(0x196)?_0x1caab6+'':_0x1caab6,_0x12f446);let g=class extends _0x4bb65f{constructor(_0xc5acac=O,_0x32b2fb,_0x47878b){const _0x3feb41=_0x4be5b3;super(),this[_0x3feb41(0x1e0)]=_0xc5acac,this['_injector']=_0x32b2fb,this['_configService']=_0x47878b;const {..._0x2415cd}=_0x5765b9({},O,this[_0x3feb41(0x1e0)]);this[_0x3feb41(0x192)][_0x3feb41(0x1ab)](z,_0x2415cd);}[_0x4be5b3(0x1b6)](){[[S],[f],[_]]['forEach'](_0x3de745=>{const _0x4f6067=_0x1a8d;this[_0x4f6067(0x1dd)]['add'](_0x3de745);});}[_0x4be5b3(0x19c)](){const _0x3cbe5d=_0x4be5b3;this[_0x3cbe5d(0x1dd)][_0x3cbe5d(0x1ad)](f),this[_0x3cbe5d(0x1dd)][_0x3cbe5d(0x1ad)](_);}};function _0x34cc(){const _0x181439=['forEach','rangeType','post','updateComment','COMMENT','Solve','payload','424884abwKZI','body','Unknown','/universer-api/user/list','UNRECOGNIZED','disposeWithMe','2NDMHQz','rangeId','commentUpdate$','type','values','_configService','Reply','Delete','resolveComment','symbol','users','map','_initDataSource','slice','getMemberID','onReady','/add','_threadCommentDataSourceService','_sessionService','getOwnPropertyDescriptor','requireSession','solved','getComment','152199xNsJNo','780411paobWA','/universer-api/comment/unit/','_userService','dataSource','1362546scPgnO','_init','setConfig','resolved','get','threadId','80460nItmkz','replies','comments','Edit','saveCommentToSnapshot','parse','root','onStarting','YYYY/MM/DD\x20HH:mm','defineProperty','4prQdaz','407VIOWdl','find','1602055YdMvBH','filter','/delete','add','UNIVER_UNKNOWN','user','/list','stringify','createTimestamp','listComments','Solved','50IHpiUi','728872gnzMxY','_threadCommentModel','subscribe','replyId','/solved','parentId','error','_threadCommentDataSource','content','getUnit','ref','OpenOrReOpen','length','unitId','14ZCiQWC','_httpService','Add','addUser','_initUserSync','syncUpdateMutationToColla','userId','_injector','pipe','deleteComment','_config','code','format'];_0x34cc=function(){return _0x181439;};return _0x34cc();}$(g,'pluginName',W),$(g,'type',_0x471339[_0x4be5b3(0x1c0)]),g=ie([_0x41b532(_0x2b0062,_0x632fbe,_0x4dad28),N(0x1,_0x33e49e(_0x36e64b)),N(0x2,_0x707352)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x3bda(_0x1f4b9c,_0x4d4933){const _0xbbe09d=_0xbbe0();return _0x3bda=function(_0x3bda6d,_0xd95ae0){_0x3bda6d=_0x3bda6d-0x86;let _0x1ac592=_0xbbe09d[_0x3bda6d];return _0x1ac592;},_0x3bda(_0x1f4b9c,_0x4d4933);}(function(_0x232ea9,_0x1f3334){const _0x187027=_0x3bda,_0x253d5e=_0x232ea9();while(!![]){try{const _0xb566fd=parseInt(_0x187027(0x105))/0x1*(-parseInt(_0x187027(0x10a))/0x2)+parseInt(_0x187027(0x102))/0x3+parseInt(_0x187027(0xaa))/0x4+-parseInt(_0x187027(0x90))/0x5+parseInt(_0x187027(0xbf))/0x6+-parseInt(_0x187027(0x107))/0x7+parseInt(_0x187027(0xd7))/0x8*(parseInt(_0x187027(0xeb))/0x9);if(_0xb566fd===_0x1f3334)break;else _0x253d5e['push'](_0x253d5e['shift']());}catch(_0x161e1d){_0x253d5e['push'](_0x253d5e['shift']());}}}(_0xbbe0,0x8d5c7),function(_0x514d10,_0x41c46b){const _0x47e924=_0x3bda;typeof exports==_0x47e924(0xae)&&typeof module<'u'?_0x41c46b(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x47e924(0xd4)&&define['amd']?define([_0x47e924(0xa4),_0x47e924(0xaf),'@univerjs-pro/license',_0x47e924(0xb9),_0x47e924(0x97),_0x47e924(0xff),_0x47e924(0x109),_0x47e924(0x88)],_0x41c46b):(_0x514d10=typeof globalThis<'u'?globalThis:_0x514d10||self,_0x41c46b(_0x514d10[_0x47e924(0xf4)]={},_0x514d10['UniverProCollaborationClient'],_0x514d10[_0x47e924(0xbb)],_0x514d10[_0x47e924(0x94)],_0x514d10[_0x47e924(0xa5)],_0x514d10['UniverThreadComment'],_0x514d10[_0x47e924(0x109)],_0x514d10[_0x47e924(0x101)]));}(this,function(_0x450926,_0xcd18a1,_0x117662,_0x5d1429,_0x204bdc,_0x4ed01c,_0x720727,_0x47a8d6){'use strict';const _0x2f1ae2=_0x3bda;const _0x12413d='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x37cba8=(_0x449b5c=>(_0x449b5c[_0x449b5c[_0x2f1ae2(0xcf)]=0x0]=_0x2f1ae2(0xcf),_0x449b5c[_0x449b5c[_0x2f1ae2(0xd8)]=0x1]='Solved',_0x449b5c[_0x449b5c['UNRECOGNIZED']=-0x1]=_0x2f1ae2(0xfe),_0x449b5c))(_0x37cba8||{}),_0x2b5700=(_0xd4b4bc=>(_0xd4b4bc[_0xd4b4bc[_0x2f1ae2(0xfc)]=0x0]=_0x2f1ae2(0xfc),_0xd4b4bc[_0xd4b4bc[_0x2f1ae2(0xd3)]=0x1]=_0x2f1ae2(0xd3),_0xd4b4bc[_0xd4b4bc[_0x2f1ae2(0xab)]=0x2]=_0x2f1ae2(0xab),_0xd4b4bc[_0xd4b4bc['Edit']=0x3]=_0x2f1ae2(0x9b),_0xd4b4bc[_0xd4b4bc['Delete']=0x4]=_0x2f1ae2(0x8b),_0xd4b4bc[_0xd4b4bc['Solve']=0x5]='Solve',_0xd4b4bc[_0xd4b4bc[_0x2f1ae2(0xfe)]=-0x1]='UNRECOGNIZED',_0xd4b4bc))(_0x2b5700||{});const _0x2e50e9=_0x478a54=>_0x5d1429[_0x2f1ae2(0x96)](new Date(+_0x478a54))[_0x2f1ae2(0xde)](_0x2f1ae2(0x89)),_0x2bf517=async(_0x513c5f,_0x117d11)=>{const _0x2bde99=_0x2f1ae2,_0x3eeb8a=_0x513c5f['get'](_0x5d1429[_0x2bde99(0xc2)]),_0x5d3e53=_0x513c5f['get'](_0x47a8d6[_0x2bde99(0xb7)]);_0x117d11['forEach'](_0x26e727=>{const _0x4ee7d9=_0x2bde99;_0x3eeb8a[_0x4ee7d9(0xf0)](_0x26e727)&&_0x117d11['delete'](_0x26e727);}),_0x117d11[_0x2bde99(0xc8)]&&(await _0x5d3e53[_0x2bde99(0xd2)](_0x2bde99(0xb1),{'params':{'userIDs':[..._0x117d11]}}))[_0x2bde99(0xc1)][_0x2bde99(0xa3)][_0x2bde99(0x8a)](_0x4ac3ed=>{_0x4ac3ed&&_0x3eeb8a['addUser'](_0x4ac3ed);});};var _0x475384=Object['getOwnPropertyDescriptor'],_0x200f85=(_0x5e102d,_0x377f31,_0x1ead54,_0x39d095)=>{const _0x28abad=_0x2f1ae2;for(var _0x1ff3de=_0x39d095>0x1?void 0x0:_0x39d095?_0x475384(_0x377f31,_0x1ead54):_0x377f31,_0x521e37=_0x5e102d[_0x28abad(0xf6)]-0x1,_0x4b049b;_0x521e37>=0x0;_0x521e37--)(_0x4b049b=_0x5e102d[_0x521e37])&&(_0x1ff3de=_0x4b049b(_0x1ff3de)||_0x1ff3de);return _0x1ff3de;},_0x256868=(_0x189df8,_0x271622)=>(_0x1429c0,_0x36f871)=>_0x271622(_0x1429c0,_0x36f871,_0x189df8);let _0x11972=class extends _0x5d1429[_0x2f1ae2(0xb2)]{constructor(_0x2b9df1,_0xa0e33d,_0x891fde,_0x59ecd7){const _0x151fee=_0x2f1ae2;super(),this['_commentService']=_0x2b9df1,this['_threadCommentModel']=_0xa0e33d,this[_0x151fee(0xa1)]=_0x891fde,this[_0x151fee(0xee)]=_0x59ecd7,this[_0x151fee(0x103)](),this[_0x151fee(0xb0)]();}['_initUserSync'](){const _0x1ed2d6=_0x2f1ae2;this[_0x1ed2d6(0x8d)](this['_threadCommentModel'][_0x1ed2d6(0xcc)][_0x1ed2d6(0xa9)](_0x720727['bufferTime'](0x10))[_0x1ed2d6(0xdf)](_0x3dd7da=>{const _0x36932a=_0x1ed2d6,_0x28b9ae=new Set();_0x3dd7da[_0x36932a(0x8a)](_0x36a546=>{const _0x16dfc8=_0x36932a;switch(_0x36a546[_0x16dfc8(0xf3)]){case'add':{const _0x37b5f7=_0x36a546[_0x16dfc8(0xf9)][_0x16dfc8(0xe2)];_0x28b9ae[_0x16dfc8(0xb8)](_0x37b5f7);break;}}}),_0x2bf517(this[_0x36932a(0xee)],_0x28b9ae);}));}[_0x2f1ae2(0x103)](){const _0x2b4f29=_0x2f1ae2;this['disposeWithMe'](this[_0x2b4f29(0x95)][_0x2b4f29(0xcc)][_0x2b4f29(0xdf)](async _0x394082=>{const _0x3a8ae0=_0x2b4f29;var _0x17adae,_0x4e7327,_0x5df5d8,_0x4fee2d;const _0x476e7b=(_0x17adae=this['_threadCommentModel']['getUnit'](_0x394082[_0x3a8ae0(0xf2)])[_0x3a8ae0(0x8c)](_0xb966d7=>_0xb966d7['threadId']===_0x394082['threadId']))==null?void 0x0:_0x17adae['root'];if(!_0x476e7b)return;const {unitId:_0x32ffe8,subUnitId:_0x1dd871}=_0x476e7b;switch(_0x394082['user']&&this[_0x3a8ae0(0xa1)][_0x3a8ae0(0xec)](_0x394082[_0x3a8ae0(0xe0)]),_0x394082['type']){case _0x2b5700[_0x3a8ae0(0xd3)]:break;case _0x2b5700[_0x3a8ae0(0xab)]:{this['_threadCommentModel']['addComment'](_0x32ffe8,_0x1dd871,{'unitId':_0x32ffe8,'subUnitId':_0x1dd871,'ref':'','id':_0x394082[_0x3a8ae0(0xe5)],'dT':_0x2e50e9(+_0x394082[_0x3a8ae0(0x106)]),'threadId':_0x394082['threadId'],'personId':(_0x5df5d8=(_0x4e7327=_0x394082[_0x3a8ae0(0xe0)])==null?void 0x0:_0x4e7327[_0x3a8ae0(0x108)])!=null?_0x5df5d8:_0x394082[_0x3a8ae0(0xe3)],'text':JSON[_0x3a8ae0(0xea)](_0x394082['content']),'parentId':_0x476e7b['id']});break;}case _0x2b5700[_0x3a8ae0(0x8b)]:{const _0x3155af=this[_0x3a8ae0(0xc7)]['getComment'](_0x32ffe8,_0x1dd871,_0x394082[_0x3a8ae0(0xe5)]);_0x3155af&&_0x3155af[_0x3a8ae0(0xb6)]&&this[_0x3a8ae0(0xc7)]['deleteComment'](_0x32ffe8,_0x1dd871,_0x394082[_0x3a8ae0(0xe5)]);break;}case _0x2b5700[_0x3a8ae0(0x9b)]:{this[_0x3a8ae0(0xc7)][_0x3a8ae0(0xcb)](_0x32ffe8,_0x1dd871,{'commentId':_0x394082['replyId'],'text':JSON[_0x3a8ae0(0xea)](_0x394082['content'])});break;}case _0x2b5700[_0x3a8ae0(0xba)]:{const _0x18f43e=(_0x4fee2d=this[_0x3a8ae0(0xc7)][_0x3a8ae0(0x87)](_0x394082[_0x3a8ae0(0xf2)])[_0x3a8ae0(0x8c)](_0x2e1ef1=>_0x2e1ef1['threadId']===_0x394082[_0x3a8ae0(0x98)]))==null?void 0x0:_0x4fee2d[_0x3a8ae0(0x9f)];_0x18f43e&&this[_0x3a8ae0(0xc7)][_0x3a8ae0(0xda)](_0x32ffe8,_0x1dd871,_0x18f43e['id'],_0x394082[_0x3a8ae0(0x9e)]===_0x37cba8[_0x3a8ae0(0xd8)]);break;}}}));}};_0x11972=_0x200f85([_0x256868(0x0,_0x5d1429['Inject'](_0xcd18a1['CommentService'])),_0x256868(0x1,_0x5d1429[_0x2f1ae2(0xca)](_0x4ed01c['ThreadCommentModel'])),_0x256868(0x2,_0x5d1429[_0x2f1ae2(0xca)](_0x5d1429[_0x2f1ae2(0xc2)])),_0x256868(0x3,_0x5d1429['Inject'](_0x5d1429[_0x2f1ae2(0xe7)]))],_0x11972);const _0x438073=_0x2f1ae2(0xa8),_0x476311={};var _0x43fa23=Object[_0x2f1ae2(0xd6)],_0x2d9ca7=(_0x36c88a,_0x365c32,_0x5af34b,_0x29e56d)=>{const _0x2b9de5=_0x2f1ae2;for(var _0x410083=_0x29e56d>0x1?void 0x0:_0x29e56d?_0x43fa23(_0x365c32,_0x5af34b):_0x365c32,_0x15500d=_0x36c88a[_0x2b9de5(0xf6)]-0x1,_0x30a387;_0x15500d>=0x0;_0x15500d--)(_0x30a387=_0x36c88a[_0x15500d])&&(_0x410083=_0x30a387(_0x410083)||_0x410083);return _0x410083;},_0x2f4617=(_0x48b2f9,_0x421569)=>(_0xb7bfb,_0x2416e6)=>_0x421569(_0xb7bfb,_0x2416e6,_0x48b2f9);function _0x1601e5(_0x4326cc,_0x1604a1){const _0x3c1236=_0x2f1ae2,_0x1ddb13=_0x4326cc['replies'][0x0];return{..._0x1604a1,'id':_0x1ddb13[_0x3c1236(0xe5)],'resolved':_0x4326cc[_0x3c1236(0x9e)]===0x1,'dT':_0x2e50e9(_0x1ddb13[_0x3c1236(0x106)]),'personId':_0x1ddb13['userId'],'threadId':_0x1ddb13['threadId']};}function _0x12ae86(_0x2ba24f,_0x3a398b,_0x444b52){const _0x44203e=_0x2f1ae2;var _0x39b3bc,_0x32ea41;if(((_0x32ea41=(_0x39b3bc=_0x2ba24f==null?void 0x0:_0x2ba24f[_0x44203e(0xbd)])==null?void 0x0:_0x39b3bc['length'])!=null?_0x32ea41:0x0)>0x0){const _0x12b4f5=(_0x16b121,_0x2ddead)=>({'id':_0x16b121['replyId'],'threadId':_0x16b121[_0x44203e(0x98)],'dT':_0x2e50e9(_0x16b121[_0x44203e(0x106)]),'personId':_0x16b121['userId'],'resolved':_0x2ba24f[_0x44203e(0x9e)]===_0x37cba8[_0x44203e(0xd8)],'unitId':_0x3a398b,'subUnitId':_0x444b52,'text':JSON['parse'](_0x16b121[_0x44203e(0xc3)]),'parentId':_0x2ddead}),_0x346f66=_0x12b4f5(_0x2ba24f[_0x44203e(0xbd)][0x0]);return{..._0x346f66,'children':_0x2ba24f[_0x44203e(0xbd)][_0x44203e(0xf8)](0x1)[_0x44203e(0xdd)](_0x5667d4=>_0x12b4f5(_0x5667d4,_0x346f66['id']))};}return null;}let _0x49299c=class{constructor(_0x55a1bb,_0x59d909,_0x9938a1){const _0x5454cc=_0x2f1ae2;this[_0x5454cc(0x86)]=_0x55a1bb,this[_0x5454cc(0xa1)]=_0x59d909,this[_0x5454cc(0xbe)]=_0x9938a1;}async['addComment'](_0x23a30b){const _0x271b9d=_0x2f1ae2;var _0xce81b3,_0x57ba73;const {parentId:_0x29b591,unitId:_0xde2928,text:_0x500ff9,threadId:_0x49f1f3}=_0x23a30b,_0x3dfdd7=(_0x57ba73=(_0xce81b3=_0x500ff9[_0x271b9d(0xef)])==null?void 0x0:_0xce81b3[_0x271b9d(0xcd)](_0x2ab7ae=>_0x2ab7ae[_0x271b9d(0x9d)]===_0x5d1429[_0x271b9d(0xb5)][_0x271b9d(0xe1)])[_0x271b9d(0xdd)](_0x49894c=>_0x49894c['rangeId']))!=null?_0x57ba73:[],_0x226d31=JSON[_0x271b9d(0x8e)](_0x500ff9),_0x175a2d=(await this['_sessionService'][_0x271b9d(0xa2)](_0xde2928))['getMemberID']();if(_0x29b591){const _0x326464={'memberId':_0x175a2d,'unitId':_0xde2928,'content':_0x226d31,'mention':_0x3dfdd7,'threadId':_0x49f1f3},_0x2823da=(await this[_0x271b9d(0x86)][_0x271b9d(0xd5)]('/universer-api/comment/unit/'+_0xde2928+_0x271b9d(0xc0),{'body':_0x326464}))['body']['reply'];return{..._0x23a30b,'id':_0x2823da[_0x271b9d(0xe5)],'dT':_0x5d1429['dayjs'](+_0x2823da[_0x271b9d(0x106)])[_0x271b9d(0xde)](_0x271b9d(0x89)),'personId':_0x2823da[_0x271b9d(0xe3)]};}else{const _0xbd94e1={'memberId':_0x175a2d,'unitId':_0xde2928,'content':_0x226d31,'mention':_0x3dfdd7},_0x32c168=await this['_httpService'][_0x271b9d(0xd5)]('/universer-api/comment/unit/'+_0xde2928+_0x271b9d(0xd1),{'body':_0xbd94e1});return _0x1601e5(_0x32c168[_0x271b9d(0xc1)]['comment'],_0x23a30b);}}async[_0x2f1ae2(0xcb)](_0x4dba57){const _0x5e792a=_0x2f1ae2;var _0x1dfdb6,_0x525b4d;const {text:_0x2e8819,unitId:_0x173c1e}=_0x4dba57,_0x3b3a1e=(_0x525b4d=(_0x1dfdb6=_0x2e8819['customRanges'])==null?void 0x0:_0x1dfdb6['filter'](_0x38f608=>_0x38f608[_0x5e792a(0x9d)]===_0x5d1429['CustomRangeType'][_0x5e792a(0xe1)])[_0x5e792a(0xdd)](_0xae4a5d=>_0xae4a5d[_0x5e792a(0xf1)]))!=null?_0x525b4d:[],_0x13294d=JSON[_0x5e792a(0x8e)](_0x2e8819),_0x5f5cdc=_0x4dba57[_0x5e792a(0x98)],_0xd0fbef=_0x4dba57['id'],_0x5d891e={'memberId':(await this[_0x5e792a(0xbe)][_0x5e792a(0xa2)](_0x173c1e))[_0x5e792a(0x91)](),'unitId':_0x173c1e,'threadId':_0x5f5cdc,'mention':_0x3b3a1e,'content':_0x13294d,'replyId':_0xd0fbef},_0x53a241=await this[_0x5e792a(0x86)][_0x5e792a(0xd5)](_0x5e792a(0xfd)+_0x173c1e+_0x5e792a(0xa0),{'body':_0x5d891e});return!_0x53a241[_0x5e792a(0xc1)][_0x5e792a(0xc5)]||_0x53a241[_0x5e792a(0xc1)][_0x5e792a(0xc5)][_0x5e792a(0xd0)]===0x1;}async[_0x2f1ae2(0xda)](_0x5efc61){const _0xdd6696=_0x2f1ae2,{unitId:_0x183eb4}=_0x5efc61,_0x459cb5=_0x5efc61['threadId'],_0x5655f8={'memberId':this[_0xdd6696(0xa1)][_0xdd6696(0xa7)]()['userID'],'unitId':_0x183eb4,'threadId':_0x459cb5,'solved':_0x5efc61[_0xdd6696(0xfb)]?_0x37cba8['Solved']:_0x37cba8[_0xdd6696(0xcf)]},_0x2c9245=await this[_0xdd6696(0x86)]['post'](_0xdd6696(0xfd)+_0x183eb4+_0xdd6696(0xbc),{'body':_0x5655f8});return!_0x2c9245['body']['error']||_0x2c9245[_0xdd6696(0xc1)][_0xdd6696(0xc5)][_0xdd6696(0xd0)]===0x1;}async[_0x2f1ae2(0xc4)](_0x3a5d92,_0x3a26e7,_0x558956,_0x2895c3){const _0x5d7f47=_0x2f1ae2,_0x20f6a3={'memberId':(await this['_sessionService'][_0x5d7f47(0xa2)](_0x3a5d92))[_0x5d7f47(0x91)](),'threadId':_0x558956,'replyId':_0x2895c3,'unitId':_0x3a5d92},_0x3c1a45=await this[_0x5d7f47(0x86)][_0x5d7f47(0xd5)]('/universer-api/comment/unit/'+_0x3a5d92+'/delete',{'body':_0x20f6a3});return!_0x3c1a45[_0x5d7f47(0xc1)][_0x5d7f47(0xc5)]||_0x3c1a45[_0x5d7f47(0xc1)][_0x5d7f47(0xc5)][_0x5d7f47(0xd0)]===0x1;}async[_0x2f1ae2(0xdb)](_0x252926,_0x5dba2e,_0x47b342){const _0x180d57=_0x2f1ae2,_0x52405e={'unitId':_0x252926,'threadId':_0x47b342},_0x427398=await this[_0x180d57(0x86)][_0x180d57(0xd5)](_0x180d57(0xfd)+_0x252926+_0x180d57(0xa6),{'body':_0x52405e}),_0x1eb320=_0x47b342[_0x180d57(0xdd)](_0x4c3653=>_0x12ae86(_0x427398[_0x180d57(0xc1)][_0x180d57(0x8f)][_0x4c3653],_0x252926,_0x5dba2e))[_0x180d57(0xcd)](Boolean);return Object['values'](_0x427398['body'][_0x180d57(0xa3)])['forEach'](_0x43d5de=>{const _0x544962=_0x180d57;this[_0x544962(0xa1)][_0x544962(0xec)](_0x43d5de);}),_0x1eb320;}[_0x2f1ae2(0xe4)](_0x33bf69){const _0x333d75=_0x2f1ae2;return{'id':_0x33bf69['id'],'threadId':_0x33bf69[_0x333d75(0x98)],'ref':_0x33bf69[_0x333d75(0xe8)]};}};_0x49299c=_0x2d9ca7([_0x2f4617(0x0,_0x5d1429[_0x2f1ae2(0xca)](_0x47a8d6[_0x2f1ae2(0xb7)])),_0x2f4617(0x1,_0x5d1429[_0x2f1ae2(0xca)](_0x5d1429[_0x2f1ae2(0xc2)])),_0x2f4617(0x2,_0x5d1429[_0x2f1ae2(0xca)](_0xcd18a1[_0x2f1ae2(0xc6)]))],_0x49299c);var _0x265d4e=Object[_0x2f1ae2(0xd6)],_0x3c5648=(_0x52506f,_0x5041aa,_0xf3f0b7,_0xdd09da)=>{const _0x2885ba=_0x2f1ae2;for(var _0x54fe59=_0xdd09da>0x1?void 0x0:_0xdd09da?_0x265d4e(_0x5041aa,_0xf3f0b7):_0x5041aa,_0x17abe1=_0x52506f[_0x2885ba(0xf6)]-0x1,_0xe28b09;_0x17abe1>=0x0;_0x17abe1--)(_0xe28b09=_0x52506f[_0x17abe1])&&(_0x54fe59=_0xe28b09(_0x54fe59)||_0x54fe59);return _0x54fe59;},_0x1b6664=(_0x28bd14,_0x58027c)=>(_0x52383c,_0x359673)=>_0x58027c(_0x52383c,_0x359673,_0x28bd14);let _0x537e51=class extends _0x5d1429['Disposable']{constructor(_0x7352e6,_0xacdada){const _0x42fa08=_0x2f1ae2;super(),this[_0x42fa08(0x9c)]=_0x7352e6,this[_0x42fa08(0xd9)]=_0xacdada,this[_0x42fa08(0xce)]();}[_0x2f1ae2(0xce)](){const _0x1b1b23=_0x2f1ae2;this[_0x1b1b23(0x9c)][_0x1b1b23(0x92)]=this[_0x1b1b23(0xd9)],this[_0x1b1b23(0x9c)][_0x1b1b23(0x99)]=!0x1;}};_0x537e51=_0x3c5648([_0x1b6664(0x0,_0x4ed01c[_0x2f1ae2(0xb3)]),_0x1b6664(0x1,_0x5d1429['Inject'](_0x49299c))],_0x537e51);var _0x133c27=Object[_0x2f1ae2(0xdc)],_0x5421f9=Object[_0x2f1ae2(0xd6)],_0x31bb98=(_0xb35bd5,_0x12f1a7,_0x8399ee)=>_0x12f1a7 in _0xb35bd5?_0x133c27(_0xb35bd5,_0x12f1a7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x8399ee}):_0xb35bd5[_0x12f1a7]=_0x8399ee,_0x25ba04=(_0x3f5ddf,_0x44b035,_0x46d47a,_0x15f412)=>{for(var _0xf83149=_0x15f412>0x1?void 0x0:_0x15f412?_0x5421f9(_0x44b035,_0x46d47a):_0x44b035,_0x30b343=_0x3f5ddf['length']-0x1,_0x327659;_0x30b343>=0x0;_0x30b343--)(_0x327659=_0x3f5ddf[_0x30b343])&&(_0xf83149=_0x327659(_0xf83149)||_0xf83149);return _0xf83149;},_0x1440ac=(_0x348edd,_0x337d9b)=>(_0x1c33e5,_0x26452a)=>_0x337d9b(_0x1c33e5,_0x26452a,_0x348edd),_0x46c92f=(_0x34335b,_0xd47703,_0x487880)=>_0x31bb98(_0x34335b,typeof _0xd47703!=_0x2f1ae2(0x100)?_0xd47703+'':_0xd47703,_0x487880);_0x450926[_0x2f1ae2(0xad)]=class extends _0x5d1429[_0x2f1ae2(0xfa)]{constructor(_0x1a0b40=_0x476311,_0x528004,_0x86a858){const _0x4dbd39=_0x2f1ae2;super(),this['_config']=_0x1a0b40,this[_0x4dbd39(0xee)]=_0x528004,this[_0x4dbd39(0xf7)]=_0x86a858;const {..._0x57f1f9}=_0x5d1429['merge']({},_0x476311,this[_0x4dbd39(0xc9)]);this[_0x4dbd39(0xf7)]['setConfig'](_0x438073,_0x57f1f9);}[_0x2f1ae2(0xac)](){const _0xd8e515=_0x2f1ae2;[[_0x49299c],[_0x537e51],[_0x11972]][_0xd8e515(0x8a)](_0x515bb8=>{this['_injector']['add'](_0x515bb8);});}['onReady'](){const _0x54ab27=_0x2f1ae2;this[_0x54ab27(0xee)][_0x54ab27(0xd2)](_0x537e51),this['_injector'][_0x54ab27(0xd2)](_0x11972);}},_0x46c92f(_0x450926['UniverThreadCommentDataSourcePlugin'],_0x2f1ae2(0xed),_0x12413d),_0x46c92f(_0x450926['UniverThreadCommentDataSourcePlugin'],'type',_0x5d1429[_0x2f1ae2(0xb4)]['UNIVER_UNKNOWN']),_0x450926[_0x2f1ae2(0xad)]=_0x25ba04([_0x5d1429[_0x2f1ae2(0xe6)](_0x204bdc[_0x2f1ae2(0xf5)],_0xcd18a1[_0x2f1ae2(0x104)],_0x117662['UniverLicensePlugin']),_0x1440ac(0x1,_0x5d1429[_0x2f1ae2(0xca)](_0x5d1429['Injector'])),_0x1440ac(0x2,_0x5d1429[_0x2f1ae2(0xe9)])],_0x450926[_0x2f1ae2(0xad)]),Object[_0x2f1ae2(0xdc)](_0x450926,Symbol[_0x2f1ae2(0x93)],{'value':_0x2f1ae2(0x9a)});}));function _0xbbe0(){const _0x29c1a4=['size','_config','Inject','updateComment','commentUpdate$','filter','_initDataSource','OpenOrReOpen','code','/add','get','Add','function','post','getOwnPropertyDescriptor','25150632sBpaju','Solved','_threadCommentDataSource','resolveComment','listComments','defineProperty','map','format','subscribe','user','COMMENT','personId','userId','saveCommentToSnapshot','replyId','DependentOn','Injector','ref','IConfigService','parse','9RXcGjv','addUser','pluginName','_injector','customRanges','getUser','rangeId','unitId','type','UniverProThreadCommentDatasource','UniverThreadCommentUIPlugin','length','_configService','slice','payload','Plugin','resolved','Unknown','/universer-api/comment/unit/','UNRECOGNIZED','@univerjs/thread-comment','symbol','UniverNetwork','193818OgzSAk','_init','UniverCollaborationClientPlugin','817951seMovm','createTimestamp','7195727uXyqNi','userID','rxjs','2PGDSiE','_httpService','getUnit','@univerjs/network','YYYY/MM/DD\x20HH:mm','forEach','Delete','find','disposeWithMe','stringify','comments','5012735YtSRvB','getMemberID','dataSource','toStringTag','UniverCore','_commentService','dayjs','@univerjs/thread-comment-ui','threadId','syncUpdateMutationToColla','Module','Edit','_threadCommentDataSourceService','rangeType','solved','root','/edit','_userService','requireSession','users','exports','UniverThreadCommentUi','/list','getCurrentUser','thread-comment-data-source.config','pipe','542852lDCvJe','Reply','onStarting','UniverThreadCommentDataSourcePlugin','object','@univerjs-pro/collaboration-client','_initUserSync','/universer-api/user/list','Disposable','IThreadCommentDataSourceService','UniverInstanceType','CustomRangeType','parentId','HTTPService','add','@univerjs/core','Solve','UniverProLicense','/solved','replies','_sessionService','499956gQsCxS','/reply','body','UserManagerService','content','deleteComment','error','CollaborationSessionService','_threadCommentModel'];_0xbbe0=function(){return _0x29c1a4;};return _0xbbe0();}
|
|
1
|
+
function _0x3c2c(_0x71f4d1,_0x2fa892){const _0x25ccfe=_0x25cc();return _0x3c2c=function(_0x3c2c9f,_0x4b5b72){_0x3c2c9f=_0x3c2c9f-0x105;let _0x1dac27=_0x25ccfe[_0x3c2c9f];return _0x1dac27;},_0x3c2c(_0x71f4d1,_0x2fa892);}function _0x25cc(){const _0x2f37a7=['Solved','replies','pipe','Plugin','_threadCommentDataSource','content','_configService','_initDataSource','Injector','Solve','values','addUser','_initUserSync','format','personId','getUser','map','userID','_commentService','@univerjs/thread-comment-ui','users','Edit','Unknown','239676UCsgbb','subscribe','707368faDQNI','UniverThreadCommentDataSourcePlugin','505855PqrsmM','onStarting','post','Inject','UserManagerService','/list','add','ThreadCommentModel','user','body','comment','@univerjs-pro/collaboration-client','unitId','defineProperty','_injector','COMMENT','rangeType','createTimestamp','customRanges','type','YYYY/MM/DD\x20HH:mm','UniverProCollaborationClient','UniverThreadCommentUIPlugin','disposeWithMe','getUnit','1990HJvZua','/universer-api/user/list','dataSource','_httpService','setConfig','1161CXRCnq','_init','3KlRFXE','UNIVER_UNKNOWN','merge','DependentOn','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/add','forEach','Delete','code','deleteComment','IConfigService','threadId','HTTPService','symbol','_config','filter','solved','Reply','replyId','_threadCommentDataSourceService','userId','UNRECOGNIZED','exports','thread-comment-data-source.config','addComment','UniverInstanceType','rangeId','updateComment','comments','3080NcbFGg','Module','OpenOrReOpen','listComments','bufferTime','root','resolved','function','get','size','commentUpdate$','dayjs','CustomRangeType','CollaborationSessionService','find','saveCommentToSnapshot','UniverCore','rxjs','getMemberID','CommentService','@univerjs/core','_threadCommentModel','parse','244040tywNZs','length','syncUpdateMutationToColla','@univerjs-pro/license','_userService','object','resolveComment','Add','252585LSNXPQ','15016SwwdmL','reply','error','parentId','pluginName','IThreadCommentDataSourceService','Disposable','toStringTag','/universer-api/comment/unit/','UniverCollaborationClientPlugin','getOwnPropertyDescriptor','@univerjs/thread-comment','stringify','_sessionService','requireSession'];_0x25cc=function(){return _0x2f37a7;};return _0x25cc();}(function(_0xb69422,_0x54918b){const _0x35f487=_0x3c2c,_0x17716d=_0xb69422();while(!![]){try{const _0x34c497=parseInt(_0x35f487(0x125))/0x1+parseInt(_0x35f487(0x14e))/0x2*(parseInt(_0x35f487(0x170))/0x3)+-parseInt(_0x35f487(0x106))/0x4*(parseInt(_0x35f487(0x169))/0x5)+parseInt(_0x35f487(0x14c))/0x6+parseInt(_0x35f487(0x150))/0x7+parseInt(_0x35f487(0x126))/0x8*(-parseInt(_0x35f487(0x16e))/0x9)+parseInt(_0x35f487(0x11d))/0xa;if(_0x34c497===_0x54918b)break;else _0x17716d['push'](_0x17716d['shift']());}catch(_0xe1d1b3){_0x17716d['push'](_0x17716d['shift']());}}}(_0x25cc,0x2f6f3),function(_0x1fa467,_0x3303a8){const _0x11cbe9=_0x3c2c;typeof exports==_0x11cbe9(0x122)&&typeof module<'u'?_0x3303a8(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x11cbe9(0x10d)&&define['amd']?define([_0x11cbe9(0x187),_0x11cbe9(0x15b),_0x11cbe9(0x120),_0x11cbe9(0x11a),_0x11cbe9(0x148),_0x11cbe9(0x131),_0x11cbe9(0x117),'@univerjs/network'],_0x3303a8):(_0x1fa467=typeof globalThis<'u'?globalThis:_0x1fa467||self,_0x3303a8(_0x1fa467['UniverProThreadCommentDatasource']={},_0x1fa467[_0x11cbe9(0x165)],_0x1fa467['UniverProLicense'],_0x1fa467[_0x11cbe9(0x116)],_0x1fa467['UniverThreadCommentUi'],_0x1fa467['UniverThreadComment'],_0x1fa467[_0x11cbe9(0x117)],_0x1fa467['UniverNetwork']));}(this,function(_0x161f50,_0x1242d5,_0x4a6e86,_0x39af91,_0x455f2b,_0x5e11d8,_0x3628e4,_0x354b38){'use strict';const _0x384348=_0x3c2c;const _0x5a0f87=_0x384348(0x175);var _0x21d08e=(_0x4e0f4e=>(_0x4e0f4e[_0x4e0f4e['OpenOrReOpen']=0x0]=_0x384348(0x108),_0x4e0f4e[_0x4e0f4e['Solved']=0x1]=_0x384348(0x135),_0x4e0f4e[_0x4e0f4e[_0x384348(0x186)]=-0x1]=_0x384348(0x186),_0x4e0f4e))(_0x21d08e||{}),_0x4a3d78=(_0x55cb72=>(_0x55cb72[_0x55cb72[_0x384348(0x14b)]=0x0]=_0x384348(0x14b),_0x55cb72[_0x55cb72[_0x384348(0x124)]=0x1]=_0x384348(0x124),_0x55cb72[_0x55cb72[_0x384348(0x182)]=0x2]=_0x384348(0x182),_0x55cb72[_0x55cb72[_0x384348(0x14a)]=0x3]='Edit',_0x55cb72[_0x55cb72[_0x384348(0x178)]=0x4]=_0x384348(0x178),_0x55cb72[_0x55cb72[_0x384348(0x13e)]=0x5]=_0x384348(0x13e),_0x55cb72[_0x55cb72[_0x384348(0x186)]=-0x1]='UNRECOGNIZED',_0x55cb72))(_0x4a3d78||{});const _0xa62a0=_0x1d468b=>_0x39af91[_0x384348(0x111)](new Date(+_0x1d468b))[_0x384348(0x142)](_0x384348(0x164)),_0x3f6095=async(_0x1c6f8c,_0x30f122)=>{const _0x5b17ca=_0x384348,_0x5c8138=_0x1c6f8c[_0x5b17ca(0x10e)](_0x39af91[_0x5b17ca(0x154)]),_0x45c522=_0x1c6f8c[_0x5b17ca(0x10e)](_0x354b38[_0x5b17ca(0x17d)]);_0x30f122['forEach'](_0xe38da7=>{const _0x4ea8a3=_0x5b17ca;_0x5c8138[_0x4ea8a3(0x144)](_0xe38da7)&&_0x30f122['delete'](_0xe38da7);}),_0x30f122[_0x5b17ca(0x10f)]&&(await _0x45c522[_0x5b17ca(0x10e)](_0x5b17ca(0x16a),{'params':{'userIDs':[..._0x30f122]}}))[_0x5b17ca(0x159)][_0x5b17ca(0x149)][_0x5b17ca(0x177)](_0x3f369a=>{const _0x43bd88=_0x5b17ca;_0x3f369a&&_0x5c8138[_0x43bd88(0x140)](_0x3f369a);});};var _0x2a9aeb=Object[_0x384348(0x130)],_0x3c9071=(_0x3be7ca,_0x13d78b,_0x54527b,_0x5d342e)=>{const _0x92e4a6=_0x384348;for(var _0x2f4396=_0x5d342e>0x1?void 0x0:_0x5d342e?_0x2a9aeb(_0x13d78b,_0x54527b):_0x13d78b,_0x49981d=_0x3be7ca[_0x92e4a6(0x11e)]-0x1,_0x41f1ca;_0x49981d>=0x0;_0x49981d--)(_0x41f1ca=_0x3be7ca[_0x49981d])&&(_0x2f4396=_0x41f1ca(_0x2f4396)||_0x2f4396);return _0x2f4396;},_0x3afb11=(_0x44abf1,_0x5f3a2b)=>(_0x3674d9,_0x23a906)=>_0x5f3a2b(_0x3674d9,_0x23a906,_0x44abf1);let _0x3343e8=class extends _0x39af91[_0x384348(0x12c)]{constructor(_0x26b86a,_0x24f56d,_0x4f59eb,_0x4f89b1){const _0x160372=_0x384348;super(),this[_0x160372(0x147)]=_0x26b86a,this['_threadCommentModel']=_0x24f56d,this[_0x160372(0x121)]=_0x4f59eb,this['_injector']=_0x4f89b1,this['_init'](),this[_0x160372(0x141)]();}[_0x384348(0x141)](){const _0x1f6487=_0x384348;this[_0x1f6487(0x167)](this[_0x1f6487(0x11b)]['commentUpdate$'][_0x1f6487(0x137)](_0x3628e4[_0x1f6487(0x10a)](0x10))['subscribe'](_0xc7631c=>{const _0x399a76=new Set();_0xc7631c['forEach'](_0x520d0a=>{const _0x317b3a=_0x3c2c;switch(_0x520d0a[_0x317b3a(0x163)]){case _0x317b3a(0x156):{const _0x553208=_0x520d0a['payload'][_0x317b3a(0x143)];_0x399a76['add'](_0x553208);break;}}}),_0x3f6095(this['_injector'],_0x399a76);}));}[_0x384348(0x16f)](){const _0x19c70e=_0x384348;this[_0x19c70e(0x167)](this[_0x19c70e(0x147)][_0x19c70e(0x110)][_0x19c70e(0x14d)](async _0x805b75=>{const _0x4ef1f3=_0x19c70e;var _0x4ee3c6,_0x352f56,_0x29ddb2,_0x5c063a;const _0x4325c7=(_0x4ee3c6=this[_0x4ef1f3(0x11b)]['getUnit'](_0x805b75[_0x4ef1f3(0x15c)])['find'](_0x57419d=>_0x57419d[_0x4ef1f3(0x17c)]===_0x805b75[_0x4ef1f3(0x17c)]))==null?void 0x0:_0x4ee3c6[_0x4ef1f3(0x10b)];if(!_0x4325c7)return;const {unitId:_0x60439a,subUnitId:_0x274aa7}=_0x4325c7;switch(_0x805b75['user']&&this['_userService'][_0x4ef1f3(0x140)](_0x805b75[_0x4ef1f3(0x158)]),_0x805b75[_0x4ef1f3(0x163)]){case _0x4a3d78['Add']:break;case _0x4a3d78[_0x4ef1f3(0x182)]:{this[_0x4ef1f3(0x11b)][_0x4ef1f3(0x189)](_0x60439a,_0x274aa7,{'unitId':_0x60439a,'subUnitId':_0x274aa7,'ref':'','id':_0x805b75[_0x4ef1f3(0x183)],'dT':_0xa62a0(+_0x805b75[_0x4ef1f3(0x161)]),'threadId':_0x805b75['threadId'],'personId':(_0x29ddb2=(_0x352f56=_0x805b75['user'])==null?void 0x0:_0x352f56[_0x4ef1f3(0x146)])!=null?_0x29ddb2:_0x805b75[_0x4ef1f3(0x185)],'text':JSON[_0x4ef1f3(0x11c)](_0x805b75[_0x4ef1f3(0x13a)]),'parentId':_0x4325c7['id']});break;}case _0x4a3d78[_0x4ef1f3(0x178)]:{const _0x4330a6=this[_0x4ef1f3(0x11b)]['getComment'](_0x60439a,_0x274aa7,_0x805b75[_0x4ef1f3(0x183)]);_0x4330a6&&_0x4330a6[_0x4ef1f3(0x129)]&&this['_threadCommentModel'][_0x4ef1f3(0x17a)](_0x60439a,_0x274aa7,_0x805b75[_0x4ef1f3(0x183)]);break;}case _0x4a3d78[_0x4ef1f3(0x14a)]:{this[_0x4ef1f3(0x11b)]['updateComment'](_0x60439a,_0x274aa7,{'commentId':_0x805b75[_0x4ef1f3(0x183)],'text':JSON[_0x4ef1f3(0x11c)](_0x805b75[_0x4ef1f3(0x13a)])});break;}case _0x4a3d78[_0x4ef1f3(0x13e)]:{const _0x333b7c=(_0x5c063a=this[_0x4ef1f3(0x11b)][_0x4ef1f3(0x168)](_0x805b75[_0x4ef1f3(0x15c)])[_0x4ef1f3(0x114)](_0x5ab56e=>_0x5ab56e[_0x4ef1f3(0x17c)]===_0x805b75['threadId']))==null?void 0x0:_0x5c063a[_0x4ef1f3(0x10b)];_0x333b7c&&this[_0x4ef1f3(0x11b)]['resolveComment'](_0x60439a,_0x274aa7,_0x333b7c['id'],_0x805b75['solved']===_0x21d08e['Solved']);break;}}}));}};_0x3343e8=_0x3c9071([_0x3afb11(0x0,_0x39af91[_0x384348(0x153)](_0x1242d5[_0x384348(0x119)])),_0x3afb11(0x1,_0x39af91[_0x384348(0x153)](_0x5e11d8[_0x384348(0x157)])),_0x3afb11(0x2,_0x39af91[_0x384348(0x153)](_0x39af91['UserManagerService'])),_0x3afb11(0x3,_0x39af91[_0x384348(0x153)](_0x39af91[_0x384348(0x13d)]))],_0x3343e8);const _0x44cd4a=_0x384348(0x188),_0x5ba9d9={};var _0x333a8c=Object[_0x384348(0x130)],_0x46b8eb=(_0x231822,_0x2b1b11,_0x5cec25,_0x13d96c)=>{const _0x2f9fab=_0x384348;for(var _0xacdd31=_0x13d96c>0x1?void 0x0:_0x13d96c?_0x333a8c(_0x2b1b11,_0x5cec25):_0x2b1b11,_0x436909=_0x231822[_0x2f9fab(0x11e)]-0x1,_0x426c38;_0x436909>=0x0;_0x436909--)(_0x426c38=_0x231822[_0x436909])&&(_0xacdd31=_0x426c38(_0xacdd31)||_0xacdd31);return _0xacdd31;},_0xd5f607=(_0x434c95,_0x4b3d59)=>(_0x1c06ac,_0x1e9b63)=>_0x4b3d59(_0x1c06ac,_0x1e9b63,_0x434c95);function _0xea3b6d(_0x12f6ea,_0x10cd3f){const _0x32fc73=_0x384348,_0x43ef50=_0x12f6ea['replies'][0x0];return{..._0x10cd3f,'id':_0x43ef50[_0x32fc73(0x183)],'resolved':_0x12f6ea[_0x32fc73(0x181)]===0x1,'dT':_0xa62a0(_0x43ef50[_0x32fc73(0x161)]),'personId':_0x43ef50[_0x32fc73(0x185)],'threadId':_0x43ef50[_0x32fc73(0x17c)]};}function _0x3739cb(_0x1be819,_0x46638e,_0x4df579){const _0x2425be=_0x384348;var _0x57f01f,_0x6b2fd5;if(((_0x6b2fd5=(_0x57f01f=_0x1be819==null?void 0x0:_0x1be819[_0x2425be(0x136)])==null?void 0x0:_0x57f01f[_0x2425be(0x11e)])!=null?_0x6b2fd5:0x0)>0x0){const _0x2d7671=(_0x3e0196,_0x3102d4)=>({'id':_0x3e0196[_0x2425be(0x183)],'threadId':_0x3e0196[_0x2425be(0x17c)],'dT':_0xa62a0(_0x3e0196['createTimestamp']),'personId':_0x3e0196[_0x2425be(0x185)],'resolved':_0x1be819['solved']===_0x21d08e[_0x2425be(0x135)],'unitId':_0x46638e,'subUnitId':_0x4df579,'text':JSON[_0x2425be(0x11c)](_0x3e0196[_0x2425be(0x13a)]),'parentId':_0x3102d4}),_0x16647d=_0x2d7671(_0x1be819[_0x2425be(0x136)][0x0]);return{..._0x16647d,'children':_0x1be819[_0x2425be(0x136)]['slice'](0x1)[_0x2425be(0x145)](_0x1b5b93=>_0x2d7671(_0x1b5b93,_0x16647d['id']))};}return null;}let _0x4ca94b=class{constructor(_0x3c6361,_0x36323e,_0x182488){const _0x1e0b18=_0x384348;this[_0x1e0b18(0x16c)]=_0x3c6361,this[_0x1e0b18(0x121)]=_0x36323e,this['_sessionService']=_0x182488;}async[_0x384348(0x189)](_0x2478de){const _0x3b91fb=_0x384348;var _0xb8b797,_0x5e4f22;const {parentId:_0x1607e8,unitId:_0x2fc99b,text:_0x49f327,threadId:_0x1f135a}=_0x2478de,_0xc3e1c8=(_0x5e4f22=(_0xb8b797=_0x49f327['customRanges'])==null?void 0x0:_0xb8b797[_0x3b91fb(0x180)](_0x498ec9=>_0x498ec9[_0x3b91fb(0x160)]===_0x39af91[_0x3b91fb(0x112)]['COMMENT'])[_0x3b91fb(0x145)](_0x2b38bf=>_0x2b38bf[_0x3b91fb(0x18b)]))!=null?_0x5e4f22:[],_0x208a3e=JSON['stringify'](_0x49f327),_0x1cf926=(await this['_sessionService'][_0x3b91fb(0x134)](_0x2fc99b))[_0x3b91fb(0x118)]();if(_0x1607e8){const _0x156cc8={'memberId':_0x1cf926,'unitId':_0x2fc99b,'content':_0x208a3e,'mention':_0xc3e1c8,'threadId':_0x1f135a},_0x33ed71=(await this[_0x3b91fb(0x16c)][_0x3b91fb(0x152)]('/universer-api/comment/unit/'+_0x2fc99b+'/reply',{'body':_0x156cc8}))['body'][_0x3b91fb(0x127)];return{..._0x2478de,'id':_0x33ed71[_0x3b91fb(0x183)],'dT':_0x39af91[_0x3b91fb(0x111)](+_0x33ed71[_0x3b91fb(0x161)])['format'](_0x3b91fb(0x164)),'personId':_0x33ed71[_0x3b91fb(0x185)]};}else{const _0x3768bc={'memberId':_0x1cf926,'unitId':_0x2fc99b,'content':_0x208a3e,'mention':_0xc3e1c8},_0x2234ff=await this[_0x3b91fb(0x16c)]['post'](_0x3b91fb(0x12e)+_0x2fc99b+_0x3b91fb(0x176),{'body':_0x3768bc});return _0xea3b6d(_0x2234ff[_0x3b91fb(0x159)][_0x3b91fb(0x15a)],_0x2478de);}}async[_0x384348(0x18c)](_0x5db7f7){const _0x509e77=_0x384348;var _0x4832c4,_0xa91757;const {text:_0x2ebc4e,unitId:_0x3a3066}=_0x5db7f7,_0x522cd4=(_0xa91757=(_0x4832c4=_0x2ebc4e[_0x509e77(0x162)])==null?void 0x0:_0x4832c4['filter'](_0x1d93e3=>_0x1d93e3[_0x509e77(0x160)]===_0x39af91[_0x509e77(0x112)][_0x509e77(0x15f)])['map'](_0x1ebaef=>_0x1ebaef[_0x509e77(0x18b)]))!=null?_0xa91757:[],_0x4fd1cf=JSON[_0x509e77(0x132)](_0x2ebc4e),_0x41cbf5=_0x5db7f7[_0x509e77(0x17c)],_0x4e83be=_0x5db7f7['id'],_0x25eb40={'memberId':(await this[_0x509e77(0x133)][_0x509e77(0x134)](_0x3a3066))[_0x509e77(0x118)](),'unitId':_0x3a3066,'threadId':_0x41cbf5,'mention':_0x522cd4,'content':_0x4fd1cf,'replyId':_0x4e83be},_0xe7efb7=await this[_0x509e77(0x16c)][_0x509e77(0x152)](_0x509e77(0x12e)+_0x3a3066+'/edit',{'body':_0x25eb40});return!_0xe7efb7[_0x509e77(0x159)][_0x509e77(0x128)]||_0xe7efb7['body'][_0x509e77(0x128)][_0x509e77(0x179)]===0x1;}async[_0x384348(0x123)](_0x4d129a){const _0x28b8fa=_0x384348,{unitId:_0x3708f3}=_0x4d129a,_0x41e6c3=_0x4d129a['threadId'],_0xd2c30d={'memberId':this['_userService']['getCurrentUser']()[_0x28b8fa(0x146)],'unitId':_0x3708f3,'threadId':_0x41e6c3,'solved':_0x4d129a[_0x28b8fa(0x10c)]?_0x21d08e[_0x28b8fa(0x135)]:_0x21d08e[_0x28b8fa(0x108)]},_0x3546fd=await this['_httpService']['post'](_0x28b8fa(0x12e)+_0x3708f3+'/solved',{'body':_0xd2c30d});return!_0x3546fd[_0x28b8fa(0x159)]['error']||_0x3546fd['body'][_0x28b8fa(0x128)]['code']===0x1;}async['deleteComment'](_0x54ccdf,_0x460c99,_0xf1b217,_0x262804){const _0x4217b9=_0x384348,_0x17ec63={'memberId':(await this[_0x4217b9(0x133)][_0x4217b9(0x134)](_0x54ccdf))['getMemberID'](),'threadId':_0xf1b217,'replyId':_0x262804,'unitId':_0x54ccdf},_0x4b77d5=await this['_httpService'][_0x4217b9(0x152)](_0x4217b9(0x12e)+_0x54ccdf+'/delete',{'body':_0x17ec63});return!_0x4b77d5[_0x4217b9(0x159)]['error']||_0x4b77d5[_0x4217b9(0x159)][_0x4217b9(0x128)][_0x4217b9(0x179)]===0x1;}async[_0x384348(0x109)](_0x435548,_0x22e141,_0x2523b4){const _0x37afe9=_0x384348,_0x544672={'unitId':_0x435548,'threadId':_0x2523b4},_0x255734=await this['_httpService'][_0x37afe9(0x152)](_0x37afe9(0x12e)+_0x435548+_0x37afe9(0x155),{'body':_0x544672}),_0x15be87=_0x2523b4[_0x37afe9(0x145)](_0x430566=>_0x3739cb(_0x255734['body'][_0x37afe9(0x105)][_0x430566],_0x435548,_0x22e141))[_0x37afe9(0x180)](Boolean);return Object[_0x37afe9(0x13f)](_0x255734['body'][_0x37afe9(0x149)])['forEach'](_0x186432=>{const _0xfb1077=_0x37afe9;this[_0xfb1077(0x121)][_0xfb1077(0x140)](_0x186432);}),_0x15be87;}[_0x384348(0x115)](_0x399700){const _0x582bb7=_0x384348;return{'id':_0x399700['id'],'threadId':_0x399700[_0x582bb7(0x17c)],'ref':_0x399700['ref']};}};_0x4ca94b=_0x46b8eb([_0xd5f607(0x0,_0x39af91['Inject'](_0x354b38['HTTPService'])),_0xd5f607(0x1,_0x39af91['Inject'](_0x39af91[_0x384348(0x154)])),_0xd5f607(0x2,_0x39af91[_0x384348(0x153)](_0x1242d5[_0x384348(0x113)]))],_0x4ca94b);var _0x5e6ce9=Object[_0x384348(0x130)],_0x14a5c1=(_0x3e5217,_0x5d1b65,_0x378abb,_0xe3fc93)=>{for(var _0x3943b1=_0xe3fc93>0x1?void 0x0:_0xe3fc93?_0x5e6ce9(_0x5d1b65,_0x378abb):_0x5d1b65,_0x31a3a0=_0x3e5217['length']-0x1,_0x17dfc2;_0x31a3a0>=0x0;_0x31a3a0--)(_0x17dfc2=_0x3e5217[_0x31a3a0])&&(_0x3943b1=_0x17dfc2(_0x3943b1)||_0x3943b1);return _0x3943b1;},_0xd4edc4=(_0x1f214d,_0x18d1c3)=>(_0x27483d,_0x5f1713)=>_0x18d1c3(_0x27483d,_0x5f1713,_0x1f214d);let _0x29f2b0=class extends _0x39af91['Disposable']{constructor(_0x518319,_0x421f0a){const _0x33a074=_0x384348;super(),this[_0x33a074(0x184)]=_0x518319,this['_threadCommentDataSource']=_0x421f0a,this[_0x33a074(0x13c)]();}[_0x384348(0x13c)](){const _0x2b094f=_0x384348;this[_0x2b094f(0x184)][_0x2b094f(0x16b)]=this[_0x2b094f(0x139)],this[_0x2b094f(0x184)][_0x2b094f(0x11f)]=!0x1;}};_0x29f2b0=_0x14a5c1([_0xd4edc4(0x0,_0x5e11d8[_0x384348(0x12b)]),_0xd4edc4(0x1,_0x39af91['Inject'](_0x4ca94b))],_0x29f2b0);var _0x226f30=Object[_0x384348(0x15d)],_0x381ac8=Object['getOwnPropertyDescriptor'],_0x20ad3c=(_0x5266bc,_0x307969,_0xd6ef8c)=>_0x307969 in _0x5266bc?_0x226f30(_0x5266bc,_0x307969,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd6ef8c}):_0x5266bc[_0x307969]=_0xd6ef8c,_0x223086=(_0x2a4e8c,_0x545f64,_0x5bfa66,_0x2c2db9)=>{const _0x64ec14=_0x384348;for(var _0x43625c=_0x2c2db9>0x1?void 0x0:_0x2c2db9?_0x381ac8(_0x545f64,_0x5bfa66):_0x545f64,_0x144dcc=_0x2a4e8c[_0x64ec14(0x11e)]-0x1,_0x510657;_0x144dcc>=0x0;_0x144dcc--)(_0x510657=_0x2a4e8c[_0x144dcc])&&(_0x43625c=_0x510657(_0x43625c)||_0x43625c);return _0x43625c;},_0x2e1842=(_0x1c5876,_0x10249b)=>(_0x5c71d7,_0x2a155a)=>_0x10249b(_0x5c71d7,_0x2a155a,_0x1c5876),_0x24958b=(_0x42b372,_0x5dd9f6,_0xf4c8a0)=>_0x20ad3c(_0x42b372,typeof _0x5dd9f6!=_0x384348(0x17e)?_0x5dd9f6+'':_0x5dd9f6,_0xf4c8a0);_0x161f50[_0x384348(0x14f)]=class extends _0x39af91[_0x384348(0x138)]{constructor(_0x26631e=_0x5ba9d9,_0x3f3ae9,_0x3c307c){const _0x4cb81d=_0x384348;super(),this['_config']=_0x26631e,this[_0x4cb81d(0x15e)]=_0x3f3ae9,this['_configService']=_0x3c307c;const {..._0x12b38c}=_0x39af91[_0x4cb81d(0x172)]({},_0x5ba9d9,this[_0x4cb81d(0x17f)]);this[_0x4cb81d(0x13b)][_0x4cb81d(0x16d)](_0x44cd4a,_0x12b38c);}[_0x384348(0x151)](){const _0x534561=_0x384348;[[_0x4ca94b],[_0x29f2b0],[_0x3343e8]][_0x534561(0x177)](_0x62da98=>{this['_injector']['add'](_0x62da98);});}[_0x384348(0x174)](){const _0x5f473d=_0x384348;this['_injector'][_0x5f473d(0x10e)](_0x29f2b0),this[_0x5f473d(0x15e)]['get'](_0x3343e8);}},_0x24958b(_0x161f50[_0x384348(0x14f)],_0x384348(0x12a),_0x5a0f87),_0x24958b(_0x161f50['UniverThreadCommentDataSourcePlugin'],_0x384348(0x163),_0x39af91[_0x384348(0x18a)][_0x384348(0x171)]),_0x161f50[_0x384348(0x14f)]=_0x223086([_0x39af91[_0x384348(0x173)](_0x455f2b[_0x384348(0x166)],_0x1242d5[_0x384348(0x12f)],_0x4a6e86['UniverLicensePlugin']),_0x2e1842(0x1,_0x39af91[_0x384348(0x153)](_0x39af91[_0x384348(0x13d)])),_0x2e1842(0x2,_0x39af91[_0x384348(0x17b)])],_0x161f50[_0x384348(0x14f)]),Object['defineProperty'](_0x161f50,Symbol[_0x384348(0x12d)],{'value':_0x384348(0x107)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.5-nightly.202508290716",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,26 +45,26 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.10.
|
|
49
|
-
"@univerjs-pro/license": "0.10.
|
|
50
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.5-nightly.202508290716",
|
|
49
|
+
"@univerjs-pro/license": "0.10.5-nightly.202508290716",
|
|
50
|
+
"@univerjs/core": "0.10.5-nightly.202508290716",
|
|
51
|
+
"@univerjs/network": "0.10.5-nightly.202508290716",
|
|
51
52
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs/thread-comment": "0.10.
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.10.4"
|
|
53
|
+
"@univerjs/thread-comment": "0.10.5-nightly.202508290716",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.5-nightly.202508290716"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
|
-
"vite": "^7.
|
|
59
|
+
"vite": "^7.1.3",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.5"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|
|
65
65
|
"test:watch": "vitest",
|
|
66
66
|
"coverage": "vitest run --coverage",
|
|
67
|
-
"
|
|
67
|
+
"typecheck": "tsc --noEmit",
|
|
68
68
|
"build": "univer-cli build"
|
|
69
69
|
},
|
|
70
70
|
"module": "./lib/es/index.js"
|