@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20260106-79b11f9 → 0.15.0-insiders.20260107-3d1cfdf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x490bf3=_0x340a;function _0x340a(_0x483ae0,_0x1dd40c){_0x483ae0=_0x483ae0-0x131;const _0xfd9d8d=_0xfd9d();let _0x340a21=_0xfd9d8d[_0x483ae0];return _0x340a21;}(function(_0x256f54,_0x36c615){const _0x177f0d=_0x340a,_0x339d18=_0x256f54();while(!![]){try{const _0x4e7fee=parseInt(_0x177f0d(0x166))/0x1+parseInt(_0x177f0d(0x13e))/0x2*(-parseInt(_0x177f0d(0x150))/0x3)+-parseInt(_0x177f0d(0x182))/0x4+parseInt(_0x177f0d(0x18d))/0x5+-parseInt(_0x177f0d(0x153))/0x6+-parseInt(_0x177f0d(0x142))/0x7+-parseInt(_0x177f0d(0x17d))/0x8*(-parseInt(_0x177f0d(0x1a6))/0x9);if(_0x4e7fee===_0x36c615)break;else _0x339d18['push'](_0x339d18['shift']());}catch(_0x1effd7){_0x339d18['push'](_0x339d18['shift']());}}}(_0xfd9d,0xb47c8));Object[_0x490bf3(0x179)](exports,Symbol[_0x490bf3(0x140)],{'value':_0x490bf3(0x168)});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=_0x490bf3(0x136);var I=(_0x318737=>(_0x318737[_0x318737[_0x490bf3(0x16a)]=0x0]=_0x490bf3(0x16a),_0x318737[_0x318737[_0x490bf3(0x138)]=0x1]=_0x490bf3(0x138),_0x318737[_0x318737['UNRECOGNIZED']=-0x1]=_0x490bf3(0x13d),_0x318737))(I||{}),v=(_0x577594=>(_0x577594[_0x577594[_0x490bf3(0x169)]=0x0]=_0x490bf3(0x169),_0x577594[_0x577594[_0x490bf3(0x15e)]=0x1]='Add',_0x577594[_0x577594[_0x490bf3(0x13c)]=0x2]=_0x490bf3(0x13c),_0x577594[_0x577594[_0x490bf3(0x1a1)]=0x3]='Edit',_0x577594[_0x577594['Delete']=0x4]=_0x490bf3(0x18b),_0x577594[_0x577594['Solve']=0x5]='Solve',_0x577594[_0x577594['UNRECOGNIZED']=-0x1]=_0x490bf3(0x13d),_0x577594))(v||{});function _0xfd9d(){const _0x458331=['Inject','disposeWithMe','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','Solved','length','_threadCommentModel','post','Reply','UNRECOGNIZED','511148wVBHVm','Solve','toStringTag','thread-comment-data-source.config','21203XSfjga','replies','slice','_config','/edit','find','requireSession','values','resolveComment','COMMENT','content','resolved','body','customRanges','3BcPYEz','Injector','CollaborationSessionService','3945684kGzqjy','onStarting','filter','_initDataSource','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','commentUpdate$','error','user','createTimestamp','_httpService','Add','replyId','getUser','unitId','reply','_userService','comment','_injector','1058715MJENlw','get','Module','Unknown','OpenOrReOpen','add','getComment','dataSource','syncUpdateMutationToColla','CommentService','delete','DependentOn','ref','/list','getMemberID','UniverLicensePlugin','getUnit','userId','HTTPService','defineProperty','symbol','bufferTime','subscribe','7056072KXperW','UniverCollaborationClientPlugin','Disposable','/universer-api/user/list','_sessionService','5840396mqRTqi','ThreadCommentModel','payload','forEach','threadId','addUser','solved','_threadCommentDataSource','rangeId','Delete','users','5874320ejhsxM','UniverInstanceType','_threadCommentDataSourceService','personId','map','pluginName','code','format','addComment','pipe','type','_initUserSync','root','/universer-api/comment/unit/','/add','deleteComment','IConfigService','stringify','userID','merge','Edit','parse','UniverThreadCommentUIPlugin','getCurrentUser','_configService','9bTkOEu','UniverThreadCommentDataSourcePlugin','CustomRangeType','rangeType','/delete','getOwnPropertyDescriptor','_init','dayjs','onReady'];_0xfd9d=function(){return _0x458331;};return _0xfd9d();}const f=_0xa993d2=>c[_0x490bf3(0x131)](new Date(+_0xa993d2))[_0x490bf3(0x194)](_0x490bf3(0x158)),R=async(_0x23a129,_0x2a585a)=>{const _0x1e9b40=_0x490bf3,_0x495c5d=_0x23a129['get'](c['UserManagerService']),_0x283e82=_0x23a129['get'](P[_0x1e9b40(0x178)]);_0x2a585a[_0x1e9b40(0x185)](_0x4630d5=>{const _0x594da2=_0x1e9b40;_0x495c5d[_0x594da2(0x160)](_0x4630d5)&&_0x2a585a[_0x594da2(0x170)](_0x4630d5);}),_0x2a585a['size']&&(await _0x283e82[_0x1e9b40(0x167)](_0x1e9b40(0x180),{'params':{'userIDs':[..._0x2a585a]}}))[_0x1e9b40(0x14e)][_0x1e9b40(0x18c)][_0x1e9b40(0x185)](_0x33c13c=>{const _0x58369e=_0x1e9b40;_0x33c13c&&_0x495c5d[_0x58369e(0x187)](_0x33c13c);});};var $=Object[_0x490bf3(0x1ab)],E=(_0x34869a,_0x152c12,_0x3fcc0e,_0x2a826e)=>{const _0x226fbb=_0x490bf3;for(var _0x224121=_0x2a826e>0x1?void 0x0:_0x2a826e?$(_0x152c12,_0x3fcc0e):_0x152c12,_0x3da877=_0x34869a[_0x226fbb(0x139)]-0x1,_0x229124;_0x3da877>=0x0;_0x3da877--)(_0x229124=_0x34869a[_0x3da877])&&(_0x224121=_0x229124(_0x224121)||_0x224121);return _0x224121;},S=(_0x6cec02,_0x2fa9b1)=>(_0x1991db,_0x3ef992)=>_0x2fa9b1(_0x1991db,_0x3ef992,_0x6cec02);let _=class extends c[_0x490bf3(0x17f)]{constructor(_0x7a9083,_0x76f598,_0x27bfc3,_0x2bc52d){const _0x2a1681=_0x490bf3;super(),this[_0x2a1681(0x135)]=_0x7a9083,this['_threadCommentModel']=_0x76f598,this[_0x2a1681(0x163)]=_0x27bfc3,this[_0x2a1681(0x165)]=_0x2bc52d,this[_0x2a1681(0x1ac)](),this[_0x2a1681(0x198)]();}[_0x490bf3(0x198)](){const _0x2e71b8=_0x490bf3;this['disposeWithMe'](this[_0x2e71b8(0x13a)][_0x2e71b8(0x159)][_0x2e71b8(0x196)](j[_0x2e71b8(0x17b)](0x10))[_0x2e71b8(0x17c)](_0x59a7fc=>{const _0x5793ca=_0x2e71b8,_0x179c4c=new Set();_0x59a7fc['forEach'](_0xf2d7b7=>{const _0x1f97db=_0x340a;if(_0xf2d7b7[_0x1f97db(0x197)]===_0x1f97db(0x16b)){const _0xd91582=_0xf2d7b7[_0x1f97db(0x184)][_0x1f97db(0x190)];_0x179c4c['add'](_0xd91582);}}),R(this[_0x5793ca(0x165)],_0x179c4c);}));}['_init'](){const _0x46db6e=_0x490bf3;this[_0x46db6e(0x134)](this[_0x46db6e(0x135)][_0x46db6e(0x159)][_0x46db6e(0x17c)](async _0x2ecb69=>{const _0x3a3ec4=_0x46db6e;var _0x1a6a5c,_0x173f1a,_0x5e0f0d,_0x3fab7f;const _0x163aa4=(_0x1a6a5c=this[_0x3a3ec4(0x13a)]['getUnit'](_0x2ecb69[_0x3a3ec4(0x161)])[_0x3a3ec4(0x147)](_0x4baab6=>_0x4baab6[_0x3a3ec4(0x186)]===_0x2ecb69[_0x3a3ec4(0x186)]))==null?void 0x0:_0x1a6a5c[_0x3a3ec4(0x199)];if(!_0x163aa4)return;const {unitId:_0x5bf306,subUnitId:_0x18f5fe}=_0x163aa4;switch(_0x2ecb69[_0x3a3ec4(0x15b)]&&this[_0x3a3ec4(0x163)]['addUser'](_0x2ecb69['user']),_0x2ecb69[_0x3a3ec4(0x197)]){case v[_0x3a3ec4(0x15e)]:break;case v[_0x3a3ec4(0x13c)]:{this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x195)](_0x5bf306,_0x18f5fe,{'unitId':_0x5bf306,'subUnitId':_0x18f5fe,'ref':'','id':_0x2ecb69[_0x3a3ec4(0x15f)],'dT':f(+_0x2ecb69[_0x3a3ec4(0x15c)]),'threadId':_0x2ecb69['threadId'],'personId':(_0x5e0f0d=(_0x173f1a=_0x2ecb69[_0x3a3ec4(0x15b)])==null?void 0x0:_0x173f1a[_0x3a3ec4(0x19f)])!=null?_0x5e0f0d:_0x2ecb69[_0x3a3ec4(0x177)],'text':JSON[_0x3a3ec4(0x1a2)](_0x2ecb69[_0x3a3ec4(0x14c)]),'parentId':_0x163aa4['id']});break;}case v['Delete']:{const _0x73b6a9=this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x16c)](_0x5bf306,_0x18f5fe,_0x2ecb69['replyId']);_0x73b6a9&&_0x73b6a9['parentId']&&this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x19c)](_0x5bf306,_0x18f5fe,_0x2ecb69[_0x3a3ec4(0x15f)]);break;}case v[_0x3a3ec4(0x1a1)]:{this[_0x3a3ec4(0x13a)]['updateComment'](_0x5bf306,_0x18f5fe,{'commentId':_0x2ecb69[_0x3a3ec4(0x15f)],'text':JSON[_0x3a3ec4(0x1a2)](_0x2ecb69[_0x3a3ec4(0x14c)])});break;}case v[_0x3a3ec4(0x13f)]:{const _0x1b1103=(_0x3fab7f=this[_0x3a3ec4(0x13a)][_0x3a3ec4(0x176)](_0x2ecb69[_0x3a3ec4(0x161)])[_0x3a3ec4(0x147)](_0x415622=>_0x415622['threadId']===_0x2ecb69['threadId']))==null?void 0x0:_0x3fab7f[_0x3a3ec4(0x199)];_0x1b1103&&this['_threadCommentModel']['resolveComment'](_0x5bf306,_0x18f5fe,_0x1b1103['id'],_0x2ecb69['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x490bf3(0x133)](b[_0x490bf3(0x16f)])),S(0x1,c[_0x490bf3(0x133)](M[_0x490bf3(0x183)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x490bf3(0x133)](c[_0x490bf3(0x151)]))],_);const q=_0x490bf3(0x141),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x897f50,_0x316e8f,_0x2a53de,_0x5c9af9)=>{const _0x1c1a0b=_0x490bf3;for(var _0x45a3c6=_0x5c9af9>0x1?void 0x0:_0x5c9af9?A(_0x316e8f,_0x2a53de):_0x316e8f,_0x336113=_0x897f50[_0x1c1a0b(0x139)]-0x1,_0x1b20e7;_0x336113>=0x0;_0x336113--)(_0x1b20e7=_0x897f50[_0x336113])&&(_0x45a3c6=_0x1b20e7(_0x45a3c6)||_0x45a3c6);return _0x45a3c6;},C=(_0x26be76,_0x6c6374)=>(_0xc72fb5,_0x4dc27d)=>_0x6c6374(_0xc72fb5,_0x4dc27d,_0x26be76);function Y(_0x4cecdf,_0x316c4a){const _0x23f83f=_0x490bf3,_0x5cc2e9=_0x4cecdf['replies'][0x0];return{..._0x316c4a,'id':_0x5cc2e9[_0x23f83f(0x15f)],'resolved':_0x4cecdf[_0x23f83f(0x188)]===0x1,'dT':f(_0x5cc2e9[_0x23f83f(0x15c)]),'personId':_0x5cc2e9[_0x23f83f(0x177)],'threadId':_0x5cc2e9[_0x23f83f(0x186)]};}function G(_0x457cb1,_0x298fde,_0x6579f6){const _0x328a37=_0x490bf3;var _0xc9debc,_0x4c15d3;if(((_0x4c15d3=(_0xc9debc=_0x457cb1==null?void 0x0:_0x457cb1[_0x328a37(0x143)])==null?void 0x0:_0xc9debc[_0x328a37(0x139)])!=null?_0x4c15d3:0x0)>0x0){const _0x1095a9=(_0x3210e1,_0x2b293f)=>({'id':_0x3210e1['replyId'],'threadId':_0x3210e1[_0x328a37(0x186)],'dT':f(_0x3210e1[_0x328a37(0x15c)]),'personId':_0x3210e1[_0x328a37(0x177)],'resolved':_0x457cb1[_0x328a37(0x188)]===I['Solved'],'unitId':_0x298fde,'subUnitId':_0x6579f6,'text':JSON[_0x328a37(0x1a2)](_0x3210e1[_0x328a37(0x14c)]),'parentId':_0x2b293f}),_0x35c2b2=_0x1095a9(_0x457cb1[_0x328a37(0x143)][0x0]);return{..._0x35c2b2,'children':_0x457cb1['replies'][_0x328a37(0x144)](0x1)[_0x328a37(0x191)](_0x41d6fb=>_0x1095a9(_0x41d6fb,_0x35c2b2['id']))};}return null;}let p=class{constructor(_0x3a37db,_0x12cd94,_0x3bc7e4){const _0x4b3446=_0x490bf3;this[_0x4b3446(0x15d)]=_0x3a37db,this['_userService']=_0x12cd94,this[_0x4b3446(0x181)]=_0x3bc7e4;}async['addComment'](_0x5234df){const _0xbd8121=_0x490bf3;var _0x42620f,_0x23062d;const {parentId:_0x1e4ccf,unitId:_0x3c492e,text:_0x2ff610,threadId:_0x401e93}=_0x5234df,_0x2f080e=(_0x23062d=(_0x42620f=_0x2ff610[_0xbd8121(0x14f)])==null?void 0x0:_0x42620f[_0xbd8121(0x155)](_0x156a25=>_0x156a25['rangeType']===c[_0xbd8121(0x1a8)][_0xbd8121(0x14b)])[_0xbd8121(0x191)](_0x483abd=>_0x483abd[_0xbd8121(0x18a)]))!=null?_0x23062d:[],_0x2718eb=JSON[_0xbd8121(0x19e)](_0x2ff610),_0x6fcd92=(await this['_sessionService']['requireSession'](_0x3c492e))['getMemberID']();if(_0x1e4ccf){const _0x348535={'memberId':_0x6fcd92,'unitId':_0x3c492e,'content':_0x2718eb,'mention':_0x2f080e,'threadId':_0x401e93},_0x42501d=(await this[_0xbd8121(0x15d)][_0xbd8121(0x13b)](_0xbd8121(0x19a)+_0x3c492e+'/reply',{'body':_0x348535}))['body'][_0xbd8121(0x162)];return{..._0x5234df,'id':_0x42501d['replyId'],'dT':c[_0xbd8121(0x131)](+_0x42501d[_0xbd8121(0x15c)])[_0xbd8121(0x194)](_0xbd8121(0x158)),'personId':_0x42501d['userId']};}else{const _0x280a08={'memberId':_0x6fcd92,'unitId':_0x3c492e,'content':_0x2718eb,'mention':_0x2f080e},_0x562084=await this[_0xbd8121(0x15d)][_0xbd8121(0x13b)](_0xbd8121(0x19a)+_0x3c492e+_0xbd8121(0x19b),{'body':_0x280a08});return Y(_0x562084['body'][_0xbd8121(0x164)],_0x5234df);}}async['updateComment'](_0x160f0d){const _0x2ec0da=_0x490bf3;var _0x5666d9,_0x2cc852;const {text:_0xdba490,unitId:_0x161b16}=_0x160f0d,_0x11c674=(_0x2cc852=(_0x5666d9=_0xdba490[_0x2ec0da(0x14f)])==null?void 0x0:_0x5666d9[_0x2ec0da(0x155)](_0x59350f=>_0x59350f[_0x2ec0da(0x1a9)]===c[_0x2ec0da(0x1a8)][_0x2ec0da(0x14b)])[_0x2ec0da(0x191)](_0x1654e5=>_0x1654e5[_0x2ec0da(0x18a)]))!=null?_0x2cc852:[],_0x548fb4=JSON[_0x2ec0da(0x19e)](_0xdba490),_0xdb0f89=_0x160f0d[_0x2ec0da(0x186)],_0x57df65=_0x160f0d['id'],_0x395e43={'memberId':(await this[_0x2ec0da(0x181)]['requireSession'](_0x161b16))[_0x2ec0da(0x174)](),'unitId':_0x161b16,'threadId':_0xdb0f89,'mention':_0x11c674,'content':_0x548fb4,'replyId':_0x57df65},_0x180507=await this[_0x2ec0da(0x15d)][_0x2ec0da(0x13b)](_0x2ec0da(0x19a)+_0x161b16+_0x2ec0da(0x146),{'body':_0x395e43});return!_0x180507[_0x2ec0da(0x14e)]['error']||_0x180507['body'][_0x2ec0da(0x15a)][_0x2ec0da(0x193)]===0x1;}async[_0x490bf3(0x14a)](_0x329d97){const _0xa39596=_0x490bf3,{unitId:_0x366840}=_0x329d97,_0x59901d=_0x329d97['threadId'],_0x15152d={'memberId':this[_0xa39596(0x163)][_0xa39596(0x1a4)]()['userID'],'unitId':_0x366840,'threadId':_0x59901d,'solved':_0x329d97[_0xa39596(0x14d)]?I[_0xa39596(0x138)]:I['OpenOrReOpen']},_0xbeeeb0=await this[_0xa39596(0x15d)]['post']('/universer-api/comment/unit/'+_0x366840+'/solved',{'body':_0x15152d});return!_0xbeeeb0[_0xa39596(0x14e)][_0xa39596(0x15a)]||_0xbeeeb0['body'][_0xa39596(0x15a)][_0xa39596(0x193)]===0x1;}async[_0x490bf3(0x19c)](_0x5f35e2,_0x304d05,_0xdfffbe,_0x5d31eb){const _0x3fe81b=_0x490bf3,_0xe65a32={'memberId':(await this[_0x3fe81b(0x181)][_0x3fe81b(0x148)](_0x5f35e2))[_0x3fe81b(0x174)](),'threadId':_0xdfffbe,'replyId':_0x5d31eb,'unitId':_0x5f35e2},_0x43d306=await this[_0x3fe81b(0x15d)]['post']('/universer-api/comment/unit/'+_0x5f35e2+_0x3fe81b(0x1aa),{'body':_0xe65a32});return!_0x43d306['body'][_0x3fe81b(0x15a)]||_0x43d306[_0x3fe81b(0x14e)][_0x3fe81b(0x15a)][_0x3fe81b(0x193)]===0x1;}async['listComments'](_0x1e43af,_0x3678d1,_0x4abdee){const _0x529a23=_0x490bf3,_0x96859a={'unitId':_0x1e43af,'threadId':_0x4abdee},_0x426afc=await this[_0x529a23(0x15d)][_0x529a23(0x13b)](_0x529a23(0x19a)+_0x1e43af+_0x529a23(0x173),{'body':_0x96859a}),_0x1058ab=_0x4abdee[_0x529a23(0x191)](_0x3a58fb=>G(_0x426afc['body']['comments'][_0x3a58fb],_0x1e43af,_0x3678d1))[_0x529a23(0x155)](Boolean);return Object[_0x529a23(0x149)](_0x426afc[_0x529a23(0x14e)][_0x529a23(0x18c)])[_0x529a23(0x185)](_0x1956d2=>{const _0x38e302=_0x529a23;this[_0x38e302(0x163)][_0x38e302(0x187)](_0x1956d2);}),_0x1058ab;}['saveCommentToSnapshot'](_0x4fa31f){const _0x3ae513=_0x490bf3;return{'id':_0x4fa31f['id'],'threadId':_0x4fa31f['threadId'],'ref':_0x4fa31f[_0x3ae513(0x172)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x490bf3(0x133)](b[_0x490bf3(0x152)]))],p);var H=Object[_0x490bf3(0x1ab)],J=(_0x48e188,_0x576b2a,_0x5bd139,_0x5f0fd6)=>{const _0x3f63af=_0x490bf3;for(var _0x12a5a9=_0x5f0fd6>0x1?void 0x0:_0x5f0fd6?H(_0x576b2a,_0x5bd139):_0x576b2a,_0x1f1469=_0x48e188[_0x3f63af(0x139)]-0x1,_0x46796c;_0x1f1469>=0x0;_0x1f1469--)(_0x46796c=_0x48e188[_0x1f1469])&&(_0x12a5a9=_0x46796c(_0x12a5a9)||_0x12a5a9);return _0x12a5a9;},y=(_0x430236,_0x274343)=>(_0x541bf2,_0x286562)=>_0x274343(_0x541bf2,_0x286562,_0x430236);let g=class extends c[_0x490bf3(0x17f)]{constructor(_0x59d932,_0x902a20){const _0x496d30=_0x490bf3;super(),this['_threadCommentDataSourceService']=_0x59d932,this[_0x496d30(0x189)]=_0x902a20,this[_0x496d30(0x156)]();}['_initDataSource'](){const _0x3026f0=_0x490bf3;this[_0x3026f0(0x18f)][_0x3026f0(0x16d)]=this[_0x3026f0(0x189)],this[_0x3026f0(0x18f)][_0x3026f0(0x16e)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x490bf3(0x133)](p))],g);var F=Object['defineProperty'],L=Object[_0x490bf3(0x1ab)],Z=(_0x148c62,_0x313b9c,_0x4c5ed3)=>_0x313b9c in _0x148c62?F(_0x148c62,_0x313b9c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c5ed3}):_0x148c62[_0x313b9c]=_0x4c5ed3,W=(_0x54300a,_0x2d322b,_0x1403b7,_0xf5ccc0)=>{for(var _0x25cd08=_0xf5ccc0>0x1?void 0x0:_0xf5ccc0?L(_0x2d322b,_0x1403b7):_0x2d322b,_0xf87bac=_0x54300a['length']-0x1,_0x4b44c4;_0xf87bac>=0x0;_0xf87bac--)(_0x4b44c4=_0x54300a[_0xf87bac])&&(_0x25cd08=_0x4b44c4(_0x25cd08)||_0x25cd08);return _0x25cd08;},O=(_0x536880,_0x284c0e)=>(_0x5960cd,_0x37d45a)=>_0x284c0e(_0x5960cd,_0x37d45a,_0x536880),N=(_0x3000ba,_0x2a81e8,_0x507168)=>Z(_0x3000ba,typeof _0x2a81e8!=_0x490bf3(0x17a)?_0x2a81e8+'':_0x2a81e8,_0x507168);exports[_0x490bf3(0x1a7)]=class extends c['Plugin']{constructor(_0x591c8f=D,_0x102092,_0x42fa98){const _0x705b86=_0x490bf3;super(),this[_0x705b86(0x145)]=_0x591c8f,this[_0x705b86(0x165)]=_0x102092,this['_configService']=_0x42fa98;const {..._0x2019b9}=c[_0x705b86(0x1a0)]({},D,this[_0x705b86(0x145)]);this[_0x705b86(0x1a5)][_0x705b86(0x137)](q,_0x2019b9);}[_0x490bf3(0x154)](){const _0x3867cf=_0x490bf3;[[p],[g],[_]][_0x3867cf(0x185)](_0x347f46=>{const _0xb28030=_0x3867cf;this['_injector'][_0xb28030(0x16b)](_0x347f46);});}[_0x490bf3(0x132)](){const _0x176727=_0x490bf3;this[_0x176727(0x165)][_0x176727(0x167)](g),this[_0x176727(0x165)][_0x176727(0x167)](_);}},N(exports[_0x490bf3(0x1a7)],_0x490bf3(0x192),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x490bf3(0x18e)][_0x490bf3(0x157)]),exports[_0x490bf3(0x1a7)]=W([c[_0x490bf3(0x171)](w[_0x490bf3(0x1a3)],b[_0x490bf3(0x17e)],T[_0x490bf3(0x175)]),O(0x1,c[_0x490bf3(0x133)](c[_0x490bf3(0x151)])),O(0x2,c[_0x490bf3(0x19d)])],exports[_0x490bf3(0x1a7)]);
|
|
1
|
+
'use strict';const _0x1285b7=_0x4f1e;(function(_0x3f41c5,_0x5e4b7d){const _0x1dc83e=_0x4f1e,_0x3622ba=_0x3f41c5();while(!![]){try{const _0x238823=parseInt(_0x1dc83e(0x1eb))/0x1*(-parseInt(_0x1dc83e(0x195))/0x2)+-parseInt(_0x1dc83e(0x1d5))/0x3+parseInt(_0x1dc83e(0x185))/0x4*(parseInt(_0x1dc83e(0x1a3))/0x5)+parseInt(_0x1dc83e(0x193))/0x6*(-parseInt(_0x1dc83e(0x1d2))/0x7)+parseInt(_0x1dc83e(0x1ca))/0x8*(-parseInt(_0x1dc83e(0x1b7))/0x9)+-parseInt(_0x1dc83e(0x1aa))/0xa+-parseInt(_0x1dc83e(0x19f))/0xb*(-parseInt(_0x1dc83e(0x1c1))/0xc);if(_0x238823===_0x5e4b7d)break;else _0x3622ba['push'](_0x3622ba['shift']());}catch(_0x26adf3){_0x3622ba['push'](_0x3622ba['shift']());}}}(_0x19a6,0x3a624));Object['defineProperty'](exports,Symbol[_0x1285b7(0x187)],{'value':_0x1285b7(0x1c0)});function _0x4f1e(_0x541fc4,_0x4500dd){_0x541fc4=_0x541fc4-0x185;const _0x19a6f1=_0x19a6();let _0x4f1eab=_0x19a6f1[_0x541fc4];return _0x4f1eab;}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=_0x1285b7(0x1ed);var I=(_0x1c3b2f=>(_0x1c3b2f[_0x1c3b2f[_0x1285b7(0x1a2)]=0x0]=_0x1285b7(0x1a2),_0x1c3b2f[_0x1c3b2f['Solved']=0x1]=_0x1285b7(0x1e8),_0x1c3b2f[_0x1c3b2f['UNRECOGNIZED']=-0x1]=_0x1285b7(0x188),_0x1c3b2f))(I||{}),v=(_0x410df1=>(_0x410df1[_0x410df1[_0x1285b7(0x1ec)]=0x0]=_0x1285b7(0x1ec),_0x410df1[_0x410df1[_0x1285b7(0x1d7)]=0x1]=_0x1285b7(0x1d7),_0x410df1[_0x410df1['Reply']=0x2]=_0x1285b7(0x1e0),_0x410df1[_0x410df1[_0x1285b7(0x1f8)]=0x3]=_0x1285b7(0x1f8),_0x410df1[_0x410df1[_0x1285b7(0x1bf)]=0x4]='Delete',_0x410df1[_0x410df1[_0x1285b7(0x1c8)]=0x5]=_0x1285b7(0x1c8),_0x410df1[_0x410df1[_0x1285b7(0x188)]=-0x1]=_0x1285b7(0x188),_0x410df1))(v||{});const f=_0x51e7fc=>c[_0x1285b7(0x1d3)](new Date(+_0x51e7fc))[_0x1285b7(0x1c3)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2beac8,_0x4c7257)=>{const _0x2fc94c=_0x1285b7,_0x405bed=_0x2beac8[_0x2fc94c(0x1d9)](c[_0x2fc94c(0x190)]),_0x5a672e=_0x2beac8['get'](P[_0x2fc94c(0x18c)]);_0x4c7257[_0x2fc94c(0x1e2)](_0x40d3d2=>{const _0x479f52=_0x2fc94c;_0x405bed[_0x479f52(0x19e)](_0x40d3d2)&&_0x4c7257[_0x479f52(0x1bb)](_0x40d3d2);}),_0x4c7257[_0x2fc94c(0x1fe)]&&(await _0x5a672e[_0x2fc94c(0x1d9)](_0x2fc94c(0x1de),{'params':{'userIDs':[..._0x4c7257]}}))[_0x2fc94c(0x186)][_0x2fc94c(0x1f2)][_0x2fc94c(0x1e2)](_0x3da2dc=>{const _0x312cec=_0x2fc94c;_0x3da2dc&&_0x405bed[_0x312cec(0x18f)](_0x3da2dc);});};var $=Object[_0x1285b7(0x194)],E=(_0x3f95e4,_0x5245d2,_0x2e366b,_0x284291)=>{const _0x21b8ef=_0x1285b7;for(var _0x4e9974=_0x284291>0x1?void 0x0:_0x284291?$(_0x5245d2,_0x2e366b):_0x5245d2,_0x4c061c=_0x3f95e4[_0x21b8ef(0x1a4)]-0x1,_0x5dd783;_0x4c061c>=0x0;_0x4c061c--)(_0x5dd783=_0x3f95e4[_0x4c061c])&&(_0x4e9974=_0x5dd783(_0x4e9974)||_0x4e9974);return _0x4e9974;},S=(_0x4f5777,_0x31f03a)=>(_0x2d4c7b,_0xa97ab6)=>_0x31f03a(_0x2d4c7b,_0xa97ab6,_0x4f5777);let _=class extends c['Disposable']{constructor(_0x19eaf1,_0x1e973d,_0x2d14ef,_0x56e4aa){const _0x74cd06=_0x1285b7;super(),this[_0x74cd06(0x1b5)]=_0x19eaf1,this[_0x74cd06(0x19d)]=_0x1e973d,this[_0x74cd06(0x1b9)]=_0x2d14ef,this[_0x74cd06(0x1c6)]=_0x56e4aa,this[_0x74cd06(0x1e4)](),this['_initUserSync']();}['_initUserSync'](){const _0x2130f0=_0x1285b7;this['disposeWithMe'](this['_threadCommentModel'][_0x2130f0(0x18b)][_0x2130f0(0x1da)](j[_0x2130f0(0x1fb)](0x10))[_0x2130f0(0x1cf)](_0x2bbe88=>{const _0x24c1b8=_0x2130f0,_0x5a5eb3=new Set();_0x2bbe88[_0x24c1b8(0x1e2)](_0xebe33c=>{const _0x5b2e4b=_0x24c1b8;if(_0xebe33c['type']===_0x5b2e4b(0x1f1)){const _0x23f03a=_0xebe33c[_0x5b2e4b(0x1cd)][_0x5b2e4b(0x191)];_0x5a5eb3[_0x5b2e4b(0x1f1)](_0x23f03a);}}),R(this[_0x24c1b8(0x1c6)],_0x5a5eb3);}));}[_0x1285b7(0x1e4)](){const _0x4346c7=_0x1285b7;this[_0x4346c7(0x18d)](this[_0x4346c7(0x1b5)][_0x4346c7(0x18b)][_0x4346c7(0x1cf)](async _0x2f161c=>{const _0x5d1232=_0x4346c7;var _0x533621,_0x27fd5c,_0x574e87,_0xda5792;const _0x21f623=(_0x533621=this[_0x5d1232(0x19d)][_0x5d1232(0x19a)](_0x2f161c[_0x5d1232(0x1a7)])[_0x5d1232(0x1b4)](_0x1df881=>_0x1df881[_0x5d1232(0x1ea)]===_0x2f161c[_0x5d1232(0x1ea)]))==null?void 0x0:_0x533621[_0x5d1232(0x199)];if(!_0x21f623)return;const {unitId:_0x5c66e0,subUnitId:_0xed946b}=_0x21f623;switch(_0x2f161c[_0x5d1232(0x1a9)]&&this[_0x5d1232(0x1b9)][_0x5d1232(0x18f)](_0x2f161c['user']),_0x2f161c[_0x5d1232(0x1b8)]){case v['Add']:break;case v[_0x5d1232(0x1e0)]:{this[_0x5d1232(0x19d)][_0x5d1232(0x1e1)](_0x5c66e0,_0xed946b,{'unitId':_0x5c66e0,'subUnitId':_0xed946b,'ref':'','id':_0x2f161c[_0x5d1232(0x1d1)],'dT':f(+_0x2f161c[_0x5d1232(0x1e7)]),'threadId':_0x2f161c['threadId'],'personId':(_0x574e87=(_0x27fd5c=_0x2f161c[_0x5d1232(0x1a9)])==null?void 0x0:_0x27fd5c[_0x5d1232(0x1a8)])!=null?_0x574e87:_0x2f161c['userId'],'text':JSON['parse'](_0x2f161c[_0x5d1232(0x1ce)]),'parentId':_0x21f623['id']});break;}case v[_0x5d1232(0x1bf)]:{const _0x61c167=this[_0x5d1232(0x19d)]['getComment'](_0x5c66e0,_0xed946b,_0x2f161c[_0x5d1232(0x1d1)]);_0x61c167&&_0x61c167['parentId']&&this['_threadCommentModel'][_0x5d1232(0x1be)](_0x5c66e0,_0xed946b,_0x2f161c['replyId']);break;}case v[_0x5d1232(0x1f8)]:{this[_0x5d1232(0x19d)][_0x5d1232(0x1b2)](_0x5c66e0,_0xed946b,{'commentId':_0x2f161c['replyId'],'text':JSON[_0x5d1232(0x1ef)](_0x2f161c[_0x5d1232(0x1ce)])});break;}case v[_0x5d1232(0x1c8)]:{const _0x4d09f6=(_0xda5792=this[_0x5d1232(0x19d)][_0x5d1232(0x19a)](_0x2f161c['unitId'])[_0x5d1232(0x1b4)](_0x3bb13d=>_0x3bb13d[_0x5d1232(0x1ea)]===_0x2f161c[_0x5d1232(0x1ea)]))==null?void 0x0:_0xda5792[_0x5d1232(0x199)];_0x4d09f6&&this[_0x5d1232(0x19d)][_0x5d1232(0x1dc)](_0x5c66e0,_0xed946b,_0x4d09f6['id'],_0x2f161c['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x1285b7(0x1fa)](b[_0x1285b7(0x1f3)])),S(0x1,c['Inject'](M[_0x1285b7(0x1ae)])),S(0x2,c[_0x1285b7(0x1fa)](c[_0x1285b7(0x190)])),S(0x3,c[_0x1285b7(0x1fa)](c['Injector']))],_);const q=_0x1285b7(0x1d0),D={};var A=Object[_0x1285b7(0x194)],x=(_0x282a6,_0x2e95eb,_0x3c4e7f,_0x1d6d0a)=>{const _0x12f80c=_0x1285b7;for(var _0x196597=_0x1d6d0a>0x1?void 0x0:_0x1d6d0a?A(_0x2e95eb,_0x3c4e7f):_0x2e95eb,_0x1fcd45=_0x282a6[_0x12f80c(0x1a4)]-0x1,_0x56c2cf;_0x1fcd45>=0x0;_0x1fcd45--)(_0x56c2cf=_0x282a6[_0x1fcd45])&&(_0x196597=_0x56c2cf(_0x196597)||_0x196597);return _0x196597;},C=(_0xa784dd,_0x40904f)=>(_0x51c5cf,_0x52b659)=>_0x40904f(_0x51c5cf,_0x52b659,_0xa784dd);function Y(_0x42a731,_0x15448e){const _0x110d68=_0x1285b7,_0x28c66a=_0x42a731[_0x110d68(0x1e5)][0x0];return{..._0x15448e,'id':_0x28c66a['replyId'],'resolved':_0x42a731[_0x110d68(0x1d6)]===0x1,'dT':f(_0x28c66a['createTimestamp']),'personId':_0x28c66a[_0x110d68(0x1b6)],'threadId':_0x28c66a[_0x110d68(0x1ea)]};}function _0x19a6(){const _0x3e1ae8=['UserManagerService','personId','error','6LbAilk','getOwnPropertyDescriptor','1646WoBuno','_config','UniverCollaborationClientPlugin','resolved','root','getUnit','comment','values','_threadCommentModel','getUser','4596053WIFDNi','customRanges','symbol','OpenOrReOpen','76025yoLane','length','UniverThreadCommentUIPlugin','UniverLicensePlugin','unitId','userID','user','3697860KKnBmt','listComments','/reply','UniverThreadCommentDataSourcePlugin','ThreadCommentModel','_threadCommentDataSourceService','slice','_sessionService','updateComment','onReady','find','_commentService','userId','3555GNIQhw','type','_userService','onStarting','delete','comments','_initDataSource','deleteComment','Delete','Module','24fsJnjt','code','format','rangeId','rangeType','_injector','COMMENT','Solve','post','6392lyhLUl','defineProperty','getMemberID','payload','content','subscribe','thread-comment-data-source.config','replyId','570668LUfxNA','dayjs','Plugin','759759OomktW','solved','Add','Disposable','get','pipe','_threadCommentDataSource','resolveComment','/edit','/universer-api/user/list','/solved','Reply','addComment','forEach','CollaborationSessionService','_init','replies','stringify','createTimestamp','Solved','IConfigService','threadId','21kojnKi','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Injector','parse','requireSession','add','users','CommentService','pluginName','dataSource','/universer-api/comment/unit/','filter','Edit','_httpService','Inject','bufferTime','map','ref','size','116RlXWoK','body','toStringTag','UNRECOGNIZED','CustomRangeType','reply','commentUpdate$','HTTPService','disposeWithMe','/list','addUser'];_0x19a6=function(){return _0x3e1ae8;};return _0x19a6();}function G(_0x48a08a,_0x94056,_0x29e911){const _0x476b92=_0x1285b7;var _0x138bde,_0x7c1bf8;if(((_0x7c1bf8=(_0x138bde=_0x48a08a==null?void 0x0:_0x48a08a[_0x476b92(0x1e5)])==null?void 0x0:_0x138bde['length'])!=null?_0x7c1bf8:0x0)>0x0){const _0x42170=(_0x1cd5fd,_0x4a7efa)=>({'id':_0x1cd5fd[_0x476b92(0x1d1)],'threadId':_0x1cd5fd[_0x476b92(0x1ea)],'dT':f(_0x1cd5fd[_0x476b92(0x1e7)]),'personId':_0x1cd5fd[_0x476b92(0x1b6)],'resolved':_0x48a08a[_0x476b92(0x1d6)]===I[_0x476b92(0x1e8)],'unitId':_0x94056,'subUnitId':_0x29e911,'text':JSON[_0x476b92(0x1ef)](_0x1cd5fd[_0x476b92(0x1ce)]),'parentId':_0x4a7efa}),_0x5d18d1=_0x42170(_0x48a08a['replies'][0x0]);return{..._0x5d18d1,'children':_0x48a08a[_0x476b92(0x1e5)][_0x476b92(0x1b0)](0x1)['map'](_0x2b4c9a=>_0x42170(_0x2b4c9a,_0x5d18d1['id']))};}return null;}let p=class{constructor(_0xd219b6,_0x11c23a,_0x24d565){const _0xd84f2=_0x1285b7;this[_0xd84f2(0x1f9)]=_0xd219b6,this[_0xd84f2(0x1b9)]=_0x11c23a,this[_0xd84f2(0x1b1)]=_0x24d565;}async['addComment'](_0x117e12){const _0x3eb687=_0x1285b7;var _0x1246d6,_0x282df9;const {parentId:_0x2bcd22,unitId:_0x5366b9,text:_0x1c018f,threadId:_0x47a434}=_0x117e12,_0x48d825=(_0x282df9=(_0x1246d6=_0x1c018f[_0x3eb687(0x1a0)])==null?void 0x0:_0x1246d6[_0x3eb687(0x1f7)](_0x8a3da7=>_0x8a3da7[_0x3eb687(0x1c5)]===c['CustomRangeType']['COMMENT'])[_0x3eb687(0x1fc)](_0x143d0b=>_0x143d0b[_0x3eb687(0x1c4)]))!=null?_0x282df9:[],_0x43128d=JSON[_0x3eb687(0x1e6)](_0x1c018f),_0x3ee6f9=(await this[_0x3eb687(0x1b1)]['requireSession'](_0x5366b9))['getMemberID']();if(_0x2bcd22){const _0x33d66e={'memberId':_0x3ee6f9,'unitId':_0x5366b9,'content':_0x43128d,'mention':_0x48d825,'threadId':_0x47a434},_0x53bbc7=(await this[_0x3eb687(0x1f9)][_0x3eb687(0x1c9)]('/universer-api/comment/unit/'+_0x5366b9+_0x3eb687(0x1ac),{'body':_0x33d66e}))['body'][_0x3eb687(0x18a)];return{..._0x117e12,'id':_0x53bbc7['replyId'],'dT':c[_0x3eb687(0x1d3)](+_0x53bbc7[_0x3eb687(0x1e7)])[_0x3eb687(0x1c3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x53bbc7[_0x3eb687(0x1b6)]};}else{const _0x207682={'memberId':_0x3ee6f9,'unitId':_0x5366b9,'content':_0x43128d,'mention':_0x48d825},_0x10a243=await this['_httpService']['post'](_0x3eb687(0x1f6)+_0x5366b9+'/add',{'body':_0x207682});return Y(_0x10a243[_0x3eb687(0x186)][_0x3eb687(0x19b)],_0x117e12);}}async[_0x1285b7(0x1b2)](_0x70a3eb){const _0x50c3e9=_0x1285b7;var _0x4217fb,_0x5577d3;const {text:_0x24de69,unitId:_0x2b23ee}=_0x70a3eb,_0x50d482=(_0x5577d3=(_0x4217fb=_0x24de69[_0x50c3e9(0x1a0)])==null?void 0x0:_0x4217fb[_0x50c3e9(0x1f7)](_0x4d9fb4=>_0x4d9fb4[_0x50c3e9(0x1c5)]===c[_0x50c3e9(0x189)][_0x50c3e9(0x1c7)])[_0x50c3e9(0x1fc)](_0x49dc65=>_0x49dc65['rangeId']))!=null?_0x5577d3:[],_0x47f631=JSON[_0x50c3e9(0x1e6)](_0x24de69),_0x5aa76a=_0x70a3eb['threadId'],_0x1021f6=_0x70a3eb['id'],_0x1d11d4={'memberId':(await this[_0x50c3e9(0x1b1)][_0x50c3e9(0x1f0)](_0x2b23ee))[_0x50c3e9(0x1cc)](),'unitId':_0x2b23ee,'threadId':_0x5aa76a,'mention':_0x50d482,'content':_0x47f631,'replyId':_0x1021f6},_0x52757a=await this[_0x50c3e9(0x1f9)]['post']('/universer-api/comment/unit/'+_0x2b23ee+_0x50c3e9(0x1dd),{'body':_0x1d11d4});return!_0x52757a[_0x50c3e9(0x186)]['error']||_0x52757a['body'][_0x50c3e9(0x192)][_0x50c3e9(0x1c2)]===0x1;}async[_0x1285b7(0x1dc)](_0x362b3a){const _0x29a50e=_0x1285b7,{unitId:_0x118f9a}=_0x362b3a,_0x19c831=_0x362b3a['threadId'],_0x16d5dd={'memberId':this[_0x29a50e(0x1b9)]['getCurrentUser']()['userID'],'unitId':_0x118f9a,'threadId':_0x19c831,'solved':_0x362b3a[_0x29a50e(0x198)]?I[_0x29a50e(0x1e8)]:I['OpenOrReOpen']},_0x3207eb=await this['_httpService'][_0x29a50e(0x1c9)](_0x29a50e(0x1f6)+_0x118f9a+_0x29a50e(0x1df),{'body':_0x16d5dd});return!_0x3207eb[_0x29a50e(0x186)][_0x29a50e(0x192)]||_0x3207eb[_0x29a50e(0x186)][_0x29a50e(0x192)][_0x29a50e(0x1c2)]===0x1;}async['deleteComment'](_0x5e3c21,_0x3994f5,_0x364039,_0x12291f){const _0x420e95=_0x1285b7,_0x5317d5={'memberId':(await this[_0x420e95(0x1b1)]['requireSession'](_0x5e3c21))[_0x420e95(0x1cc)](),'threadId':_0x364039,'replyId':_0x12291f,'unitId':_0x5e3c21},_0x153ee0=await this['_httpService'][_0x420e95(0x1c9)]('/universer-api/comment/unit/'+_0x5e3c21+'/delete',{'body':_0x5317d5});return!_0x153ee0[_0x420e95(0x186)][_0x420e95(0x192)]||_0x153ee0['body']['error']['code']===0x1;}async[_0x1285b7(0x1ab)](_0x36a93f,_0x55c5fa,_0x1d70c0){const _0xe2298a=_0x1285b7,_0x188fab={'unitId':_0x36a93f,'threadId':_0x1d70c0},_0x1193a0=await this[_0xe2298a(0x1f9)][_0xe2298a(0x1c9)]('/universer-api/comment/unit/'+_0x36a93f+_0xe2298a(0x18e),{'body':_0x188fab}),_0x28b100=_0x1d70c0['map'](_0xafa276=>G(_0x1193a0[_0xe2298a(0x186)][_0xe2298a(0x1bc)][_0xafa276],_0x36a93f,_0x55c5fa))['filter'](Boolean);return Object[_0xe2298a(0x19c)](_0x1193a0[_0xe2298a(0x186)][_0xe2298a(0x1f2)])[_0xe2298a(0x1e2)](_0x59e9b0=>{const _0x2fe6cf=_0xe2298a;this['_userService'][_0x2fe6cf(0x18f)](_0x59e9b0);}),_0x28b100;}['saveCommentToSnapshot'](_0x1587e7){const _0x37207d=_0x1285b7;return{'id':_0x1587e7['id'],'threadId':_0x1587e7[_0x37207d(0x1ea)],'ref':_0x1587e7[_0x37207d(0x1fd)]};}};p=x([C(0x0,c[_0x1285b7(0x1fa)](P[_0x1285b7(0x18c)])),C(0x1,c[_0x1285b7(0x1fa)](c[_0x1285b7(0x190)])),C(0x2,c['Inject'](b[_0x1285b7(0x1e3)]))],p);var H=Object[_0x1285b7(0x194)],J=(_0x331bc9,_0x50349b,_0x53014c,_0x4144bf)=>{const _0x5391b1=_0x1285b7;for(var _0x4ef144=_0x4144bf>0x1?void 0x0:_0x4144bf?H(_0x50349b,_0x53014c):_0x50349b,_0x62e444=_0x331bc9[_0x5391b1(0x1a4)]-0x1,_0x47ff4d;_0x62e444>=0x0;_0x62e444--)(_0x47ff4d=_0x331bc9[_0x62e444])&&(_0x4ef144=_0x47ff4d(_0x4ef144)||_0x4ef144);return _0x4ef144;},y=(_0x34aa06,_0x392df5)=>(_0xc2ee07,_0x3f66ee)=>_0x392df5(_0xc2ee07,_0x3f66ee,_0x34aa06);let g=class extends c[_0x1285b7(0x1d8)]{constructor(_0x6c8cd6,_0x40dc7e){const _0x5db3bd=_0x1285b7;super(),this[_0x5db3bd(0x1af)]=_0x6c8cd6,this['_threadCommentDataSource']=_0x40dc7e,this[_0x5db3bd(0x1bd)]();}[_0x1285b7(0x1bd)](){const _0x432bb5=_0x1285b7;this['_threadCommentDataSourceService'][_0x432bb5(0x1f5)]=this[_0x432bb5(0x1db)],this[_0x432bb5(0x1af)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x1285b7(0x1fa)](p))],g);var F=Object[_0x1285b7(0x1cb)],L=Object[_0x1285b7(0x194)],Z=(_0x247c84,_0x20cc16,_0x2f0638)=>_0x20cc16 in _0x247c84?F(_0x247c84,_0x20cc16,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f0638}):_0x247c84[_0x20cc16]=_0x2f0638,W=(_0x4b3f64,_0x206fe6,_0x3e4eb7,_0x51276c)=>{const _0x3c2753=_0x1285b7;for(var _0x4e39ac=_0x51276c>0x1?void 0x0:_0x51276c?L(_0x206fe6,_0x3e4eb7):_0x206fe6,_0x86737=_0x4b3f64[_0x3c2753(0x1a4)]-0x1,_0x3f245c;_0x86737>=0x0;_0x86737--)(_0x3f245c=_0x4b3f64[_0x86737])&&(_0x4e39ac=_0x3f245c(_0x4e39ac)||_0x4e39ac);return _0x4e39ac;},O=(_0x30de0d,_0x52af1b)=>(_0x2bf752,_0x385c5c)=>_0x52af1b(_0x2bf752,_0x385c5c,_0x30de0d),N=(_0x3404ab,_0x52c37f,_0xe84539)=>Z(_0x3404ab,typeof _0x52c37f!=_0x1285b7(0x1a1)?_0x52c37f+'':_0x52c37f,_0xe84539);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x1285b7(0x1d4)]{constructor(_0x5b8f7f=D,_0x38c328,_0xe35801){const _0x2d238f=_0x1285b7;super(),this[_0x2d238f(0x196)]=_0x5b8f7f,this['_injector']=_0x38c328,this['_configService']=_0xe35801;const {..._0x5ac34b}=c['merge']({},D,this[_0x2d238f(0x196)]);this['_configService']['setConfig'](q,_0x5ac34b);}[_0x1285b7(0x1ba)](){[[p],[g],[_]]['forEach'](_0xf520f9=>{const _0x356c27=_0x4f1e;this[_0x356c27(0x1c6)]['add'](_0xf520f9);});}[_0x1285b7(0x1b3)](){const _0x275d11=_0x1285b7;this[_0x275d11(0x1c6)][_0x275d11(0x1d9)](g),this[_0x275d11(0x1c6)][_0x275d11(0x1d9)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x1285b7(0x1f4),U),N(exports[_0x1285b7(0x1ad)],_0x1285b7(0x1b8),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x1285b7(0x1ad)]=W([c['DependentOn'](w[_0x1285b7(0x1a5)],b[_0x1285b7(0x197)],T[_0x1285b7(0x1a6)]),O(0x1,c[_0x1285b7(0x1fa)](c[_0x1285b7(0x1ee)])),O(0x2,c[_0x1285b7(0x1e9)])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1db4(_0x2b44be,_0x19edba){_0x2b44be=_0x2b44be-0xf9;const _0x17c55a=_0x17c5();let _0x1db470=_0x17c55a[_0x2b44be];return _0x1db470;}const _0x452b23=_0x1db4;(function(_0x49ca60,_0x45c3b0){const _0x4a8af5=_0x1db4,_0x218d70=_0x49ca60();while(!![]){try{const _0x377ab4=parseInt(_0x4a8af5(0x11b))/0x1+-parseInt(_0x4a8af5(0x128))/0x2*(parseInt(_0x4a8af5(0x115))/0x3)+parseInt(_0x4a8af5(0x104))/0x4+-parseInt(_0x4a8af5(0x132))/0x5*(-parseInt(_0x4a8af5(0x126))/0x6)+-parseInt(_0x4a8af5(0x107))/0x7+-parseInt(_0x4a8af5(0x10a))/0x8+parseInt(_0x4a8af5(0x117))/0x9;if(_0x377ab4===_0x45c3b0)break;else _0x218d70['push'](_0x218d70['shift']());}catch(_0x47539c){_0x218d70['push'](_0x218d70['shift']());}}}(_0x17c5,0xec0b8));import{CommentService as _0x12c24f,CollaborationSessionService as _0x395936,UniverCollaborationClientPlugin as _0x354fd9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3ba035}from'@univerjs-pro/license';import{dayjs as _0xe06112,UserManagerService as _0x48d6a8,Inject as _0x437e4f,Injector as _0x50e8a0,Disposable as _0x4f537f,CustomRangeType as _0x128584,UniverInstanceType as _0x41babf,DependentOn as _0x49f4f5,IConfigService as _0x4181a7,Plugin as _0x37f55a,merge as _0x127711}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36ebce}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3e56e2,IThreadCommentDataSourceService as _0x33be8b}from'@univerjs/thread-comment';import{bufferTime as _0x458aca}from'rxjs';import{HTTPService as _0x37c7be}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x17c5(){const _0x762096=['get','add','onReady','map','addComment','getCurrentUser','setConfig','customRanges','unitId','stringify','_threadCommentDataSourceService','replies','Reply','root','/add','resolved','/reply','replyId','disposeWithMe','reply','delete','userId','YYYY/MM/DD\x20HH:mm','dataSource','createTimestamp','/solved','commentUpdate$','subscribe','Add','comments','_threadCommentModel','format','onStarting','code','solved','_commentService','deleteComment','_config','defineProperty','_configService','userID','Delete','requireSession','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','values','5244256aaUntP','OpenOrReOpen','Solve','13519107xfKIVV','symbol','comment','1519848WYhYRI','parse','UNRECOGNIZED','length','_sessionService','getMemberID','updateComment','personId','thread-comment-data-source.config','threadId','listComments','3ZlkCIH','syncUpdateMutationToColla','11280600tmtsGf','resolveComment','_threadCommentDataSource','getUnit','314846PavOvV','COMMENT','Edit','addUser','/universer-api/comment/unit/','pluginName','_initUserSync','/list','user','rangeType','filter','6clGQyu','_injector','2378942HBpgKQ','Unknown','post','_httpService','/universer-api/user/list','payload','forEach','getUser','_init','body','6991415ejHbDA','slice','_initDataSource','parentId','error','content','_userService','type','rangeId'];_0x17c5=function(){return _0x762096;};return _0x17c5();}var I=(_0x10eddc=>(_0x10eddc[_0x10eddc[_0x452b23(0x105)]=0x0]='OpenOrReOpen',_0x10eddc[_0x10eddc[_0x452b23(0x101)]=0x1]=_0x452b23(0x101),_0x10eddc[_0x10eddc[_0x452b23(0x10c)]=-0x1]='UNRECOGNIZED',_0x10eddc))(I||{}),v=(_0x569aa1=>(_0x569aa1[_0x569aa1[_0x452b23(0x129)]=0x0]=_0x452b23(0x129),_0x569aa1[_0x569aa1[_0x452b23(0x157)]=0x1]=_0x452b23(0x157),_0x569aa1[_0x569aa1[_0x452b23(0x147)]=0x2]=_0x452b23(0x147),_0x569aa1[_0x569aa1[_0x452b23(0x11d)]=0x3]=_0x452b23(0x11d),_0x569aa1[_0x569aa1[_0x452b23(0xfe)]=0x4]=_0x452b23(0xfe),_0x569aa1[_0x569aa1[_0x452b23(0x106)]=0x5]='Solve',_0x569aa1[_0x569aa1[_0x452b23(0x10c)]=-0x1]=_0x452b23(0x10c),_0x569aa1))(v||{});const y=_0x3f4573=>_0xe06112(new Date(+_0x3f4573))[_0x452b23(0x15a)](_0x452b23(0x151)),B=async(_0x1e7ec3,_0x2b0b8d)=>{const _0x3a75d8=_0x452b23,_0x37a653=_0x1e7ec3['get'](_0x48d6a8),_0xc7daa2=_0x1e7ec3['get'](_0x37c7be);_0x2b0b8d['forEach'](_0x2f2895=>{const _0x1c235c=_0x1db4;_0x37a653[_0x1c235c(0x12f)](_0x2f2895)&&_0x2b0b8d[_0x1c235c(0x14f)](_0x2f2895);}),_0x2b0b8d['size']&&(await _0xc7daa2[_0x3a75d8(0x13b)](_0x3a75d8(0x12c),{'params':{'userIDs':[..._0x2b0b8d]}}))[_0x3a75d8(0x131)]['users'][_0x3a75d8(0x12e)](_0x3f0e93=>{const _0x8a7620=_0x3a75d8;_0x3f0e93&&_0x37a653[_0x8a7620(0x11e)](_0x3f0e93);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1c7b92,_0x4c514b,_0x1f7845,_0x37e144)=>{for(var _0x2ed57f=_0x37e144>0x1?void 0x0:_0x37e144?K(_0x4c514b,_0x1f7845):_0x4c514b,_0x130caa=_0x1c7b92['length']-0x1,_0x20e6e0;_0x130caa>=0x0;_0x130caa--)(_0x20e6e0=_0x1c7b92[_0x130caa])&&(_0x2ed57f=_0x20e6e0(_0x2ed57f)||_0x2ed57f);return _0x2ed57f;},p=(_0x5af7b0,_0x493324)=>(_0x5c53d8,_0x508315)=>_0x493324(_0x5c53d8,_0x508315,_0x5af7b0);let _=class extends _0x4f537f{constructor(_0x507d4a,_0x1402d9,_0x203982,_0xedaf3c){const _0x5f530c=_0x452b23;super(),this[_0x5f530c(0x15e)]=_0x507d4a,this[_0x5f530c(0x159)]=_0x1402d9,this[_0x5f530c(0x138)]=_0x203982,this[_0x5f530c(0x127)]=_0xedaf3c,this[_0x5f530c(0x130)](),this[_0x5f530c(0x121)]();}['_initUserSync'](){const _0x53a591=_0x452b23;this[_0x53a591(0x14d)](this[_0x53a591(0x159)][_0x53a591(0x155)]['pipe'](_0x458aca(0x10))[_0x53a591(0x156)](_0x179017=>{const _0x201e87=_0x53a591,_0x2c2a9a=new Set();_0x179017[_0x201e87(0x12e)](_0x516510=>{const _0x12be3d=_0x201e87;if(_0x516510['type']===_0x12be3d(0x13c)){const _0x13152f=_0x516510[_0x12be3d(0x12d)][_0x12be3d(0x111)];_0x2c2a9a[_0x12be3d(0x13c)](_0x13152f);}}),B(this[_0x201e87(0x127)],_0x2c2a9a);}));}[_0x452b23(0x130)](){const _0x5d1f11=_0x452b23;this['disposeWithMe'](this['_commentService'][_0x5d1f11(0x155)][_0x5d1f11(0x156)](async _0x3031b1=>{const _0x316597=_0x5d1f11;var _0x2cc02c,_0x3b51d2,_0x37cab6,_0x5e8d73;const _0x268e04=(_0x2cc02c=this['_threadCommentModel'][_0x316597(0x11a)](_0x3031b1[_0x316597(0x143)])['find'](_0x473154=>_0x473154[_0x316597(0x113)]===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x2cc02c['root'];if(!_0x268e04)return;const {unitId:_0x5b3d28,subUnitId:_0x435b55}=_0x268e04;switch(_0x3031b1[_0x316597(0x123)]&&this['_userService'][_0x316597(0x11e)](_0x3031b1[_0x316597(0x123)]),_0x3031b1[_0x316597(0x139)]){case v[_0x316597(0x157)]:break;case v[_0x316597(0x147)]:{this['_threadCommentModel'][_0x316597(0x13f)](_0x5b3d28,_0x435b55,{'unitId':_0x5b3d28,'subUnitId':_0x435b55,'ref':'','id':_0x3031b1[_0x316597(0x14c)],'dT':y(+_0x3031b1[_0x316597(0x153)]),'threadId':_0x3031b1[_0x316597(0x113)],'personId':(_0x37cab6=(_0x3b51d2=_0x3031b1[_0x316597(0x123)])==null?void 0x0:_0x3b51d2[_0x316597(0xfd)])!=null?_0x37cab6:_0x3031b1[_0x316597(0x150)],'text':JSON[_0x316597(0x10b)](_0x3031b1[_0x316597(0x137)]),'parentId':_0x268e04['id']});break;}case v[_0x316597(0xfe)]:{const _0xeaa323=this[_0x316597(0x159)]['getComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);_0xeaa323&&_0xeaa323[_0x316597(0x135)]&&this[_0x316597(0x159)]['deleteComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);break;}case v[_0x316597(0x11d)]:{this[_0x316597(0x159)][_0x316597(0x110)](_0x5b3d28,_0x435b55,{'commentId':_0x3031b1[_0x316597(0x14c)],'text':JSON['parse'](_0x3031b1[_0x316597(0x137)])});break;}case v[_0x316597(0x106)]:{const _0x854ef1=(_0x5e8d73=this[_0x316597(0x159)]['getUnit'](_0x3031b1[_0x316597(0x143)])['find'](_0x2f3487=>_0x2f3487['threadId']===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x5e8d73[_0x316597(0x148)];_0x854ef1&&this[_0x316597(0x159)][_0x316597(0x118)](_0x5b3d28,_0x435b55,_0x854ef1['id'],_0x3031b1['solved']===I[_0x316597(0x101)]);break;}}}));}};_=V([p(0x0,_0x437e4f(_0x12c24f)),p(0x1,_0x437e4f(_0x3e56e2)),p(0x2,_0x437e4f(_0x48d6a8)),p(0x3,_0x437e4f(_0x50e8a0))],_);const z=_0x452b23(0x112),O={};var k=Object[_0x452b23(0x102)],Q=(_0x41e29a,_0x2956a7,_0x2595eb,_0x36088d)=>{for(var _0xaad226=_0x36088d>0x1?void 0x0:_0x36088d?k(_0x2956a7,_0x2595eb):_0x2956a7,_0x40a588=_0x41e29a['length']-0x1,_0x133b4d;_0x40a588>=0x0;_0x40a588--)(_0x133b4d=_0x41e29a[_0x40a588])&&(_0xaad226=_0x133b4d(_0xaad226)||_0xaad226);return _0xaad226;},b=(_0x4f7c9a,_0x168885)=>(_0x2bd8fc,_0x37a43b)=>_0x168885(_0x2bd8fc,_0x37a43b,_0x4f7c9a);function X(_0x350da9,_0x151f36){const _0x509d5d=_0x452b23,_0xa08899=_0x350da9[_0x509d5d(0x146)][0x0];return{..._0x151f36,'id':_0xa08899[_0x509d5d(0x14c)],'resolved':_0x350da9[_0x509d5d(0x15d)]===0x1,'dT':y(_0xa08899[_0x509d5d(0x153)]),'personId':_0xa08899[_0x509d5d(0x150)],'threadId':_0xa08899[_0x509d5d(0x113)]};}function ee(_0x1ddb27,_0x1e05f0,_0x306943){const _0x1128d1=_0x452b23;var _0x5dca3b,_0x169bd6;if(((_0x169bd6=(_0x5dca3b=_0x1ddb27==null?void 0x0:_0x1ddb27[_0x1128d1(0x146)])==null?void 0x0:_0x5dca3b['length'])!=null?_0x169bd6:0x0)>0x0){const _0x3fb377=(_0x52495b,_0x297119)=>({'id':_0x52495b['replyId'],'threadId':_0x52495b[_0x1128d1(0x113)],'dT':y(_0x52495b[_0x1128d1(0x153)]),'personId':_0x52495b['userId'],'resolved':_0x1ddb27[_0x1128d1(0x15d)]===I['Solved'],'unitId':_0x1e05f0,'subUnitId':_0x306943,'text':JSON[_0x1128d1(0x10b)](_0x52495b['content']),'parentId':_0x297119}),_0x2d13c4=_0x3fb377(_0x1ddb27[_0x1128d1(0x146)][0x0]);return{..._0x2d13c4,'children':_0x1ddb27['replies'][_0x1128d1(0x133)](0x1)[_0x1128d1(0x13e)](_0x3ef85a=>_0x3fb377(_0x3ef85a,_0x2d13c4['id']))};}return null;}let S=class{constructor(_0x7d1fcd,_0xce3f7,_0x157859){const _0x442d80=_0x452b23;this[_0x442d80(0x12b)]=_0x7d1fcd,this['_userService']=_0xce3f7,this[_0x442d80(0x10e)]=_0x157859;}async[_0x452b23(0x13f)](_0x19b0d3){const _0x5e68aa=_0x452b23;var _0x27e403,_0x29b3af;const {parentId:_0x36f965,unitId:_0x10ccae,text:_0x334a8b,threadId:_0x58c016}=_0x19b0d3,_0x1ed14e=(_0x29b3af=(_0x27e403=_0x334a8b[_0x5e68aa(0x142)])==null?void 0x0:_0x27e403[_0x5e68aa(0x125)](_0x50765c=>_0x50765c[_0x5e68aa(0x124)]===_0x128584[_0x5e68aa(0x11c)])[_0x5e68aa(0x13e)](_0xf4ee76=>_0xf4ee76['rangeId']))!=null?_0x29b3af:[],_0x3a8913=JSON['stringify'](_0x334a8b),_0x324d21=(await this[_0x5e68aa(0x10e)]['requireSession'](_0x10ccae))[_0x5e68aa(0x10f)]();if(_0x36f965){const _0x46402b={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e,'threadId':_0x58c016},_0x60c34b=(await this[_0x5e68aa(0x12b)][_0x5e68aa(0x12a)](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x14b),{'body':_0x46402b}))[_0x5e68aa(0x131)][_0x5e68aa(0x14e)];return{..._0x19b0d3,'id':_0x60c34b['replyId'],'dT':_0xe06112(+_0x60c34b['createTimestamp'])[_0x5e68aa(0x15a)](_0x5e68aa(0x151)),'personId':_0x60c34b[_0x5e68aa(0x150)]};}else{const _0x21ed5c={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e},_0x438825=await this['_httpService']['post'](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x149),{'body':_0x21ed5c});return X(_0x438825[_0x5e68aa(0x131)][_0x5e68aa(0x109)],_0x19b0d3);}}async[_0x452b23(0x110)](_0x42822e){const _0xd9dd6c=_0x452b23;var _0x38626c,_0x48240f;const {text:_0x1825a0,unitId:_0x449a64}=_0x42822e,_0x2037a7=(_0x48240f=(_0x38626c=_0x1825a0['customRanges'])==null?void 0x0:_0x38626c[_0xd9dd6c(0x125)](_0x26bb4e=>_0x26bb4e[_0xd9dd6c(0x124)]===_0x128584[_0xd9dd6c(0x11c)])[_0xd9dd6c(0x13e)](_0xf3484e=>_0xf3484e[_0xd9dd6c(0x13a)]))!=null?_0x48240f:[],_0x585f4a=JSON[_0xd9dd6c(0x144)](_0x1825a0),_0x2d8dde=_0x42822e[_0xd9dd6c(0x113)],_0x23f0c7=_0x42822e['id'],_0x5426c7={'memberId':(await this[_0xd9dd6c(0x10e)]['requireSession'](_0x449a64))[_0xd9dd6c(0x10f)](),'unitId':_0x449a64,'threadId':_0x2d8dde,'mention':_0x2037a7,'content':_0x585f4a,'replyId':_0x23f0c7},_0x56e7a7=await this['_httpService']['post'](_0xd9dd6c(0x11f)+_0x449a64+'/edit',{'body':_0x5426c7});return!_0x56e7a7['body'][_0xd9dd6c(0x136)]||_0x56e7a7['body'][_0xd9dd6c(0x136)][_0xd9dd6c(0x15c)]===0x1;}async[_0x452b23(0x118)](_0x3b4fe3){const _0xa112e8=_0x452b23,{unitId:_0x43bc74}=_0x3b4fe3,_0x3d1767=_0x3b4fe3[_0xa112e8(0x113)],_0x1b3b62={'memberId':this[_0xa112e8(0x138)][_0xa112e8(0x140)]()['userID'],'unitId':_0x43bc74,'threadId':_0x3d1767,'solved':_0x3b4fe3[_0xa112e8(0x14a)]?I[_0xa112e8(0x101)]:I[_0xa112e8(0x105)]},_0xc7700d=await this[_0xa112e8(0x12b)][_0xa112e8(0x12a)]('/universer-api/comment/unit/'+_0x43bc74+_0xa112e8(0x154),{'body':_0x1b3b62});return!_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]||_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]['code']===0x1;}async[_0x452b23(0xf9)](_0xdc9ee5,_0x2f425f,_0x2a74cb,_0x27dc83){const _0x593d3f=_0x452b23,_0x23fbea={'memberId':(await this['_sessionService'][_0x593d3f(0xff)](_0xdc9ee5))['getMemberID'](),'threadId':_0x2a74cb,'replyId':_0x27dc83,'unitId':_0xdc9ee5},_0x556321=await this[_0x593d3f(0x12b)][_0x593d3f(0x12a)](_0x593d3f(0x11f)+_0xdc9ee5+'/delete',{'body':_0x23fbea});return!_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)]||_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)][_0x593d3f(0x15c)]===0x1;}async[_0x452b23(0x114)](_0x304ca5,_0x40c13a,_0x1f35f7){const _0x2ea717=_0x452b23,_0x3639bb={'unitId':_0x304ca5,'threadId':_0x1f35f7},_0x144cc6=await this[_0x2ea717(0x12b)][_0x2ea717(0x12a)](_0x2ea717(0x11f)+_0x304ca5+_0x2ea717(0x122),{'body':_0x3639bb}),_0x343d2c=_0x1f35f7[_0x2ea717(0x13e)](_0x2f8761=>ee(_0x144cc6['body'][_0x2ea717(0x158)][_0x2f8761],_0x304ca5,_0x40c13a))[_0x2ea717(0x125)](Boolean);return Object[_0x2ea717(0x103)](_0x144cc6['body']['users'])['forEach'](_0x3b7e69=>{const _0x435c67=_0x2ea717;this[_0x435c67(0x138)][_0x435c67(0x11e)](_0x3b7e69);}),_0x343d2c;}['saveCommentToSnapshot'](_0x7a6e89){const _0x73331c=_0x452b23;return{'id':_0x7a6e89['id'],'threadId':_0x7a6e89[_0x73331c(0x113)],'ref':_0x7a6e89['ref']};}};S=Q([b(0x0,_0x437e4f(_0x37c7be)),b(0x1,_0x437e4f(_0x48d6a8)),b(0x2,_0x437e4f(_0x395936))],S);var re=Object[_0x452b23(0x102)],te=(_0x29be48,_0x2c84ec,_0x4a7ebd,_0x1af60a)=>{const _0x42d23f=_0x452b23;for(var _0x5391e7=_0x1af60a>0x1?void 0x0:_0x1af60a?re(_0x2c84ec,_0x4a7ebd):_0x2c84ec,_0x70053c=_0x29be48[_0x42d23f(0x10d)]-0x1,_0x19d67d;_0x70053c>=0x0;_0x70053c--)(_0x19d67d=_0x29be48[_0x70053c])&&(_0x5391e7=_0x19d67d(_0x5391e7)||_0x5391e7);return _0x5391e7;},M=(_0x2ad0cf,_0x516c13)=>(_0x55be30,_0x24d0d2)=>_0x516c13(_0x55be30,_0x24d0d2,_0x2ad0cf);let f=class extends _0x4f537f{constructor(_0x5f2187,_0x347bd3){const _0x46b6b9=_0x452b23;super(),this[_0x46b6b9(0x145)]=_0x5f2187,this[_0x46b6b9(0x119)]=_0x347bd3,this['_initDataSource']();}[_0x452b23(0x134)](){const _0x2a12ca=_0x452b23;this[_0x2a12ca(0x145)][_0x2a12ca(0x152)]=this[_0x2a12ca(0x119)],this[_0x2a12ca(0x145)][_0x2a12ca(0x116)]=!0x1;}};f=te([M(0x0,_0x33be8b),M(0x1,_0x437e4f(S))],f);var se=Object[_0x452b23(0xfb)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x252929,_0x35f054,_0x39c7fd)=>_0x35f054 in _0x252929?se(_0x252929,_0x35f054,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39c7fd}):_0x252929[_0x35f054]=_0x39c7fd,ie=(_0x587562,_0x49e33e,_0x34a790,_0x194ee)=>{const _0x5029aa=_0x452b23;for(var _0x52634c=_0x194ee>0x1?void 0x0:_0x194ee?oe(_0x49e33e,_0x34a790):_0x49e33e,_0x3111eb=_0x587562[_0x5029aa(0x10d)]-0x1,_0x404025;_0x3111eb>=0x0;_0x3111eb--)(_0x404025=_0x587562[_0x3111eb])&&(_0x52634c=_0x404025(_0x52634c)||_0x52634c);return _0x52634c;},N=(_0x13861f,_0x59622a)=>(_0x2849c4,_0x218c94)=>_0x59622a(_0x2849c4,_0x218c94,_0x13861f),$=(_0x1138f2,_0x322a97,_0x2cc85b)=>ne(_0x1138f2,typeof _0x322a97!=_0x452b23(0x108)?_0x322a97+'':_0x322a97,_0x2cc85b);let g=class extends _0x37f55a{constructor(_0x3a6c21=O,_0x25385d,_0x48ead6){const _0x437700=_0x452b23;super(),this[_0x437700(0xfa)]=_0x3a6c21,this[_0x437700(0x127)]=_0x25385d,this[_0x437700(0xfc)]=_0x48ead6;const {..._0x2c64dc}=_0x127711({},O,this[_0x437700(0xfa)]);this[_0x437700(0xfc)][_0x437700(0x141)](z,_0x2c64dc);}[_0x452b23(0x15b)](){const _0x23a1ac=_0x452b23;[[S],[f],[_]][_0x23a1ac(0x12e)](_0x5d54e9=>{const _0x54a9c1=_0x23a1ac;this['_injector'][_0x54a9c1(0x13c)](_0x5d54e9);});}[_0x452b23(0x13d)](){const _0x17c8b4=_0x452b23;this[_0x17c8b4(0x127)][_0x17c8b4(0x13b)](f),this['_injector'][_0x17c8b4(0x13b)](_);}};$(g,_0x452b23(0x120),W),$(g,_0x452b23(0x139),_0x41babf[_0x452b23(0x100)]),g=ie([_0x49f4f5(_0x36ebce,_0x354fd9,_0x3ba035),N(0x1,_0x437e4f(_0x50e8a0)),N(0x2,_0x4181a7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x30f0a8=_0x4237;(function(_0x22d320,_0x2f0368){const _0x52bd35=_0x4237,_0x3af3d5=_0x22d320();while(!![]){try{const _0x5b3c62=parseInt(_0x52bd35(0x1ab))/0x1*(parseInt(_0x52bd35(0x1c2))/0x2)+parseInt(_0x52bd35(0x1ce))/0x3*(-parseInt(_0x52bd35(0x1f1))/0x4)+parseInt(_0x52bd35(0x1e0))/0x5*(-parseInt(_0x52bd35(0x1fe))/0x6)+parseInt(_0x52bd35(0x1ad))/0x7+-parseInt(_0x52bd35(0x1ac))/0x8+parseInt(_0x52bd35(0x1ca))/0x9*(-parseInt(_0x52bd35(0x1cf))/0xa)+parseInt(_0x52bd35(0x1be))/0xb;if(_0x5b3c62===_0x2f0368)break;else _0x3af3d5['push'](_0x3af3d5['shift']());}catch(_0x240cba){_0x3af3d5['push'](_0x3af3d5['shift']());}}}(_0x32be,0x8c230));import{CommentService as _0x46763f,CollaborationSessionService as _0x1c6583,UniverCollaborationClientPlugin as _0x1bac31}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x11e776}from'@univerjs-pro/license';import{dayjs as _0x195604,UserManagerService as _0x1b8ddd,Inject as _0x55050b,Injector as _0x32158c,Disposable as _0x214298,CustomRangeType as _0x30c81c,UniverInstanceType as _0x57d252,DependentOn as _0x2f745a,IConfigService as _0x3d811e,Plugin as _0x37af55,merge as _0x522ad0}from'@univerjs/core';function _0x32be(){const _0x43294f=['_injector','UNRECOGNIZED','commentUpdate$','updateComment','getOwnPropertyDescriptor','dataSource','Unknown','replyId','solved','personId','root','getUnit','Reply','length','getMemberID','reply','userId','2ypqZGJ','4764032isNECI','679224UpiuhV','replies','delete','_config','user','userID','_threadCommentDataSourceService','OpenOrReOpen','threadId','Edit','rangeType','createTimestamp','Delete','pluginName','_sessionService','_httpService','users','10097934VudKrl','/list','add','_init','808664OfudHA','_userService','_threadCommentModel','parse','symbol','slice','map','/delete','738TaymGO','setConfig','type','onReady','3iVFCXW','72880ZuCOqt','getComment','post','payload','forEach','Solved','disposeWithMe','body','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','/reply','YYYY/MM/DD\x20HH:mm','get','stringify','format','deleteComment','555loLODe','subscribe','saveCommentToSnapshot','Add','size','comment','comments','thread-comment-data-source.config','/universer-api/comment/unit/','content','values','listComments','_initDataSource','find','addComment','customRanges','parentId','58892zFHRUb','_commentService','/add','filter','_threadCommentDataSource','UNIVER_UNKNOWN','addUser','COMMENT','resolved','Solve','_initUserSync','requireSession','resolveComment','2262lVvdab','_configService','unitId'];_0x32be=function(){return _0x43294f;};return _0x32be();}import{UniverThreadCommentUIPlugin as _0x1c5da8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10a242,IThreadCommentDataSourceService as _0x2dfa35}from'@univerjs/thread-comment';import{bufferTime as _0x40b52a}from'rxjs';import{HTTPService as _0x3f867}from'@univerjs/network';const W=_0x30f0a8(0x1d8);var I=(_0x168d6b=>(_0x168d6b[_0x168d6b[_0x30f0a8(0x1b4)]=0x0]=_0x30f0a8(0x1b4),_0x168d6b[_0x168d6b[_0x30f0a8(0x1d4)]=0x1]='Solved',_0x168d6b[_0x168d6b[_0x30f0a8(0x202)]=-0x1]=_0x30f0a8(0x202),_0x168d6b))(I||{}),v=(_0x2bbf6f=>(_0x2bbf6f[_0x2bbf6f['Unknown']=0x0]=_0x30f0a8(0x207),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1e3)]=0x1]=_0x30f0a8(0x1e3),_0x2bbf6f[_0x2bbf6f['Reply']=0x2]=_0x30f0a8(0x1a6),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1b6)]=0x3]='Edit',_0x2bbf6f[_0x2bbf6f['Delete']=0x4]=_0x30f0a8(0x1b9),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1fa)]=0x5]='Solve',_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x202)]=-0x1]=_0x30f0a8(0x202),_0x2bbf6f))(v||{});const y=_0x370e07=>_0x195604(new Date(+_0x370e07))[_0x30f0a8(0x1de)](_0x30f0a8(0x1db)),B=async(_0x27c79a,_0xe1d543)=>{const _0x368757=_0x30f0a8,_0x3545e0=_0x27c79a[_0x368757(0x1dc)](_0x1b8ddd),_0x124dd0=_0x27c79a[_0x368757(0x1dc)](_0x3f867);_0xe1d543[_0x368757(0x1d3)](_0x24eaf5=>{const _0x40c848=_0x368757;_0x3545e0['getUser'](_0x24eaf5)&&_0xe1d543[_0x40c848(0x1af)](_0x24eaf5);}),_0xe1d543[_0x368757(0x1e4)]&&(await _0x124dd0[_0x368757(0x1dc)]('/universer-api/user/list',{'params':{'userIDs':[..._0xe1d543]}}))[_0x368757(0x1d6)]['users'][_0x368757(0x1d3)](_0x14a845=>{_0x14a845&&_0x3545e0['addUser'](_0x14a845);});};var K=Object[_0x30f0a8(0x205)],V=(_0x27df89,_0xf619d1,_0x12cb55,_0x3d084c)=>{const _0x2cae8b=_0x30f0a8;for(var _0xf36819=_0x3d084c>0x1?void 0x0:_0x3d084c?K(_0xf619d1,_0x12cb55):_0xf619d1,_0xa48798=_0x27df89[_0x2cae8b(0x1a7)]-0x1,_0x19c99b;_0xa48798>=0x0;_0xa48798--)(_0x19c99b=_0x27df89[_0xa48798])&&(_0xf36819=_0x19c99b(_0xf36819)||_0xf36819);return _0xf36819;},p=(_0x169112,_0x4eabc1)=>(_0x297079,_0x209377)=>_0x4eabc1(_0x297079,_0x209377,_0x169112);let _=class extends _0x214298{constructor(_0x5074cb,_0x5f06bc,_0x49ad29,_0x56cc92){const _0x8e99f1=_0x30f0a8;super(),this[_0x8e99f1(0x1f2)]=_0x5074cb,this['_threadCommentModel']=_0x5f06bc,this[_0x8e99f1(0x1c3)]=_0x49ad29,this[_0x8e99f1(0x201)]=_0x56cc92,this['_init'](),this[_0x8e99f1(0x1fb)]();}[_0x30f0a8(0x1fb)](){const _0x3ab467=_0x30f0a8;this[_0x3ab467(0x1d5)](this['_threadCommentModel'][_0x3ab467(0x203)]['pipe'](_0x40b52a(0x10))[_0x3ab467(0x1e1)](_0x1abcbf=>{const _0xf26588=_0x3ab467,_0x1f2749=new Set();_0x1abcbf[_0xf26588(0x1d3)](_0x4053c0=>{const _0x4e7053=_0xf26588;if(_0x4053c0[_0x4e7053(0x1cc)]===_0x4e7053(0x1c0)){const _0x2d9b48=_0x4053c0[_0x4e7053(0x1d2)][_0x4e7053(0x20a)];_0x1f2749['add'](_0x2d9b48);}}),B(this[_0xf26588(0x201)],_0x1f2749);}));}[_0x30f0a8(0x1c1)](){const _0x10fa06=_0x30f0a8;this[_0x10fa06(0x1d5)](this['_commentService'][_0x10fa06(0x203)][_0x10fa06(0x1e1)](async _0x174376=>{const _0x53c931=_0x10fa06;var _0xbeed10,_0x3429ad,_0x273d57,_0x168091;const _0x481f1c=(_0xbeed10=this[_0x53c931(0x1c4)]['getUnit'](_0x174376[_0x53c931(0x200)])[_0x53c931(0x1ed)](_0x593308=>_0x593308[_0x53c931(0x1b5)]===_0x174376[_0x53c931(0x1b5)]))==null?void 0x0:_0xbeed10[_0x53c931(0x1a4)];if(!_0x481f1c)return;const {unitId:_0x1d6718,subUnitId:_0x301dc2}=_0x481f1c;switch(_0x174376[_0x53c931(0x1b1)]&&this['_userService'][_0x53c931(0x1f7)](_0x174376[_0x53c931(0x1b1)]),_0x174376['type']){case v[_0x53c931(0x1e3)]:break;case v[_0x53c931(0x1a6)]:{this[_0x53c931(0x1c4)][_0x53c931(0x1ee)](_0x1d6718,_0x301dc2,{'unitId':_0x1d6718,'subUnitId':_0x301dc2,'ref':'','id':_0x174376[_0x53c931(0x208)],'dT':y(+_0x174376['createTimestamp']),'threadId':_0x174376[_0x53c931(0x1b5)],'personId':(_0x273d57=(_0x3429ad=_0x174376['user'])==null?void 0x0:_0x3429ad[_0x53c931(0x1b2)])!=null?_0x273d57:_0x174376[_0x53c931(0x1aa)],'text':JSON[_0x53c931(0x1c5)](_0x174376[_0x53c931(0x1e9)]),'parentId':_0x481f1c['id']});break;}case v[_0x53c931(0x1b9)]:{const _0x375f7c=this[_0x53c931(0x1c4)][_0x53c931(0x1d0)](_0x1d6718,_0x301dc2,_0x174376[_0x53c931(0x208)]);_0x375f7c&&_0x375f7c[_0x53c931(0x1f0)]&&this[_0x53c931(0x1c4)][_0x53c931(0x1df)](_0x1d6718,_0x301dc2,_0x174376[_0x53c931(0x208)]);break;}case v[_0x53c931(0x1b6)]:{this[_0x53c931(0x1c4)][_0x53c931(0x204)](_0x1d6718,_0x301dc2,{'commentId':_0x174376[_0x53c931(0x208)],'text':JSON[_0x53c931(0x1c5)](_0x174376[_0x53c931(0x1e9)])});break;}case v[_0x53c931(0x1fa)]:{const _0x233ccf=(_0x168091=this[_0x53c931(0x1c4)][_0x53c931(0x1a5)](_0x174376[_0x53c931(0x200)])[_0x53c931(0x1ed)](_0x115029=>_0x115029[_0x53c931(0x1b5)]===_0x174376[_0x53c931(0x1b5)]))==null?void 0x0:_0x168091[_0x53c931(0x1a4)];_0x233ccf&&this[_0x53c931(0x1c4)][_0x53c931(0x1fd)](_0x1d6718,_0x301dc2,_0x233ccf['id'],_0x174376[_0x53c931(0x209)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x55050b(_0x46763f)),p(0x1,_0x55050b(_0x10a242)),p(0x2,_0x55050b(_0x1b8ddd)),p(0x3,_0x55050b(_0x32158c))],_);const z=_0x30f0a8(0x1e7),O={};var k=Object[_0x30f0a8(0x205)],Q=(_0x4e0f6f,_0x2bfe01,_0x3f35e9,_0xb2e3c3)=>{const _0x518af0=_0x30f0a8;for(var _0x4dd363=_0xb2e3c3>0x1?void 0x0:_0xb2e3c3?k(_0x2bfe01,_0x3f35e9):_0x2bfe01,_0x5366de=_0x4e0f6f[_0x518af0(0x1a7)]-0x1,_0x1849a3;_0x5366de>=0x0;_0x5366de--)(_0x1849a3=_0x4e0f6f[_0x5366de])&&(_0x4dd363=_0x1849a3(_0x4dd363)||_0x4dd363);return _0x4dd363;},b=(_0x3b12a6,_0x3b9f69)=>(_0x26f417,_0x672114)=>_0x3b9f69(_0x26f417,_0x672114,_0x3b12a6);function X(_0xc109ff,_0xd8cd3b){const _0x34f004=_0x30f0a8,_0x22b966=_0xc109ff[_0x34f004(0x1ae)][0x0];return{..._0xd8cd3b,'id':_0x22b966[_0x34f004(0x208)],'resolved':_0xc109ff[_0x34f004(0x209)]===0x1,'dT':y(_0x22b966[_0x34f004(0x1b8)]),'personId':_0x22b966[_0x34f004(0x1aa)],'threadId':_0x22b966[_0x34f004(0x1b5)]};}function ee(_0x253eb5,_0x189b64,_0x5dfb10){const _0x5927bf=_0x30f0a8;var _0x4554bb,_0x2c22f2;if(((_0x2c22f2=(_0x4554bb=_0x253eb5==null?void 0x0:_0x253eb5[_0x5927bf(0x1ae)])==null?void 0x0:_0x4554bb[_0x5927bf(0x1a7)])!=null?_0x2c22f2:0x0)>0x0){const _0x2dfb10=(_0x33cb18,_0x544887)=>({'id':_0x33cb18[_0x5927bf(0x208)],'threadId':_0x33cb18['threadId'],'dT':y(_0x33cb18[_0x5927bf(0x1b8)]),'personId':_0x33cb18[_0x5927bf(0x1aa)],'resolved':_0x253eb5[_0x5927bf(0x209)]===I[_0x5927bf(0x1d4)],'unitId':_0x189b64,'subUnitId':_0x5dfb10,'text':JSON[_0x5927bf(0x1c5)](_0x33cb18[_0x5927bf(0x1e9)]),'parentId':_0x544887}),_0x523607=_0x2dfb10(_0x253eb5[_0x5927bf(0x1ae)][0x0]);return{..._0x523607,'children':_0x253eb5[_0x5927bf(0x1ae)][_0x5927bf(0x1c7)](0x1)[_0x5927bf(0x1c8)](_0x111d23=>_0x2dfb10(_0x111d23,_0x523607['id']))};}return null;}let S=class{constructor(_0x5b456f,_0x4de251,_0x38cf95){const _0x3d19d1=_0x30f0a8;this[_0x3d19d1(0x1bc)]=_0x5b456f,this[_0x3d19d1(0x1c3)]=_0x4de251,this[_0x3d19d1(0x1bb)]=_0x38cf95;}async[_0x30f0a8(0x1ee)](_0x1973bd){const _0x4dc71b=_0x30f0a8;var _0x5c9408,_0x1d5294;const {parentId:_0x83a250,unitId:_0x4f6654,text:_0x598eef,threadId:_0x2fba83}=_0x1973bd,_0x4e43dd=(_0x1d5294=(_0x5c9408=_0x598eef[_0x4dc71b(0x1ef)])==null?void 0x0:_0x5c9408[_0x4dc71b(0x1f4)](_0x1553fd=>_0x1553fd['rangeType']===_0x30c81c['COMMENT'])['map'](_0x3d7767=>_0x3d7767[_0x4dc71b(0x1d9)]))!=null?_0x1d5294:[],_0x41afd1=JSON[_0x4dc71b(0x1dd)](_0x598eef),_0x1d0f51=(await this[_0x4dc71b(0x1bb)]['requireSession'](_0x4f6654))['getMemberID']();if(_0x83a250){const _0x4887b2={'memberId':_0x1d0f51,'unitId':_0x4f6654,'content':_0x41afd1,'mention':_0x4e43dd,'threadId':_0x2fba83},_0x5ec48a=(await this[_0x4dc71b(0x1bc)][_0x4dc71b(0x1d1)](_0x4dc71b(0x1e8)+_0x4f6654+_0x4dc71b(0x1da),{'body':_0x4887b2}))[_0x4dc71b(0x1d6)][_0x4dc71b(0x1a9)];return{..._0x1973bd,'id':_0x5ec48a['replyId'],'dT':_0x195604(+_0x5ec48a[_0x4dc71b(0x1b8)])[_0x4dc71b(0x1de)](_0x4dc71b(0x1db)),'personId':_0x5ec48a[_0x4dc71b(0x1aa)]};}else{const _0x4cb695={'memberId':_0x1d0f51,'unitId':_0x4f6654,'content':_0x41afd1,'mention':_0x4e43dd},_0x111748=await this[_0x4dc71b(0x1bc)][_0x4dc71b(0x1d1)]('/universer-api/comment/unit/'+_0x4f6654+_0x4dc71b(0x1f3),{'body':_0x4cb695});return X(_0x111748[_0x4dc71b(0x1d6)][_0x4dc71b(0x1e5)],_0x1973bd);}}async[_0x30f0a8(0x204)](_0x3fd30b){const _0x5cc2e3=_0x30f0a8;var _0x3f6615,_0x3bc192;const {text:_0x19f479,unitId:_0x2c5cc9}=_0x3fd30b,_0x221204=(_0x3bc192=(_0x3f6615=_0x19f479['customRanges'])==null?void 0x0:_0x3f6615[_0x5cc2e3(0x1f4)](_0x3c62fb=>_0x3c62fb[_0x5cc2e3(0x1b7)]===_0x30c81c[_0x5cc2e3(0x1f8)])[_0x5cc2e3(0x1c8)](_0x37cebc=>_0x37cebc['rangeId']))!=null?_0x3bc192:[],_0x3298f2=JSON['stringify'](_0x19f479),_0x255348=_0x3fd30b[_0x5cc2e3(0x1b5)],_0x49c528=_0x3fd30b['id'],_0x37121b={'memberId':(await this['_sessionService']['requireSession'](_0x2c5cc9))[_0x5cc2e3(0x1a8)](),'unitId':_0x2c5cc9,'threadId':_0x255348,'mention':_0x221204,'content':_0x3298f2,'replyId':_0x49c528},_0x2357bc=await this[_0x5cc2e3(0x1bc)][_0x5cc2e3(0x1d1)](_0x5cc2e3(0x1e8)+_0x2c5cc9+'/edit',{'body':_0x37121b});return!_0x2357bc[_0x5cc2e3(0x1d6)][_0x5cc2e3(0x1d7)]||_0x2357bc[_0x5cc2e3(0x1d6)][_0x5cc2e3(0x1d7)]['code']===0x1;}async[_0x30f0a8(0x1fd)](_0x80a3dd){const _0x54b8b9=_0x30f0a8,{unitId:_0x4bf594}=_0x80a3dd,_0x21be83=_0x80a3dd[_0x54b8b9(0x1b5)],_0x54c515={'memberId':this[_0x54b8b9(0x1c3)]['getCurrentUser']()[_0x54b8b9(0x1b2)],'unitId':_0x4bf594,'threadId':_0x21be83,'solved':_0x80a3dd[_0x54b8b9(0x1f9)]?I[_0x54b8b9(0x1d4)]:I[_0x54b8b9(0x1b4)]},_0x1a725a=await this[_0x54b8b9(0x1bc)][_0x54b8b9(0x1d1)]('/universer-api/comment/unit/'+_0x4bf594+'/solved',{'body':_0x54c515});return!_0x1a725a[_0x54b8b9(0x1d6)]['error']||_0x1a725a[_0x54b8b9(0x1d6)]['error']['code']===0x1;}async[_0x30f0a8(0x1df)](_0x4cade8,_0x345545,_0x1c3659,_0x4aa1ff){const _0x33a048=_0x30f0a8,_0x4d9db4={'memberId':(await this['_sessionService'][_0x33a048(0x1fc)](_0x4cade8))['getMemberID'](),'threadId':_0x1c3659,'replyId':_0x4aa1ff,'unitId':_0x4cade8},_0x884d6=await this['_httpService'][_0x33a048(0x1d1)]('/universer-api/comment/unit/'+_0x4cade8+_0x33a048(0x1c9),{'body':_0x4d9db4});return!_0x884d6[_0x33a048(0x1d6)][_0x33a048(0x1d7)]||_0x884d6[_0x33a048(0x1d6)][_0x33a048(0x1d7)]['code']===0x1;}async[_0x30f0a8(0x1eb)](_0x1afb36,_0x1c43f7,_0x5827d9){const _0x1541d7=_0x30f0a8,_0x281460={'unitId':_0x1afb36,'threadId':_0x5827d9},_0x2ac879=await this[_0x1541d7(0x1bc)][_0x1541d7(0x1d1)](_0x1541d7(0x1e8)+_0x1afb36+_0x1541d7(0x1bf),{'body':_0x281460}),_0x3455c7=_0x5827d9[_0x1541d7(0x1c8)](_0x2b335e=>ee(_0x2ac879[_0x1541d7(0x1d6)][_0x1541d7(0x1e6)][_0x2b335e],_0x1afb36,_0x1c43f7))[_0x1541d7(0x1f4)](Boolean);return Object[_0x1541d7(0x1ea)](_0x2ac879[_0x1541d7(0x1d6)][_0x1541d7(0x1bd)])[_0x1541d7(0x1d3)](_0x31e699=>{this['_userService']['addUser'](_0x31e699);}),_0x3455c7;}[_0x30f0a8(0x1e2)](_0x2f4e1f){return{'id':_0x2f4e1f['id'],'threadId':_0x2f4e1f['threadId'],'ref':_0x2f4e1f['ref']};}};S=Q([b(0x0,_0x55050b(_0x3f867)),b(0x1,_0x55050b(_0x1b8ddd)),b(0x2,_0x55050b(_0x1c6583))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2bd257,_0x2f742b,_0x30713f,_0x53bb55)=>{const _0x7b0d3b=_0x30f0a8;for(var _0x2b9406=_0x53bb55>0x1?void 0x0:_0x53bb55?re(_0x2f742b,_0x30713f):_0x2f742b,_0x46b2d9=_0x2bd257[_0x7b0d3b(0x1a7)]-0x1,_0x5154f8;_0x46b2d9>=0x0;_0x46b2d9--)(_0x5154f8=_0x2bd257[_0x46b2d9])&&(_0x2b9406=_0x5154f8(_0x2b9406)||_0x2b9406);return _0x2b9406;},M=(_0x3690bc,_0x3b7ea8)=>(_0x3af179,_0x3d5751)=>_0x3b7ea8(_0x3af179,_0x3d5751,_0x3690bc);let f=class extends _0x214298{constructor(_0x2846ef,_0x5eb479){const _0x23eac0=_0x30f0a8;super(),this['_threadCommentDataSourceService']=_0x2846ef,this[_0x23eac0(0x1f5)]=_0x5eb479,this[_0x23eac0(0x1ec)]();}[_0x30f0a8(0x1ec)](){const _0x9fb0df=_0x30f0a8;this[_0x9fb0df(0x1b3)][_0x9fb0df(0x206)]=this[_0x9fb0df(0x1f5)],this[_0x9fb0df(0x1b3)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x2dfa35),M(0x1,_0x55050b(S))],f);var se=Object['defineProperty'],oe=Object[_0x30f0a8(0x205)],ne=(_0x296719,_0x2c42c7,_0x271e2a)=>_0x2c42c7 in _0x296719?se(_0x296719,_0x2c42c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x271e2a}):_0x296719[_0x2c42c7]=_0x271e2a,ie=(_0x16b848,_0x3428f1,_0x5854e0,_0x4cf7b5)=>{const _0x42f1ed=_0x30f0a8;for(var _0x2449b5=_0x4cf7b5>0x1?void 0x0:_0x4cf7b5?oe(_0x3428f1,_0x5854e0):_0x3428f1,_0x2f4bc7=_0x16b848[_0x42f1ed(0x1a7)]-0x1,_0x41af97;_0x2f4bc7>=0x0;_0x2f4bc7--)(_0x41af97=_0x16b848[_0x2f4bc7])&&(_0x2449b5=_0x41af97(_0x2449b5)||_0x2449b5);return _0x2449b5;},N=(_0x2afab6,_0x39bec5)=>(_0x1b7e1a,_0x4851fb)=>_0x39bec5(_0x1b7e1a,_0x4851fb,_0x2afab6),$=(_0x46da9a,_0x28443f,_0x209868)=>ne(_0x46da9a,typeof _0x28443f!=_0x30f0a8(0x1c6)?_0x28443f+'':_0x28443f,_0x209868);let g=class extends _0x37af55{constructor(_0x5a3b4e=O,_0x576990,_0xb98a64){const _0x5cce40=_0x30f0a8;super(),this[_0x5cce40(0x1b0)]=_0x5a3b4e,this[_0x5cce40(0x201)]=_0x576990,this[_0x5cce40(0x1ff)]=_0xb98a64;const {..._0x581983}=_0x522ad0({},O,this['_config']);this['_configService'][_0x5cce40(0x1cb)](z,_0x581983);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x4f34cb=>{const _0x36fa89=_0x4237;this[_0x36fa89(0x201)]['add'](_0x4f34cb);});}[_0x30f0a8(0x1cd)](){const _0x512a55=_0x30f0a8;this[_0x512a55(0x201)]['get'](f),this[_0x512a55(0x201)][_0x512a55(0x1dc)](_);}};$(g,_0x30f0a8(0x1ba),W),$(g,_0x30f0a8(0x1cc),_0x57d252[_0x30f0a8(0x1f6)]),g=ie([_0x2f745a(_0x1c5da8,_0x1bac31,_0x11e776),N(0x1,_0x55050b(_0x32158c)),N(0x2,_0x3d811e)],g);function _0x4237(_0x43a8f8,_0x1fde3a){_0x43a8f8=_0x43a8f8-0x1a4;const _0x32be22=_0x32be();let _0x423759=_0x32be22[_0x43a8f8];return _0x423759;}export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1db4(_0x2b44be,_0x19edba){_0x2b44be=_0x2b44be-0xf9;const _0x17c55a=_0x17c5();let _0x1db470=_0x17c55a[_0x2b44be];return _0x1db470;}const _0x452b23=_0x1db4;(function(_0x49ca60,_0x45c3b0){const _0x4a8af5=_0x1db4,_0x218d70=_0x49ca60();while(!![]){try{const _0x377ab4=parseInt(_0x4a8af5(0x11b))/0x1+-parseInt(_0x4a8af5(0x128))/0x2*(parseInt(_0x4a8af5(0x115))/0x3)+parseInt(_0x4a8af5(0x104))/0x4+-parseInt(_0x4a8af5(0x132))/0x5*(-parseInt(_0x4a8af5(0x126))/0x6)+-parseInt(_0x4a8af5(0x107))/0x7+-parseInt(_0x4a8af5(0x10a))/0x8+parseInt(_0x4a8af5(0x117))/0x9;if(_0x377ab4===_0x45c3b0)break;else _0x218d70['push'](_0x218d70['shift']());}catch(_0x47539c){_0x218d70['push'](_0x218d70['shift']());}}}(_0x17c5,0xec0b8));import{CommentService as _0x12c24f,CollaborationSessionService as _0x395936,UniverCollaborationClientPlugin as _0x354fd9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3ba035}from'@univerjs-pro/license';import{dayjs as _0xe06112,UserManagerService as _0x48d6a8,Inject as _0x437e4f,Injector as _0x50e8a0,Disposable as _0x4f537f,CustomRangeType as _0x128584,UniverInstanceType as _0x41babf,DependentOn as _0x49f4f5,IConfigService as _0x4181a7,Plugin as _0x37f55a,merge as _0x127711}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36ebce}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3e56e2,IThreadCommentDataSourceService as _0x33be8b}from'@univerjs/thread-comment';import{bufferTime as _0x458aca}from'rxjs';import{HTTPService as _0x37c7be}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x17c5(){const _0x762096=['get','add','onReady','map','addComment','getCurrentUser','setConfig','customRanges','unitId','stringify','_threadCommentDataSourceService','replies','Reply','root','/add','resolved','/reply','replyId','disposeWithMe','reply','delete','userId','YYYY/MM/DD\x20HH:mm','dataSource','createTimestamp','/solved','commentUpdate$','subscribe','Add','comments','_threadCommentModel','format','onStarting','code','solved','_commentService','deleteComment','_config','defineProperty','_configService','userID','Delete','requireSession','UNIVER_UNKNOWN','Solved','getOwnPropertyDescriptor','values','5244256aaUntP','OpenOrReOpen','Solve','13519107xfKIVV','symbol','comment','1519848WYhYRI','parse','UNRECOGNIZED','length','_sessionService','getMemberID','updateComment','personId','thread-comment-data-source.config','threadId','listComments','3ZlkCIH','syncUpdateMutationToColla','11280600tmtsGf','resolveComment','_threadCommentDataSource','getUnit','314846PavOvV','COMMENT','Edit','addUser','/universer-api/comment/unit/','pluginName','_initUserSync','/list','user','rangeType','filter','6clGQyu','_injector','2378942HBpgKQ','Unknown','post','_httpService','/universer-api/user/list','payload','forEach','getUser','_init','body','6991415ejHbDA','slice','_initDataSource','parentId','error','content','_userService','type','rangeId'];_0x17c5=function(){return _0x762096;};return _0x17c5();}var I=(_0x10eddc=>(_0x10eddc[_0x10eddc[_0x452b23(0x105)]=0x0]='OpenOrReOpen',_0x10eddc[_0x10eddc[_0x452b23(0x101)]=0x1]=_0x452b23(0x101),_0x10eddc[_0x10eddc[_0x452b23(0x10c)]=-0x1]='UNRECOGNIZED',_0x10eddc))(I||{}),v=(_0x569aa1=>(_0x569aa1[_0x569aa1[_0x452b23(0x129)]=0x0]=_0x452b23(0x129),_0x569aa1[_0x569aa1[_0x452b23(0x157)]=0x1]=_0x452b23(0x157),_0x569aa1[_0x569aa1[_0x452b23(0x147)]=0x2]=_0x452b23(0x147),_0x569aa1[_0x569aa1[_0x452b23(0x11d)]=0x3]=_0x452b23(0x11d),_0x569aa1[_0x569aa1[_0x452b23(0xfe)]=0x4]=_0x452b23(0xfe),_0x569aa1[_0x569aa1[_0x452b23(0x106)]=0x5]='Solve',_0x569aa1[_0x569aa1[_0x452b23(0x10c)]=-0x1]=_0x452b23(0x10c),_0x569aa1))(v||{});const y=_0x3f4573=>_0xe06112(new Date(+_0x3f4573))[_0x452b23(0x15a)](_0x452b23(0x151)),B=async(_0x1e7ec3,_0x2b0b8d)=>{const _0x3a75d8=_0x452b23,_0x37a653=_0x1e7ec3['get'](_0x48d6a8),_0xc7daa2=_0x1e7ec3['get'](_0x37c7be);_0x2b0b8d['forEach'](_0x2f2895=>{const _0x1c235c=_0x1db4;_0x37a653[_0x1c235c(0x12f)](_0x2f2895)&&_0x2b0b8d[_0x1c235c(0x14f)](_0x2f2895);}),_0x2b0b8d['size']&&(await _0xc7daa2[_0x3a75d8(0x13b)](_0x3a75d8(0x12c),{'params':{'userIDs':[..._0x2b0b8d]}}))[_0x3a75d8(0x131)]['users'][_0x3a75d8(0x12e)](_0x3f0e93=>{const _0x8a7620=_0x3a75d8;_0x3f0e93&&_0x37a653[_0x8a7620(0x11e)](_0x3f0e93);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x1c7b92,_0x4c514b,_0x1f7845,_0x37e144)=>{for(var _0x2ed57f=_0x37e144>0x1?void 0x0:_0x37e144?K(_0x4c514b,_0x1f7845):_0x4c514b,_0x130caa=_0x1c7b92['length']-0x1,_0x20e6e0;_0x130caa>=0x0;_0x130caa--)(_0x20e6e0=_0x1c7b92[_0x130caa])&&(_0x2ed57f=_0x20e6e0(_0x2ed57f)||_0x2ed57f);return _0x2ed57f;},p=(_0x5af7b0,_0x493324)=>(_0x5c53d8,_0x508315)=>_0x493324(_0x5c53d8,_0x508315,_0x5af7b0);let _=class extends _0x4f537f{constructor(_0x507d4a,_0x1402d9,_0x203982,_0xedaf3c){const _0x5f530c=_0x452b23;super(),this[_0x5f530c(0x15e)]=_0x507d4a,this[_0x5f530c(0x159)]=_0x1402d9,this[_0x5f530c(0x138)]=_0x203982,this[_0x5f530c(0x127)]=_0xedaf3c,this[_0x5f530c(0x130)](),this[_0x5f530c(0x121)]();}['_initUserSync'](){const _0x53a591=_0x452b23;this[_0x53a591(0x14d)](this[_0x53a591(0x159)][_0x53a591(0x155)]['pipe'](_0x458aca(0x10))[_0x53a591(0x156)](_0x179017=>{const _0x201e87=_0x53a591,_0x2c2a9a=new Set();_0x179017[_0x201e87(0x12e)](_0x516510=>{const _0x12be3d=_0x201e87;if(_0x516510['type']===_0x12be3d(0x13c)){const _0x13152f=_0x516510[_0x12be3d(0x12d)][_0x12be3d(0x111)];_0x2c2a9a[_0x12be3d(0x13c)](_0x13152f);}}),B(this[_0x201e87(0x127)],_0x2c2a9a);}));}[_0x452b23(0x130)](){const _0x5d1f11=_0x452b23;this['disposeWithMe'](this['_commentService'][_0x5d1f11(0x155)][_0x5d1f11(0x156)](async _0x3031b1=>{const _0x316597=_0x5d1f11;var _0x2cc02c,_0x3b51d2,_0x37cab6,_0x5e8d73;const _0x268e04=(_0x2cc02c=this['_threadCommentModel'][_0x316597(0x11a)](_0x3031b1[_0x316597(0x143)])['find'](_0x473154=>_0x473154[_0x316597(0x113)]===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x2cc02c['root'];if(!_0x268e04)return;const {unitId:_0x5b3d28,subUnitId:_0x435b55}=_0x268e04;switch(_0x3031b1[_0x316597(0x123)]&&this['_userService'][_0x316597(0x11e)](_0x3031b1[_0x316597(0x123)]),_0x3031b1[_0x316597(0x139)]){case v[_0x316597(0x157)]:break;case v[_0x316597(0x147)]:{this['_threadCommentModel'][_0x316597(0x13f)](_0x5b3d28,_0x435b55,{'unitId':_0x5b3d28,'subUnitId':_0x435b55,'ref':'','id':_0x3031b1[_0x316597(0x14c)],'dT':y(+_0x3031b1[_0x316597(0x153)]),'threadId':_0x3031b1[_0x316597(0x113)],'personId':(_0x37cab6=(_0x3b51d2=_0x3031b1[_0x316597(0x123)])==null?void 0x0:_0x3b51d2[_0x316597(0xfd)])!=null?_0x37cab6:_0x3031b1[_0x316597(0x150)],'text':JSON[_0x316597(0x10b)](_0x3031b1[_0x316597(0x137)]),'parentId':_0x268e04['id']});break;}case v[_0x316597(0xfe)]:{const _0xeaa323=this[_0x316597(0x159)]['getComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);_0xeaa323&&_0xeaa323[_0x316597(0x135)]&&this[_0x316597(0x159)]['deleteComment'](_0x5b3d28,_0x435b55,_0x3031b1[_0x316597(0x14c)]);break;}case v[_0x316597(0x11d)]:{this[_0x316597(0x159)][_0x316597(0x110)](_0x5b3d28,_0x435b55,{'commentId':_0x3031b1[_0x316597(0x14c)],'text':JSON['parse'](_0x3031b1[_0x316597(0x137)])});break;}case v[_0x316597(0x106)]:{const _0x854ef1=(_0x5e8d73=this[_0x316597(0x159)]['getUnit'](_0x3031b1[_0x316597(0x143)])['find'](_0x2f3487=>_0x2f3487['threadId']===_0x3031b1[_0x316597(0x113)]))==null?void 0x0:_0x5e8d73[_0x316597(0x148)];_0x854ef1&&this[_0x316597(0x159)][_0x316597(0x118)](_0x5b3d28,_0x435b55,_0x854ef1['id'],_0x3031b1['solved']===I[_0x316597(0x101)]);break;}}}));}};_=V([p(0x0,_0x437e4f(_0x12c24f)),p(0x1,_0x437e4f(_0x3e56e2)),p(0x2,_0x437e4f(_0x48d6a8)),p(0x3,_0x437e4f(_0x50e8a0))],_);const z=_0x452b23(0x112),O={};var k=Object[_0x452b23(0x102)],Q=(_0x41e29a,_0x2956a7,_0x2595eb,_0x36088d)=>{for(var _0xaad226=_0x36088d>0x1?void 0x0:_0x36088d?k(_0x2956a7,_0x2595eb):_0x2956a7,_0x40a588=_0x41e29a['length']-0x1,_0x133b4d;_0x40a588>=0x0;_0x40a588--)(_0x133b4d=_0x41e29a[_0x40a588])&&(_0xaad226=_0x133b4d(_0xaad226)||_0xaad226);return _0xaad226;},b=(_0x4f7c9a,_0x168885)=>(_0x2bd8fc,_0x37a43b)=>_0x168885(_0x2bd8fc,_0x37a43b,_0x4f7c9a);function X(_0x350da9,_0x151f36){const _0x509d5d=_0x452b23,_0xa08899=_0x350da9[_0x509d5d(0x146)][0x0];return{..._0x151f36,'id':_0xa08899[_0x509d5d(0x14c)],'resolved':_0x350da9[_0x509d5d(0x15d)]===0x1,'dT':y(_0xa08899[_0x509d5d(0x153)]),'personId':_0xa08899[_0x509d5d(0x150)],'threadId':_0xa08899[_0x509d5d(0x113)]};}function ee(_0x1ddb27,_0x1e05f0,_0x306943){const _0x1128d1=_0x452b23;var _0x5dca3b,_0x169bd6;if(((_0x169bd6=(_0x5dca3b=_0x1ddb27==null?void 0x0:_0x1ddb27[_0x1128d1(0x146)])==null?void 0x0:_0x5dca3b['length'])!=null?_0x169bd6:0x0)>0x0){const _0x3fb377=(_0x52495b,_0x297119)=>({'id':_0x52495b['replyId'],'threadId':_0x52495b[_0x1128d1(0x113)],'dT':y(_0x52495b[_0x1128d1(0x153)]),'personId':_0x52495b['userId'],'resolved':_0x1ddb27[_0x1128d1(0x15d)]===I['Solved'],'unitId':_0x1e05f0,'subUnitId':_0x306943,'text':JSON[_0x1128d1(0x10b)](_0x52495b['content']),'parentId':_0x297119}),_0x2d13c4=_0x3fb377(_0x1ddb27[_0x1128d1(0x146)][0x0]);return{..._0x2d13c4,'children':_0x1ddb27['replies'][_0x1128d1(0x133)](0x1)[_0x1128d1(0x13e)](_0x3ef85a=>_0x3fb377(_0x3ef85a,_0x2d13c4['id']))};}return null;}let S=class{constructor(_0x7d1fcd,_0xce3f7,_0x157859){const _0x442d80=_0x452b23;this[_0x442d80(0x12b)]=_0x7d1fcd,this['_userService']=_0xce3f7,this[_0x442d80(0x10e)]=_0x157859;}async[_0x452b23(0x13f)](_0x19b0d3){const _0x5e68aa=_0x452b23;var _0x27e403,_0x29b3af;const {parentId:_0x36f965,unitId:_0x10ccae,text:_0x334a8b,threadId:_0x58c016}=_0x19b0d3,_0x1ed14e=(_0x29b3af=(_0x27e403=_0x334a8b[_0x5e68aa(0x142)])==null?void 0x0:_0x27e403[_0x5e68aa(0x125)](_0x50765c=>_0x50765c[_0x5e68aa(0x124)]===_0x128584[_0x5e68aa(0x11c)])[_0x5e68aa(0x13e)](_0xf4ee76=>_0xf4ee76['rangeId']))!=null?_0x29b3af:[],_0x3a8913=JSON['stringify'](_0x334a8b),_0x324d21=(await this[_0x5e68aa(0x10e)]['requireSession'](_0x10ccae))[_0x5e68aa(0x10f)]();if(_0x36f965){const _0x46402b={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e,'threadId':_0x58c016},_0x60c34b=(await this[_0x5e68aa(0x12b)][_0x5e68aa(0x12a)](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x14b),{'body':_0x46402b}))[_0x5e68aa(0x131)][_0x5e68aa(0x14e)];return{..._0x19b0d3,'id':_0x60c34b['replyId'],'dT':_0xe06112(+_0x60c34b['createTimestamp'])[_0x5e68aa(0x15a)](_0x5e68aa(0x151)),'personId':_0x60c34b[_0x5e68aa(0x150)]};}else{const _0x21ed5c={'memberId':_0x324d21,'unitId':_0x10ccae,'content':_0x3a8913,'mention':_0x1ed14e},_0x438825=await this['_httpService']['post'](_0x5e68aa(0x11f)+_0x10ccae+_0x5e68aa(0x149),{'body':_0x21ed5c});return X(_0x438825[_0x5e68aa(0x131)][_0x5e68aa(0x109)],_0x19b0d3);}}async[_0x452b23(0x110)](_0x42822e){const _0xd9dd6c=_0x452b23;var _0x38626c,_0x48240f;const {text:_0x1825a0,unitId:_0x449a64}=_0x42822e,_0x2037a7=(_0x48240f=(_0x38626c=_0x1825a0['customRanges'])==null?void 0x0:_0x38626c[_0xd9dd6c(0x125)](_0x26bb4e=>_0x26bb4e[_0xd9dd6c(0x124)]===_0x128584[_0xd9dd6c(0x11c)])[_0xd9dd6c(0x13e)](_0xf3484e=>_0xf3484e[_0xd9dd6c(0x13a)]))!=null?_0x48240f:[],_0x585f4a=JSON[_0xd9dd6c(0x144)](_0x1825a0),_0x2d8dde=_0x42822e[_0xd9dd6c(0x113)],_0x23f0c7=_0x42822e['id'],_0x5426c7={'memberId':(await this[_0xd9dd6c(0x10e)]['requireSession'](_0x449a64))[_0xd9dd6c(0x10f)](),'unitId':_0x449a64,'threadId':_0x2d8dde,'mention':_0x2037a7,'content':_0x585f4a,'replyId':_0x23f0c7},_0x56e7a7=await this['_httpService']['post'](_0xd9dd6c(0x11f)+_0x449a64+'/edit',{'body':_0x5426c7});return!_0x56e7a7['body'][_0xd9dd6c(0x136)]||_0x56e7a7['body'][_0xd9dd6c(0x136)][_0xd9dd6c(0x15c)]===0x1;}async[_0x452b23(0x118)](_0x3b4fe3){const _0xa112e8=_0x452b23,{unitId:_0x43bc74}=_0x3b4fe3,_0x3d1767=_0x3b4fe3[_0xa112e8(0x113)],_0x1b3b62={'memberId':this[_0xa112e8(0x138)][_0xa112e8(0x140)]()['userID'],'unitId':_0x43bc74,'threadId':_0x3d1767,'solved':_0x3b4fe3[_0xa112e8(0x14a)]?I[_0xa112e8(0x101)]:I[_0xa112e8(0x105)]},_0xc7700d=await this[_0xa112e8(0x12b)][_0xa112e8(0x12a)]('/universer-api/comment/unit/'+_0x43bc74+_0xa112e8(0x154),{'body':_0x1b3b62});return!_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]||_0xc7700d[_0xa112e8(0x131)][_0xa112e8(0x136)]['code']===0x1;}async[_0x452b23(0xf9)](_0xdc9ee5,_0x2f425f,_0x2a74cb,_0x27dc83){const _0x593d3f=_0x452b23,_0x23fbea={'memberId':(await this['_sessionService'][_0x593d3f(0xff)](_0xdc9ee5))['getMemberID'](),'threadId':_0x2a74cb,'replyId':_0x27dc83,'unitId':_0xdc9ee5},_0x556321=await this[_0x593d3f(0x12b)][_0x593d3f(0x12a)](_0x593d3f(0x11f)+_0xdc9ee5+'/delete',{'body':_0x23fbea});return!_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)]||_0x556321[_0x593d3f(0x131)][_0x593d3f(0x136)][_0x593d3f(0x15c)]===0x1;}async[_0x452b23(0x114)](_0x304ca5,_0x40c13a,_0x1f35f7){const _0x2ea717=_0x452b23,_0x3639bb={'unitId':_0x304ca5,'threadId':_0x1f35f7},_0x144cc6=await this[_0x2ea717(0x12b)][_0x2ea717(0x12a)](_0x2ea717(0x11f)+_0x304ca5+_0x2ea717(0x122),{'body':_0x3639bb}),_0x343d2c=_0x1f35f7[_0x2ea717(0x13e)](_0x2f8761=>ee(_0x144cc6['body'][_0x2ea717(0x158)][_0x2f8761],_0x304ca5,_0x40c13a))[_0x2ea717(0x125)](Boolean);return Object[_0x2ea717(0x103)](_0x144cc6['body']['users'])['forEach'](_0x3b7e69=>{const _0x435c67=_0x2ea717;this[_0x435c67(0x138)][_0x435c67(0x11e)](_0x3b7e69);}),_0x343d2c;}['saveCommentToSnapshot'](_0x7a6e89){const _0x73331c=_0x452b23;return{'id':_0x7a6e89['id'],'threadId':_0x7a6e89[_0x73331c(0x113)],'ref':_0x7a6e89['ref']};}};S=Q([b(0x0,_0x437e4f(_0x37c7be)),b(0x1,_0x437e4f(_0x48d6a8)),b(0x2,_0x437e4f(_0x395936))],S);var re=Object[_0x452b23(0x102)],te=(_0x29be48,_0x2c84ec,_0x4a7ebd,_0x1af60a)=>{const _0x42d23f=_0x452b23;for(var _0x5391e7=_0x1af60a>0x1?void 0x0:_0x1af60a?re(_0x2c84ec,_0x4a7ebd):_0x2c84ec,_0x70053c=_0x29be48[_0x42d23f(0x10d)]-0x1,_0x19d67d;_0x70053c>=0x0;_0x70053c--)(_0x19d67d=_0x29be48[_0x70053c])&&(_0x5391e7=_0x19d67d(_0x5391e7)||_0x5391e7);return _0x5391e7;},M=(_0x2ad0cf,_0x516c13)=>(_0x55be30,_0x24d0d2)=>_0x516c13(_0x55be30,_0x24d0d2,_0x2ad0cf);let f=class extends _0x4f537f{constructor(_0x5f2187,_0x347bd3){const _0x46b6b9=_0x452b23;super(),this[_0x46b6b9(0x145)]=_0x5f2187,this[_0x46b6b9(0x119)]=_0x347bd3,this['_initDataSource']();}[_0x452b23(0x134)](){const _0x2a12ca=_0x452b23;this[_0x2a12ca(0x145)][_0x2a12ca(0x152)]=this[_0x2a12ca(0x119)],this[_0x2a12ca(0x145)][_0x2a12ca(0x116)]=!0x1;}};f=te([M(0x0,_0x33be8b),M(0x1,_0x437e4f(S))],f);var se=Object[_0x452b23(0xfb)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x252929,_0x35f054,_0x39c7fd)=>_0x35f054 in _0x252929?se(_0x252929,_0x35f054,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39c7fd}):_0x252929[_0x35f054]=_0x39c7fd,ie=(_0x587562,_0x49e33e,_0x34a790,_0x194ee)=>{const _0x5029aa=_0x452b23;for(var _0x52634c=_0x194ee>0x1?void 0x0:_0x194ee?oe(_0x49e33e,_0x34a790):_0x49e33e,_0x3111eb=_0x587562[_0x5029aa(0x10d)]-0x1,_0x404025;_0x3111eb>=0x0;_0x3111eb--)(_0x404025=_0x587562[_0x3111eb])&&(_0x52634c=_0x404025(_0x52634c)||_0x52634c);return _0x52634c;},N=(_0x13861f,_0x59622a)=>(_0x2849c4,_0x218c94)=>_0x59622a(_0x2849c4,_0x218c94,_0x13861f),$=(_0x1138f2,_0x322a97,_0x2cc85b)=>ne(_0x1138f2,typeof _0x322a97!=_0x452b23(0x108)?_0x322a97+'':_0x322a97,_0x2cc85b);let g=class extends _0x37f55a{constructor(_0x3a6c21=O,_0x25385d,_0x48ead6){const _0x437700=_0x452b23;super(),this[_0x437700(0xfa)]=_0x3a6c21,this[_0x437700(0x127)]=_0x25385d,this[_0x437700(0xfc)]=_0x48ead6;const {..._0x2c64dc}=_0x127711({},O,this[_0x437700(0xfa)]);this[_0x437700(0xfc)][_0x437700(0x141)](z,_0x2c64dc);}[_0x452b23(0x15b)](){const _0x23a1ac=_0x452b23;[[S],[f],[_]][_0x23a1ac(0x12e)](_0x5d54e9=>{const _0x54a9c1=_0x23a1ac;this['_injector'][_0x54a9c1(0x13c)](_0x5d54e9);});}[_0x452b23(0x13d)](){const _0x17c8b4=_0x452b23;this[_0x17c8b4(0x127)][_0x17c8b4(0x13b)](f),this['_injector'][_0x17c8b4(0x13b)](_);}};$(g,_0x452b23(0x120),W),$(g,_0x452b23(0x139),_0x41babf[_0x452b23(0x100)]),g=ie([_0x49f4f5(_0x36ebce,_0x354fd9,_0x3ba035),N(0x1,_0x437e4f(_0x50e8a0)),N(0x2,_0x4181a7)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x30f0a8=_0x4237;(function(_0x22d320,_0x2f0368){const _0x52bd35=_0x4237,_0x3af3d5=_0x22d320();while(!![]){try{const _0x5b3c62=parseInt(_0x52bd35(0x1ab))/0x1*(parseInt(_0x52bd35(0x1c2))/0x2)+parseInt(_0x52bd35(0x1ce))/0x3*(-parseInt(_0x52bd35(0x1f1))/0x4)+parseInt(_0x52bd35(0x1e0))/0x5*(-parseInt(_0x52bd35(0x1fe))/0x6)+parseInt(_0x52bd35(0x1ad))/0x7+-parseInt(_0x52bd35(0x1ac))/0x8+parseInt(_0x52bd35(0x1ca))/0x9*(-parseInt(_0x52bd35(0x1cf))/0xa)+parseInt(_0x52bd35(0x1be))/0xb;if(_0x5b3c62===_0x2f0368)break;else _0x3af3d5['push'](_0x3af3d5['shift']());}catch(_0x240cba){_0x3af3d5['push'](_0x3af3d5['shift']());}}}(_0x32be,0x8c230));import{CommentService as _0x46763f,CollaborationSessionService as _0x1c6583,UniverCollaborationClientPlugin as _0x1bac31}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x11e776}from'@univerjs-pro/license';import{dayjs as _0x195604,UserManagerService as _0x1b8ddd,Inject as _0x55050b,Injector as _0x32158c,Disposable as _0x214298,CustomRangeType as _0x30c81c,UniverInstanceType as _0x57d252,DependentOn as _0x2f745a,IConfigService as _0x3d811e,Plugin as _0x37af55,merge as _0x522ad0}from'@univerjs/core';function _0x32be(){const _0x43294f=['_injector','UNRECOGNIZED','commentUpdate$','updateComment','getOwnPropertyDescriptor','dataSource','Unknown','replyId','solved','personId','root','getUnit','Reply','length','getMemberID','reply','userId','2ypqZGJ','4764032isNECI','679224UpiuhV','replies','delete','_config','user','userID','_threadCommentDataSourceService','OpenOrReOpen','threadId','Edit','rangeType','createTimestamp','Delete','pluginName','_sessionService','_httpService','users','10097934VudKrl','/list','add','_init','808664OfudHA','_userService','_threadCommentModel','parse','symbol','slice','map','/delete','738TaymGO','setConfig','type','onReady','3iVFCXW','72880ZuCOqt','getComment','post','payload','forEach','Solved','disposeWithMe','body','error','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','/reply','YYYY/MM/DD\x20HH:mm','get','stringify','format','deleteComment','555loLODe','subscribe','saveCommentToSnapshot','Add','size','comment','comments','thread-comment-data-source.config','/universer-api/comment/unit/','content','values','listComments','_initDataSource','find','addComment','customRanges','parentId','58892zFHRUb','_commentService','/add','filter','_threadCommentDataSource','UNIVER_UNKNOWN','addUser','COMMENT','resolved','Solve','_initUserSync','requireSession','resolveComment','2262lVvdab','_configService','unitId'];_0x32be=function(){return _0x43294f;};return _0x32be();}import{UniverThreadCommentUIPlugin as _0x1c5da8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10a242,IThreadCommentDataSourceService as _0x2dfa35}from'@univerjs/thread-comment';import{bufferTime as _0x40b52a}from'rxjs';import{HTTPService as _0x3f867}from'@univerjs/network';const W=_0x30f0a8(0x1d8);var I=(_0x168d6b=>(_0x168d6b[_0x168d6b[_0x30f0a8(0x1b4)]=0x0]=_0x30f0a8(0x1b4),_0x168d6b[_0x168d6b[_0x30f0a8(0x1d4)]=0x1]='Solved',_0x168d6b[_0x168d6b[_0x30f0a8(0x202)]=-0x1]=_0x30f0a8(0x202),_0x168d6b))(I||{}),v=(_0x2bbf6f=>(_0x2bbf6f[_0x2bbf6f['Unknown']=0x0]=_0x30f0a8(0x207),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1e3)]=0x1]=_0x30f0a8(0x1e3),_0x2bbf6f[_0x2bbf6f['Reply']=0x2]=_0x30f0a8(0x1a6),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1b6)]=0x3]='Edit',_0x2bbf6f[_0x2bbf6f['Delete']=0x4]=_0x30f0a8(0x1b9),_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x1fa)]=0x5]='Solve',_0x2bbf6f[_0x2bbf6f[_0x30f0a8(0x202)]=-0x1]=_0x30f0a8(0x202),_0x2bbf6f))(v||{});const y=_0x370e07=>_0x195604(new Date(+_0x370e07))[_0x30f0a8(0x1de)](_0x30f0a8(0x1db)),B=async(_0x27c79a,_0xe1d543)=>{const _0x368757=_0x30f0a8,_0x3545e0=_0x27c79a[_0x368757(0x1dc)](_0x1b8ddd),_0x124dd0=_0x27c79a[_0x368757(0x1dc)](_0x3f867);_0xe1d543[_0x368757(0x1d3)](_0x24eaf5=>{const _0x40c848=_0x368757;_0x3545e0['getUser'](_0x24eaf5)&&_0xe1d543[_0x40c848(0x1af)](_0x24eaf5);}),_0xe1d543[_0x368757(0x1e4)]&&(await _0x124dd0[_0x368757(0x1dc)]('/universer-api/user/list',{'params':{'userIDs':[..._0xe1d543]}}))[_0x368757(0x1d6)]['users'][_0x368757(0x1d3)](_0x14a845=>{_0x14a845&&_0x3545e0['addUser'](_0x14a845);});};var K=Object[_0x30f0a8(0x205)],V=(_0x27df89,_0xf619d1,_0x12cb55,_0x3d084c)=>{const _0x2cae8b=_0x30f0a8;for(var _0xf36819=_0x3d084c>0x1?void 0x0:_0x3d084c?K(_0xf619d1,_0x12cb55):_0xf619d1,_0xa48798=_0x27df89[_0x2cae8b(0x1a7)]-0x1,_0x19c99b;_0xa48798>=0x0;_0xa48798--)(_0x19c99b=_0x27df89[_0xa48798])&&(_0xf36819=_0x19c99b(_0xf36819)||_0xf36819);return _0xf36819;},p=(_0x169112,_0x4eabc1)=>(_0x297079,_0x209377)=>_0x4eabc1(_0x297079,_0x209377,_0x169112);let _=class extends _0x214298{constructor(_0x5074cb,_0x5f06bc,_0x49ad29,_0x56cc92){const _0x8e99f1=_0x30f0a8;super(),this[_0x8e99f1(0x1f2)]=_0x5074cb,this['_threadCommentModel']=_0x5f06bc,this[_0x8e99f1(0x1c3)]=_0x49ad29,this[_0x8e99f1(0x201)]=_0x56cc92,this['_init'](),this[_0x8e99f1(0x1fb)]();}[_0x30f0a8(0x1fb)](){const _0x3ab467=_0x30f0a8;this[_0x3ab467(0x1d5)](this['_threadCommentModel'][_0x3ab467(0x203)]['pipe'](_0x40b52a(0x10))[_0x3ab467(0x1e1)](_0x1abcbf=>{const _0xf26588=_0x3ab467,_0x1f2749=new Set();_0x1abcbf[_0xf26588(0x1d3)](_0x4053c0=>{const _0x4e7053=_0xf26588;if(_0x4053c0[_0x4e7053(0x1cc)]===_0x4e7053(0x1c0)){const _0x2d9b48=_0x4053c0[_0x4e7053(0x1d2)][_0x4e7053(0x20a)];_0x1f2749['add'](_0x2d9b48);}}),B(this[_0xf26588(0x201)],_0x1f2749);}));}[_0x30f0a8(0x1c1)](){const _0x10fa06=_0x30f0a8;this[_0x10fa06(0x1d5)](this['_commentService'][_0x10fa06(0x203)][_0x10fa06(0x1e1)](async _0x174376=>{const _0x53c931=_0x10fa06;var _0xbeed10,_0x3429ad,_0x273d57,_0x168091;const _0x481f1c=(_0xbeed10=this[_0x53c931(0x1c4)]['getUnit'](_0x174376[_0x53c931(0x200)])[_0x53c931(0x1ed)](_0x593308=>_0x593308[_0x53c931(0x1b5)]===_0x174376[_0x53c931(0x1b5)]))==null?void 0x0:_0xbeed10[_0x53c931(0x1a4)];if(!_0x481f1c)return;const {unitId:_0x1d6718,subUnitId:_0x301dc2}=_0x481f1c;switch(_0x174376[_0x53c931(0x1b1)]&&this['_userService'][_0x53c931(0x1f7)](_0x174376[_0x53c931(0x1b1)]),_0x174376['type']){case v[_0x53c931(0x1e3)]:break;case v[_0x53c931(0x1a6)]:{this[_0x53c931(0x1c4)][_0x53c931(0x1ee)](_0x1d6718,_0x301dc2,{'unitId':_0x1d6718,'subUnitId':_0x301dc2,'ref':'','id':_0x174376[_0x53c931(0x208)],'dT':y(+_0x174376['createTimestamp']),'threadId':_0x174376[_0x53c931(0x1b5)],'personId':(_0x273d57=(_0x3429ad=_0x174376['user'])==null?void 0x0:_0x3429ad[_0x53c931(0x1b2)])!=null?_0x273d57:_0x174376[_0x53c931(0x1aa)],'text':JSON[_0x53c931(0x1c5)](_0x174376[_0x53c931(0x1e9)]),'parentId':_0x481f1c['id']});break;}case v[_0x53c931(0x1b9)]:{const _0x375f7c=this[_0x53c931(0x1c4)][_0x53c931(0x1d0)](_0x1d6718,_0x301dc2,_0x174376[_0x53c931(0x208)]);_0x375f7c&&_0x375f7c[_0x53c931(0x1f0)]&&this[_0x53c931(0x1c4)][_0x53c931(0x1df)](_0x1d6718,_0x301dc2,_0x174376[_0x53c931(0x208)]);break;}case v[_0x53c931(0x1b6)]:{this[_0x53c931(0x1c4)][_0x53c931(0x204)](_0x1d6718,_0x301dc2,{'commentId':_0x174376[_0x53c931(0x208)],'text':JSON[_0x53c931(0x1c5)](_0x174376[_0x53c931(0x1e9)])});break;}case v[_0x53c931(0x1fa)]:{const _0x233ccf=(_0x168091=this[_0x53c931(0x1c4)][_0x53c931(0x1a5)](_0x174376[_0x53c931(0x200)])[_0x53c931(0x1ed)](_0x115029=>_0x115029[_0x53c931(0x1b5)]===_0x174376[_0x53c931(0x1b5)]))==null?void 0x0:_0x168091[_0x53c931(0x1a4)];_0x233ccf&&this[_0x53c931(0x1c4)][_0x53c931(0x1fd)](_0x1d6718,_0x301dc2,_0x233ccf['id'],_0x174376[_0x53c931(0x209)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x55050b(_0x46763f)),p(0x1,_0x55050b(_0x10a242)),p(0x2,_0x55050b(_0x1b8ddd)),p(0x3,_0x55050b(_0x32158c))],_);const z=_0x30f0a8(0x1e7),O={};var k=Object[_0x30f0a8(0x205)],Q=(_0x4e0f6f,_0x2bfe01,_0x3f35e9,_0xb2e3c3)=>{const _0x518af0=_0x30f0a8;for(var _0x4dd363=_0xb2e3c3>0x1?void 0x0:_0xb2e3c3?k(_0x2bfe01,_0x3f35e9):_0x2bfe01,_0x5366de=_0x4e0f6f[_0x518af0(0x1a7)]-0x1,_0x1849a3;_0x5366de>=0x0;_0x5366de--)(_0x1849a3=_0x4e0f6f[_0x5366de])&&(_0x4dd363=_0x1849a3(_0x4dd363)||_0x4dd363);return _0x4dd363;},b=(_0x3b12a6,_0x3b9f69)=>(_0x26f417,_0x672114)=>_0x3b9f69(_0x26f417,_0x672114,_0x3b12a6);function X(_0xc109ff,_0xd8cd3b){const _0x34f004=_0x30f0a8,_0x22b966=_0xc109ff[_0x34f004(0x1ae)][0x0];return{..._0xd8cd3b,'id':_0x22b966[_0x34f004(0x208)],'resolved':_0xc109ff[_0x34f004(0x209)]===0x1,'dT':y(_0x22b966[_0x34f004(0x1b8)]),'personId':_0x22b966[_0x34f004(0x1aa)],'threadId':_0x22b966[_0x34f004(0x1b5)]};}function ee(_0x253eb5,_0x189b64,_0x5dfb10){const _0x5927bf=_0x30f0a8;var _0x4554bb,_0x2c22f2;if(((_0x2c22f2=(_0x4554bb=_0x253eb5==null?void 0x0:_0x253eb5[_0x5927bf(0x1ae)])==null?void 0x0:_0x4554bb[_0x5927bf(0x1a7)])!=null?_0x2c22f2:0x0)>0x0){const _0x2dfb10=(_0x33cb18,_0x544887)=>({'id':_0x33cb18[_0x5927bf(0x208)],'threadId':_0x33cb18['threadId'],'dT':y(_0x33cb18[_0x5927bf(0x1b8)]),'personId':_0x33cb18[_0x5927bf(0x1aa)],'resolved':_0x253eb5[_0x5927bf(0x209)]===I[_0x5927bf(0x1d4)],'unitId':_0x189b64,'subUnitId':_0x5dfb10,'text':JSON[_0x5927bf(0x1c5)](_0x33cb18[_0x5927bf(0x1e9)]),'parentId':_0x544887}),_0x523607=_0x2dfb10(_0x253eb5[_0x5927bf(0x1ae)][0x0]);return{..._0x523607,'children':_0x253eb5[_0x5927bf(0x1ae)][_0x5927bf(0x1c7)](0x1)[_0x5927bf(0x1c8)](_0x111d23=>_0x2dfb10(_0x111d23,_0x523607['id']))};}return null;}let S=class{constructor(_0x5b456f,_0x4de251,_0x38cf95){const _0x3d19d1=_0x30f0a8;this[_0x3d19d1(0x1bc)]=_0x5b456f,this[_0x3d19d1(0x1c3)]=_0x4de251,this[_0x3d19d1(0x1bb)]=_0x38cf95;}async[_0x30f0a8(0x1ee)](_0x1973bd){const _0x4dc71b=_0x30f0a8;var _0x5c9408,_0x1d5294;const {parentId:_0x83a250,unitId:_0x4f6654,text:_0x598eef,threadId:_0x2fba83}=_0x1973bd,_0x4e43dd=(_0x1d5294=(_0x5c9408=_0x598eef[_0x4dc71b(0x1ef)])==null?void 0x0:_0x5c9408[_0x4dc71b(0x1f4)](_0x1553fd=>_0x1553fd['rangeType']===_0x30c81c['COMMENT'])['map'](_0x3d7767=>_0x3d7767[_0x4dc71b(0x1d9)]))!=null?_0x1d5294:[],_0x41afd1=JSON[_0x4dc71b(0x1dd)](_0x598eef),_0x1d0f51=(await this[_0x4dc71b(0x1bb)]['requireSession'](_0x4f6654))['getMemberID']();if(_0x83a250){const _0x4887b2={'memberId':_0x1d0f51,'unitId':_0x4f6654,'content':_0x41afd1,'mention':_0x4e43dd,'threadId':_0x2fba83},_0x5ec48a=(await this[_0x4dc71b(0x1bc)][_0x4dc71b(0x1d1)](_0x4dc71b(0x1e8)+_0x4f6654+_0x4dc71b(0x1da),{'body':_0x4887b2}))[_0x4dc71b(0x1d6)][_0x4dc71b(0x1a9)];return{..._0x1973bd,'id':_0x5ec48a['replyId'],'dT':_0x195604(+_0x5ec48a[_0x4dc71b(0x1b8)])[_0x4dc71b(0x1de)](_0x4dc71b(0x1db)),'personId':_0x5ec48a[_0x4dc71b(0x1aa)]};}else{const _0x4cb695={'memberId':_0x1d0f51,'unitId':_0x4f6654,'content':_0x41afd1,'mention':_0x4e43dd},_0x111748=await this[_0x4dc71b(0x1bc)][_0x4dc71b(0x1d1)]('/universer-api/comment/unit/'+_0x4f6654+_0x4dc71b(0x1f3),{'body':_0x4cb695});return X(_0x111748[_0x4dc71b(0x1d6)][_0x4dc71b(0x1e5)],_0x1973bd);}}async[_0x30f0a8(0x204)](_0x3fd30b){const _0x5cc2e3=_0x30f0a8;var _0x3f6615,_0x3bc192;const {text:_0x19f479,unitId:_0x2c5cc9}=_0x3fd30b,_0x221204=(_0x3bc192=(_0x3f6615=_0x19f479['customRanges'])==null?void 0x0:_0x3f6615[_0x5cc2e3(0x1f4)](_0x3c62fb=>_0x3c62fb[_0x5cc2e3(0x1b7)]===_0x30c81c[_0x5cc2e3(0x1f8)])[_0x5cc2e3(0x1c8)](_0x37cebc=>_0x37cebc['rangeId']))!=null?_0x3bc192:[],_0x3298f2=JSON['stringify'](_0x19f479),_0x255348=_0x3fd30b[_0x5cc2e3(0x1b5)],_0x49c528=_0x3fd30b['id'],_0x37121b={'memberId':(await this['_sessionService']['requireSession'](_0x2c5cc9))[_0x5cc2e3(0x1a8)](),'unitId':_0x2c5cc9,'threadId':_0x255348,'mention':_0x221204,'content':_0x3298f2,'replyId':_0x49c528},_0x2357bc=await this[_0x5cc2e3(0x1bc)][_0x5cc2e3(0x1d1)](_0x5cc2e3(0x1e8)+_0x2c5cc9+'/edit',{'body':_0x37121b});return!_0x2357bc[_0x5cc2e3(0x1d6)][_0x5cc2e3(0x1d7)]||_0x2357bc[_0x5cc2e3(0x1d6)][_0x5cc2e3(0x1d7)]['code']===0x1;}async[_0x30f0a8(0x1fd)](_0x80a3dd){const _0x54b8b9=_0x30f0a8,{unitId:_0x4bf594}=_0x80a3dd,_0x21be83=_0x80a3dd[_0x54b8b9(0x1b5)],_0x54c515={'memberId':this[_0x54b8b9(0x1c3)]['getCurrentUser']()[_0x54b8b9(0x1b2)],'unitId':_0x4bf594,'threadId':_0x21be83,'solved':_0x80a3dd[_0x54b8b9(0x1f9)]?I[_0x54b8b9(0x1d4)]:I[_0x54b8b9(0x1b4)]},_0x1a725a=await this[_0x54b8b9(0x1bc)][_0x54b8b9(0x1d1)]('/universer-api/comment/unit/'+_0x4bf594+'/solved',{'body':_0x54c515});return!_0x1a725a[_0x54b8b9(0x1d6)]['error']||_0x1a725a[_0x54b8b9(0x1d6)]['error']['code']===0x1;}async[_0x30f0a8(0x1df)](_0x4cade8,_0x345545,_0x1c3659,_0x4aa1ff){const _0x33a048=_0x30f0a8,_0x4d9db4={'memberId':(await this['_sessionService'][_0x33a048(0x1fc)](_0x4cade8))['getMemberID'](),'threadId':_0x1c3659,'replyId':_0x4aa1ff,'unitId':_0x4cade8},_0x884d6=await this['_httpService'][_0x33a048(0x1d1)]('/universer-api/comment/unit/'+_0x4cade8+_0x33a048(0x1c9),{'body':_0x4d9db4});return!_0x884d6[_0x33a048(0x1d6)][_0x33a048(0x1d7)]||_0x884d6[_0x33a048(0x1d6)][_0x33a048(0x1d7)]['code']===0x1;}async[_0x30f0a8(0x1eb)](_0x1afb36,_0x1c43f7,_0x5827d9){const _0x1541d7=_0x30f0a8,_0x281460={'unitId':_0x1afb36,'threadId':_0x5827d9},_0x2ac879=await this[_0x1541d7(0x1bc)][_0x1541d7(0x1d1)](_0x1541d7(0x1e8)+_0x1afb36+_0x1541d7(0x1bf),{'body':_0x281460}),_0x3455c7=_0x5827d9[_0x1541d7(0x1c8)](_0x2b335e=>ee(_0x2ac879[_0x1541d7(0x1d6)][_0x1541d7(0x1e6)][_0x2b335e],_0x1afb36,_0x1c43f7))[_0x1541d7(0x1f4)](Boolean);return Object[_0x1541d7(0x1ea)](_0x2ac879[_0x1541d7(0x1d6)][_0x1541d7(0x1bd)])[_0x1541d7(0x1d3)](_0x31e699=>{this['_userService']['addUser'](_0x31e699);}),_0x3455c7;}[_0x30f0a8(0x1e2)](_0x2f4e1f){return{'id':_0x2f4e1f['id'],'threadId':_0x2f4e1f['threadId'],'ref':_0x2f4e1f['ref']};}};S=Q([b(0x0,_0x55050b(_0x3f867)),b(0x1,_0x55050b(_0x1b8ddd)),b(0x2,_0x55050b(_0x1c6583))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x2bd257,_0x2f742b,_0x30713f,_0x53bb55)=>{const _0x7b0d3b=_0x30f0a8;for(var _0x2b9406=_0x53bb55>0x1?void 0x0:_0x53bb55?re(_0x2f742b,_0x30713f):_0x2f742b,_0x46b2d9=_0x2bd257[_0x7b0d3b(0x1a7)]-0x1,_0x5154f8;_0x46b2d9>=0x0;_0x46b2d9--)(_0x5154f8=_0x2bd257[_0x46b2d9])&&(_0x2b9406=_0x5154f8(_0x2b9406)||_0x2b9406);return _0x2b9406;},M=(_0x3690bc,_0x3b7ea8)=>(_0x3af179,_0x3d5751)=>_0x3b7ea8(_0x3af179,_0x3d5751,_0x3690bc);let f=class extends _0x214298{constructor(_0x2846ef,_0x5eb479){const _0x23eac0=_0x30f0a8;super(),this['_threadCommentDataSourceService']=_0x2846ef,this[_0x23eac0(0x1f5)]=_0x5eb479,this[_0x23eac0(0x1ec)]();}[_0x30f0a8(0x1ec)](){const _0x9fb0df=_0x30f0a8;this[_0x9fb0df(0x1b3)][_0x9fb0df(0x206)]=this[_0x9fb0df(0x1f5)],this[_0x9fb0df(0x1b3)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x2dfa35),M(0x1,_0x55050b(S))],f);var se=Object['defineProperty'],oe=Object[_0x30f0a8(0x205)],ne=(_0x296719,_0x2c42c7,_0x271e2a)=>_0x2c42c7 in _0x296719?se(_0x296719,_0x2c42c7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x271e2a}):_0x296719[_0x2c42c7]=_0x271e2a,ie=(_0x16b848,_0x3428f1,_0x5854e0,_0x4cf7b5)=>{const _0x42f1ed=_0x30f0a8;for(var _0x2449b5=_0x4cf7b5>0x1?void 0x0:_0x4cf7b5?oe(_0x3428f1,_0x5854e0):_0x3428f1,_0x2f4bc7=_0x16b848[_0x42f1ed(0x1a7)]-0x1,_0x41af97;_0x2f4bc7>=0x0;_0x2f4bc7--)(_0x41af97=_0x16b848[_0x2f4bc7])&&(_0x2449b5=_0x41af97(_0x2449b5)||_0x2449b5);return _0x2449b5;},N=(_0x2afab6,_0x39bec5)=>(_0x1b7e1a,_0x4851fb)=>_0x39bec5(_0x1b7e1a,_0x4851fb,_0x2afab6),$=(_0x46da9a,_0x28443f,_0x209868)=>ne(_0x46da9a,typeof _0x28443f!=_0x30f0a8(0x1c6)?_0x28443f+'':_0x28443f,_0x209868);let g=class extends _0x37af55{constructor(_0x5a3b4e=O,_0x576990,_0xb98a64){const _0x5cce40=_0x30f0a8;super(),this[_0x5cce40(0x1b0)]=_0x5a3b4e,this[_0x5cce40(0x201)]=_0x576990,this[_0x5cce40(0x1ff)]=_0xb98a64;const {..._0x581983}=_0x522ad0({},O,this['_config']);this['_configService'][_0x5cce40(0x1cb)](z,_0x581983);}['onStarting'](){[[S],[f],[_]]['forEach'](_0x4f34cb=>{const _0x36fa89=_0x4237;this[_0x36fa89(0x201)]['add'](_0x4f34cb);});}[_0x30f0a8(0x1cd)](){const _0x512a55=_0x30f0a8;this[_0x512a55(0x201)]['get'](f),this[_0x512a55(0x201)][_0x512a55(0x1dc)](_);}};$(g,_0x30f0a8(0x1ba),W),$(g,_0x30f0a8(0x1cc),_0x57d252[_0x30f0a8(0x1f6)]),g=ie([_0x2f745a(_0x1c5da8,_0x1bac31,_0x11e776),N(0x1,_0x55050b(_0x32158c)),N(0x2,_0x3d811e)],g);function _0x4237(_0x43a8f8,_0x1fde3a){_0x43a8f8=_0x43a8f8-0x1a4;const _0x32be22=_0x32be();let _0x423759=_0x32be22[_0x43a8f8];return _0x423759;}export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x6550cd,_0x2eb606){const _0x1d761e=_0x15ba,_0xc5ea97=_0x6550cd();while(!![]){try{const _0x5dd57e=-parseInt(_0x1d761e(0x1a5))/0x1+parseInt(_0x1d761e(0x171))/0x2*(parseInt(_0x1d761e(0x12f))/0x3)+parseInt(_0x1d761e(0x197))/0x4*(parseInt(_0x1d761e(0x15e))/0x5)+-parseInt(_0x1d761e(0x14e))/0x6*(parseInt(_0x1d761e(0x1a6))/0x7)+-parseInt(_0x1d761e(0x149))/0x8*(parseInt(_0x1d761e(0x1a4))/0x9)+-parseInt(_0x1d761e(0x175))/0xa+parseInt(_0x1d761e(0x12c))/0xb;if(_0x5dd57e===_0x2eb606)break;else _0xc5ea97['push'](_0xc5ea97['shift']());}catch(_0x13960d){_0xc5ea97['push'](_0xc5ea97['shift']());}}}(_0x5cb6,0xe64fb),function(_0x5ea73e,_0x20781c){const _0x48a8df=_0x15ba;typeof exports==_0x48a8df(0x19b)&&typeof module<'u'?_0x20781c(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==_0x48a8df(0x189)&&define[_0x48a8df(0x18f)]?define([_0x48a8df(0x18d),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x48a8df(0x127),'@univerjs/thread-comment',_0x48a8df(0x15f),_0x48a8df(0x13b)],_0x20781c):(_0x5ea73e=typeof globalThis<'u'?globalThis:_0x5ea73e||self,_0x20781c(_0x5ea73e[_0x48a8df(0x140)]={},_0x5ea73e[_0x48a8df(0x157)],_0x5ea73e['UniverProLicense'],_0x5ea73e[_0x48a8df(0x18a)],_0x5ea73e[_0x48a8df(0x160)],_0x5ea73e[_0x48a8df(0x15c)],_0x5ea73e[_0x48a8df(0x15f)],_0x5ea73e[_0x48a8df(0x159)]));}(this,function(_0x3030e3,_0x4b21ca,_0x39a910,_0xf3e837,_0x4d34f3,_0x1ba242,_0x1b952c,_0x582645){'use strict';const _0x5696b7=_0x15ba;const _0x2c6c06=_0x5696b7(0x165);var _0x5a3be1=(_0x36909a=>(_0x36909a[_0x36909a[_0x5696b7(0x198)]=0x0]='OpenOrReOpen',_0x36909a[_0x36909a[_0x5696b7(0x17a)]=0x1]=_0x5696b7(0x17a),_0x36909a[_0x36909a[_0x5696b7(0x16c)]=-0x1]=_0x5696b7(0x16c),_0x36909a))(_0x5a3be1||{}),_0x345e42=(_0x95e09f=>(_0x95e09f[_0x95e09f[_0x5696b7(0x19d)]=0x0]=_0x5696b7(0x19d),_0x95e09f[_0x95e09f[_0x5696b7(0x135)]=0x1]=_0x5696b7(0x135),_0x95e09f[_0x95e09f[_0x5696b7(0x187)]=0x2]='Reply',_0x95e09f[_0x95e09f[_0x5696b7(0x177)]=0x3]=_0x5696b7(0x177),_0x95e09f[_0x95e09f[_0x5696b7(0x18b)]=0x4]=_0x5696b7(0x18b),_0x95e09f[_0x95e09f[_0x5696b7(0x191)]=0x5]=_0x5696b7(0x191),_0x95e09f[_0x95e09f['UNRECOGNIZED']=-0x1]=_0x5696b7(0x16c),_0x95e09f))(_0x345e42||{});const _0x13673c=_0x56710=>_0xf3e837[_0x5696b7(0x14d)](new Date(+_0x56710))[_0x5696b7(0x17b)](_0x5696b7(0x17f)),_0x11ea32=async(_0x5badde,_0x5cd8e4)=>{const _0x2490d7=_0x5696b7,_0x48f2b8=_0x5badde[_0x2490d7(0x16b)](_0xf3e837[_0x2490d7(0x132)]),_0x5124c4=_0x5badde[_0x2490d7(0x16b)](_0x582645[_0x2490d7(0x133)]);_0x5cd8e4[_0x2490d7(0x146)](_0x3d76c5=>{const _0x171825=_0x2490d7;_0x48f2b8[_0x171825(0x17d)](_0x3d76c5)&&_0x5cd8e4[_0x171825(0x16e)](_0x3d76c5);}),_0x5cd8e4['size']&&(await _0x5124c4[_0x2490d7(0x16b)](_0x2490d7(0x12a),{'params':{'userIDs':[..._0x5cd8e4]}}))[_0x2490d7(0x153)]['users'][_0x2490d7(0x146)](_0xd8c44f=>{const _0x1b63bf=_0x2490d7;_0xd8c44f&&_0x48f2b8[_0x1b63bf(0x17e)](_0xd8c44f);});};var _0x27188e=Object['getOwnPropertyDescriptor'],_0x52eae1=(_0x2270b8,_0x1df32f,_0x5a1edd,_0x464991)=>{for(var _0x4ea30d=_0x464991>0x1?void 0x0:_0x464991?_0x27188e(_0x1df32f,_0x5a1edd):_0x1df32f,_0x313a48=_0x2270b8['length']-0x1,_0x34c47b;_0x313a48>=0x0;_0x313a48--)(_0x34c47b=_0x2270b8[_0x313a48])&&(_0x4ea30d=_0x34c47b(_0x4ea30d)||_0x4ea30d);return _0x4ea30d;},_0x11270a=(_0x47fe00,_0x28116f)=>(_0x57922d,_0x520ec9)=>_0x28116f(_0x57922d,_0x520ec9,_0x47fe00);let _0x166c78=class extends _0xf3e837[_0x5696b7(0x156)]{constructor(_0x3f1495,_0x2d4d78,_0x4b2d0a,_0x5f3ab9){const _0x5822d4=_0x5696b7;super(),this[_0x5822d4(0x152)]=_0x3f1495,this['_threadCommentModel']=_0x2d4d78,this[_0x5822d4(0x14f)]=_0x4b2d0a,this[_0x5822d4(0x199)]=_0x5f3ab9,this[_0x5822d4(0x188)](),this[_0x5822d4(0x128)]();}[_0x5696b7(0x128)](){const _0x22704c=_0x5696b7;this[_0x22704c(0x167)](this[_0x22704c(0x12e)][_0x22704c(0x1a2)][_0x22704c(0x147)](_0x1b952c[_0x22704c(0x186)](0x10))[_0x22704c(0x16a)](_0x182182=>{const _0x42fbae=_0x22704c,_0x288c5c=new Set();_0x182182[_0x42fbae(0x146)](_0x29558b=>{const _0x169b3c=_0x42fbae;if(_0x29558b[_0x169b3c(0x13f)]==='add'){const _0x45063b=_0x29558b[_0x169b3c(0x164)]['personId'];_0x288c5c[_0x169b3c(0x15b)](_0x45063b);}}),_0x11ea32(this['_injector'],_0x288c5c);}));}[_0x5696b7(0x188)](){const _0x48c9ab=_0x5696b7;this['disposeWithMe'](this['_commentService'][_0x48c9ab(0x1a2)][_0x48c9ab(0x16a)](async _0x14fe3b=>{const _0x2df067=_0x48c9ab;var _0x167e1e,_0x15abe3,_0x4b9a73,_0x5e4953;const _0x24d0b8=(_0x167e1e=this[_0x2df067(0x12e)][_0x2df067(0x1a1)](_0x14fe3b[_0x2df067(0x155)])[_0x2df067(0x194)](_0x212605=>_0x212605[_0x2df067(0x141)]===_0x14fe3b['threadId']))==null?void 0x0:_0x167e1e[_0x2df067(0x1a3)];if(!_0x24d0b8)return;const {unitId:_0xdd0181,subUnitId:_0x131cbe}=_0x24d0b8;switch(_0x14fe3b[_0x2df067(0x172)]&&this[_0x2df067(0x14f)]['addUser'](_0x14fe3b[_0x2df067(0x172)]),_0x14fe3b[_0x2df067(0x13f)]){case _0x345e42[_0x2df067(0x135)]:break;case _0x345e42[_0x2df067(0x187)]:{this[_0x2df067(0x12e)][_0x2df067(0x143)](_0xdd0181,_0x131cbe,{'unitId':_0xdd0181,'subUnitId':_0x131cbe,'ref':'','id':_0x14fe3b[_0x2df067(0x131)],'dT':_0x13673c(+_0x14fe3b['createTimestamp']),'threadId':_0x14fe3b[_0x2df067(0x141)],'personId':(_0x4b9a73=(_0x15abe3=_0x14fe3b[_0x2df067(0x172)])==null?void 0x0:_0x15abe3[_0x2df067(0x13c)])!=null?_0x4b9a73:_0x14fe3b[_0x2df067(0x148)],'text':JSON[_0x2df067(0x16f)](_0x14fe3b[_0x2df067(0x151)]),'parentId':_0x24d0b8['id']});break;}case _0x345e42[_0x2df067(0x18b)]:{const _0x4e008b=this[_0x2df067(0x12e)]['getComment'](_0xdd0181,_0x131cbe,_0x14fe3b['replyId']);_0x4e008b&&_0x4e008b[_0x2df067(0x1a0)]&&this[_0x2df067(0x12e)][_0x2df067(0x192)](_0xdd0181,_0x131cbe,_0x14fe3b[_0x2df067(0x131)]);break;}case _0x345e42[_0x2df067(0x177)]:{this[_0x2df067(0x12e)][_0x2df067(0x129)](_0xdd0181,_0x131cbe,{'commentId':_0x14fe3b[_0x2df067(0x131)],'text':JSON[_0x2df067(0x16f)](_0x14fe3b[_0x2df067(0x151)])});break;}case _0x345e42['Solve']:{const _0x14203b=(_0x5e4953=this[_0x2df067(0x12e)]['getUnit'](_0x14fe3b['unitId'])['find'](_0x39744b=>_0x39744b[_0x2df067(0x141)]===_0x14fe3b[_0x2df067(0x141)]))==null?void 0x0:_0x5e4953['root'];_0x14203b&&this['_threadCommentModel']['resolveComment'](_0xdd0181,_0x131cbe,_0x14203b['id'],_0x14fe3b[_0x2df067(0x181)]===_0x5a3be1[_0x2df067(0x17a)]);break;}}}));}};_0x166c78=_0x52eae1([_0x11270a(0x0,_0xf3e837[_0x5696b7(0x176)](_0x4b21ca[_0x5696b7(0x19a)])),_0x11270a(0x1,_0xf3e837['Inject'](_0x1ba242[_0x5696b7(0x13d)])),_0x11270a(0x2,_0xf3e837[_0x5696b7(0x176)](_0xf3e837['UserManagerService'])),_0x11270a(0x3,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x183)]))],_0x166c78);const _0x21e22f=_0x5696b7(0x195),_0x3c2b35={};var _0x5d48b9=Object[_0x5696b7(0x19f)],_0x4a8a0b=(_0xe42466,_0x3fd2dc,_0x455b39,_0x36774f)=>{for(var _0x9a409c=_0x36774f>0x1?void 0x0:_0x36774f?_0x5d48b9(_0x3fd2dc,_0x455b39):_0x3fd2dc,_0x5f4236=_0xe42466['length']-0x1,_0x566a2f;_0x5f4236>=0x0;_0x5f4236--)(_0x566a2f=_0xe42466[_0x5f4236])&&(_0x9a409c=_0x566a2f(_0x9a409c)||_0x9a409c);return _0x9a409c;},_0x1bf7aa=(_0x2dbde4,_0x1bc2e6)=>(_0x3321c9,_0x435e6a)=>_0x1bc2e6(_0x3321c9,_0x435e6a,_0x2dbde4);function _0x19252b(_0x4318ec,_0x40f306){const _0x216b1c=_0x5696b7,_0x9bea02=_0x4318ec[_0x216b1c(0x130)][0x0];return{..._0x40f306,'id':_0x9bea02[_0x216b1c(0x131)],'resolved':_0x4318ec[_0x216b1c(0x181)]===0x1,'dT':_0x13673c(_0x9bea02['createTimestamp']),'personId':_0x9bea02[_0x216b1c(0x148)],'threadId':_0x9bea02[_0x216b1c(0x141)]};}function _0x5c0df3(_0x19bbfa,_0x46d949,_0x1cd642){const _0xcda27c=_0x5696b7;var _0x34898e,_0x18b4b6;if(((_0x18b4b6=(_0x34898e=_0x19bbfa==null?void 0x0:_0x19bbfa['replies'])==null?void 0x0:_0x34898e['length'])!=null?_0x18b4b6:0x0)>0x0){const _0xb0149f=(_0x4ef017,_0x560f3f)=>({'id':_0x4ef017[_0xcda27c(0x131)],'threadId':_0x4ef017[_0xcda27c(0x141)],'dT':_0x13673c(_0x4ef017[_0xcda27c(0x169)]),'personId':_0x4ef017[_0xcda27c(0x148)],'resolved':_0x19bbfa[_0xcda27c(0x181)]===_0x5a3be1['Solved'],'unitId':_0x46d949,'subUnitId':_0x1cd642,'text':JSON['parse'](_0x4ef017['content']),'parentId':_0x560f3f}),_0x544745=_0xb0149f(_0x19bbfa[_0xcda27c(0x130)][0x0]);return{..._0x544745,'children':_0x19bbfa[_0xcda27c(0x130)][_0xcda27c(0x142)](0x1)[_0xcda27c(0x17c)](_0x2e7ede=>_0xb0149f(_0x2e7ede,_0x544745['id']))};}return null;}let _0x306148=class{constructor(_0x2a0bbd,_0x2b7e8b,_0xda57d4){const _0xf6c084=_0x5696b7;this[_0xf6c084(0x166)]=_0x2a0bbd,this[_0xf6c084(0x14f)]=_0x2b7e8b,this[_0xf6c084(0x138)]=_0xda57d4;}async[_0x5696b7(0x143)](_0x3dc416){const _0x24dea8=_0x5696b7;var _0x2782ff,_0xa6b69;const {parentId:_0x2e4142,unitId:_0x4f28d7,text:_0x337380,threadId:_0x4666cb}=_0x3dc416,_0x536ee4=(_0xa6b69=(_0x2782ff=_0x337380['customRanges'])==null?void 0x0:_0x2782ff['filter'](_0x335c23=>_0x335c23[_0x24dea8(0x193)]===_0xf3e837['CustomRangeType'][_0x24dea8(0x182)])[_0x24dea8(0x17c)](_0x2d1f7f=>_0x2d1f7f[_0x24dea8(0x13e)]))!=null?_0xa6b69:[],_0xedd2db=JSON['stringify'](_0x337380),_0x425038=(await this[_0x24dea8(0x138)][_0x24dea8(0x18c)](_0x4f28d7))['getMemberID']();if(_0x2e4142){const _0x4691e3={'memberId':_0x425038,'unitId':_0x4f28d7,'content':_0xedd2db,'mention':_0x536ee4,'threadId':_0x4666cb},_0xe7b8e7=(await this[_0x24dea8(0x166)]['post'](_0x24dea8(0x163)+_0x4f28d7+'/reply',{'body':_0x4691e3}))[_0x24dea8(0x153)][_0x24dea8(0x162)];return{..._0x3dc416,'id':_0xe7b8e7[_0x24dea8(0x131)],'dT':_0xf3e837['dayjs'](+_0xe7b8e7['createTimestamp'])[_0x24dea8(0x17b)](_0x24dea8(0x17f)),'personId':_0xe7b8e7['userId']};}else{const _0x5f5acf={'memberId':_0x425038,'unitId':_0x4f28d7,'content':_0xedd2db,'mention':_0x536ee4},_0x47adcd=await this[_0x24dea8(0x166)]['post'](_0x24dea8(0x163)+_0x4f28d7+_0x24dea8(0x145),{'body':_0x5f5acf});return _0x19252b(_0x47adcd[_0x24dea8(0x153)]['comment'],_0x3dc416);}}async['updateComment'](_0x4c7a9a){const _0x252cdf=_0x5696b7;var _0x42e865,_0x25d07d;const {text:_0x52273d,unitId:_0x34481b}=_0x4c7a9a,_0x52b3d8=(_0x25d07d=(_0x42e865=_0x52273d[_0x252cdf(0x161)])==null?void 0x0:_0x42e865[_0x252cdf(0x136)](_0x21334b=>_0x21334b[_0x252cdf(0x193)]===_0xf3e837[_0x252cdf(0x154)][_0x252cdf(0x182)])[_0x252cdf(0x17c)](_0x205f0d=>_0x205f0d[_0x252cdf(0x13e)]))!=null?_0x25d07d:[],_0x39602b=JSON['stringify'](_0x52273d),_0x58c1b=_0x4c7a9a['threadId'],_0x3bbfaa=_0x4c7a9a['id'],_0x36deca={'memberId':(await this[_0x252cdf(0x138)][_0x252cdf(0x18c)](_0x34481b))['getMemberID'](),'unitId':_0x34481b,'threadId':_0x58c1b,'mention':_0x52b3d8,'content':_0x39602b,'replyId':_0x3bbfaa},_0x103748=await this[_0x252cdf(0x166)][_0x252cdf(0x150)](_0x252cdf(0x163)+_0x34481b+_0x252cdf(0x139),{'body':_0x36deca});return!_0x103748[_0x252cdf(0x153)][_0x252cdf(0x158)]||_0x103748['body'][_0x252cdf(0x158)]['code']===0x1;}async[_0x5696b7(0x178)](_0x1c554e){const _0x5e5c2=_0x5696b7,{unitId:_0x1cad5f}=_0x1c554e,_0x1762c0=_0x1c554e[_0x5e5c2(0x141)],_0x575e45={'memberId':this[_0x5e5c2(0x14f)][_0x5e5c2(0x16d)]()[_0x5e5c2(0x13c)],'unitId':_0x1cad5f,'threadId':_0x1762c0,'solved':_0x1c554e[_0x5e5c2(0x1a7)]?_0x5a3be1[_0x5e5c2(0x17a)]:_0x5a3be1[_0x5e5c2(0x198)]},_0x252fef=await this['_httpService'][_0x5e5c2(0x150)](_0x5e5c2(0x163)+_0x1cad5f+_0x5e5c2(0x13a),{'body':_0x575e45});return!_0x252fef[_0x5e5c2(0x153)]['error']||_0x252fef[_0x5e5c2(0x153)][_0x5e5c2(0x158)]['code']===0x1;}async[_0x5696b7(0x192)](_0xfe8767,_0x38598f,_0x5eb1b6,_0x184ea1){const _0x54c1fb=_0x5696b7,_0x3804f1={'memberId':(await this[_0x54c1fb(0x138)][_0x54c1fb(0x18c)](_0xfe8767))['getMemberID'](),'threadId':_0x5eb1b6,'replyId':_0x184ea1,'unitId':_0xfe8767},_0x14332b=await this[_0x54c1fb(0x166)][_0x54c1fb(0x150)](_0x54c1fb(0x163)+_0xfe8767+_0x54c1fb(0x173),{'body':_0x3804f1});return!_0x14332b[_0x54c1fb(0x153)][_0x54c1fb(0x158)]||_0x14332b[_0x54c1fb(0x153)]['error']['code']===0x1;}async[_0x5696b7(0x179)](_0xa9b151,_0x135923,_0x1c1684){const _0x56cf82=_0x5696b7,_0x4703de={'unitId':_0xa9b151,'threadId':_0x1c1684},_0x21ef16=await this[_0x56cf82(0x166)]['post']('/universer-api/comment/unit/'+_0xa9b151+_0x56cf82(0x170),{'body':_0x4703de}),_0x38a1b7=_0x1c1684[_0x56cf82(0x17c)](_0x167696=>_0x5c0df3(_0x21ef16[_0x56cf82(0x153)]['comments'][_0x167696],_0xa9b151,_0x135923))[_0x56cf82(0x136)](Boolean);return Object['values'](_0x21ef16['body'][_0x56cf82(0x190)])[_0x56cf82(0x146)](_0xb2718a=>{const _0x298770=_0x56cf82;this['_userService'][_0x298770(0x17e)](_0xb2718a);}),_0x38a1b7;}['saveCommentToSnapshot'](_0x4dfc69){const _0x513504=_0x5696b7;return{'id':_0x4dfc69['id'],'threadId':_0x4dfc69[_0x513504(0x141)],'ref':_0x4dfc69[_0x513504(0x185)]};}};_0x306148=_0x4a8a0b([_0x1bf7aa(0x0,_0xf3e837[_0x5696b7(0x176)](_0x582645[_0x5696b7(0x133)])),_0x1bf7aa(0x1,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x132)])),_0x1bf7aa(0x2,_0xf3e837[_0x5696b7(0x176)](_0x4b21ca[_0x5696b7(0x14b)]))],_0x306148);var _0x271b18=Object['getOwnPropertyDescriptor'],_0x49190f=(_0x3dcb0f,_0x2ac2ce,_0x538c39,_0x573f94)=>{const _0x5e49c7=_0x5696b7;for(var _0x4d836c=_0x573f94>0x1?void 0x0:_0x573f94?_0x271b18(_0x2ac2ce,_0x538c39):_0x2ac2ce,_0x8cd7cd=_0x3dcb0f[_0x5e49c7(0x196)]-0x1,_0x40d342;_0x8cd7cd>=0x0;_0x8cd7cd--)(_0x40d342=_0x3dcb0f[_0x8cd7cd])&&(_0x4d836c=_0x40d342(_0x4d836c)||_0x4d836c);return _0x4d836c;},_0x63cf87=(_0x2f94fc,_0x166b1f)=>(_0x4592e3,_0x300a28)=>_0x166b1f(_0x4592e3,_0x300a28,_0x2f94fc);let _0x561121=class extends _0xf3e837['Disposable']{constructor(_0x256854,_0x488ca7){const _0x14a100=_0x5696b7;super(),this[_0x14a100(0x14c)]=_0x256854,this[_0x14a100(0x12d)]=_0x488ca7,this[_0x14a100(0x180)]();}[_0x5696b7(0x180)](){const _0x444090=_0x5696b7;this[_0x444090(0x14c)][_0x444090(0x12b)]=this[_0x444090(0x12d)],this[_0x444090(0x14c)]['syncUpdateMutationToColla']=!0x1;}};_0x561121=_0x49190f([_0x63cf87(0x0,_0x1ba242[_0x5696b7(0x137)]),_0x63cf87(0x1,_0xf3e837[_0x5696b7(0x176)](_0x306148))],_0x561121);var _0xa4e1f0=Object['defineProperty'],_0x341afc=Object[_0x5696b7(0x19f)],_0x6d96e8=(_0x277830,_0x300906,_0xf45da6)=>_0x300906 in _0x277830?_0xa4e1f0(_0x277830,_0x300906,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf45da6}):_0x277830[_0x300906]=_0xf45da6,_0x3bd1ee=(_0x22f38b,_0x518c4a,_0x3c00c6,_0x41f6ec)=>{const _0x3379bd=_0x5696b7;for(var _0x12bf69=_0x41f6ec>0x1?void 0x0:_0x41f6ec?_0x341afc(_0x518c4a,_0x3c00c6):_0x518c4a,_0x58d7ac=_0x22f38b[_0x3379bd(0x196)]-0x1,_0x58e8fa;_0x58d7ac>=0x0;_0x58d7ac--)(_0x58e8fa=_0x22f38b[_0x58d7ac])&&(_0x12bf69=_0x58e8fa(_0x12bf69)||_0x12bf69);return _0x12bf69;},_0x3e4c9d=(_0x38f261,_0x32e982)=>(_0x179c9c,_0x510ba6)=>_0x32e982(_0x179c9c,_0x510ba6,_0x38f261),_0x5f0088=(_0x4eb085,_0x5a8226,_0x485513)=>_0x6d96e8(_0x4eb085,typeof _0x5a8226!='symbol'?_0x5a8226+'':_0x5a8226,_0x485513);_0x3030e3['UniverThreadCommentDataSourcePlugin']=class extends _0xf3e837['Plugin']{constructor(_0x35d621=_0x3c2b35,_0x67a318,_0x2e6db4){const _0x279b61=_0x5696b7;super(),this['_config']=_0x35d621,this['_injector']=_0x67a318,this[_0x279b61(0x18e)]=_0x2e6db4;const {..._0x30c316}=_0xf3e837['merge']({},_0x3c2b35,this['_config']);this[_0x279b61(0x18e)][_0x279b61(0x144)](_0x21e22f,_0x30c316);}['onStarting'](){[[_0x306148],[_0x561121],[_0x166c78]]['forEach'](_0x580514=>{const _0xd81108=_0x15ba;this[_0xd81108(0x199)][_0xd81108(0x15b)](_0x580514);});}[_0x5696b7(0x184)](){const _0x53a71d=_0x5696b7;this[_0x53a71d(0x199)][_0x53a71d(0x16b)](_0x561121),this[_0x53a71d(0x199)]['get'](_0x166c78);}},_0x5f0088(_0x3030e3['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x2c6c06),_0x5f0088(_0x3030e3[_0x5696b7(0x134)],_0x5696b7(0x13f),_0xf3e837[_0x5696b7(0x14a)][_0x5696b7(0x15a)]),_0x3030e3[_0x5696b7(0x134)]=_0x3bd1ee([_0xf3e837[_0x5696b7(0x19c)](_0x4d34f3['UniverThreadCommentUIPlugin'],_0x4b21ca['UniverCollaborationClientPlugin'],_0x39a910[_0x5696b7(0x174)]),_0x3e4c9d(0x1,_0xf3e837[_0x5696b7(0x176)](_0xf3e837[_0x5696b7(0x183)])),_0x3e4c9d(0x2,_0xf3e837[_0x5696b7(0x168)])],_0x3030e3[_0x5696b7(0x134)]),Object['defineProperty'](_0x3030e3,Symbol[_0x5696b7(0x15d)],{'value':_0x5696b7(0x19e)});}));function _0x15ba(_0x2f81b3,_0x385dfb){_0x2f81b3=_0x2f81b3-0x127;const _0x5cb612=_0x5cb6();let _0x15ba8f=_0x5cb612[_0x2f81b3];return _0x15ba8f;}function _0x5cb6(){const _0x5b3ed9=['/solved','@univerjs/network','userID','ThreadCommentModel','rangeId','type','UniverProThreadCommentDatasource','threadId','slice','addComment','setConfig','/add','forEach','pipe','userId','8768SaqAmt','UniverInstanceType','CollaborationSessionService','_threadCommentDataSourceService','dayjs','186OcwdcY','_userService','post','content','_commentService','body','CustomRangeType','unitId','Disposable','UniverProCollaborationClient','error','UniverNetwork','UNIVER_UNKNOWN','add','UniverThreadComment','toStringTag','19395uWJpgm','rxjs','UniverThreadCommentUi','customRanges','reply','/universer-api/comment/unit/','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_httpService','disposeWithMe','IConfigService','createTimestamp','subscribe','get','UNRECOGNIZED','getCurrentUser','delete','parse','/list','10ywvzXw','user','/delete','UniverLicensePlugin','16103540zDUHGf','Inject','Edit','resolveComment','listComments','Solved','format','map','getUser','addUser','YYYY/MM/DD\x20HH:mm','_initDataSource','solved','COMMENT','Injector','onReady','ref','bufferTime','Reply','_init','function','UniverCore','Delete','requireSession','exports','_configService','amd','users','Solve','deleteComment','rangeType','find','thread-comment-data-source.config','length','1436ruTQpX','OpenOrReOpen','_injector','CommentService','object','DependentOn','Unknown','Module','getOwnPropertyDescriptor','parentId','getUnit','commentUpdate$','root','13779hoxkUf','1231907uTSKFW','66626CupMtI','resolved','@univerjs/thread-comment-ui','_initUserSync','updateComment','/universer-api/user/list','dataSource','36675254DnhVPD','_threadCommentDataSource','_threadCommentModel','619185CsdpRS','replies','replyId','UserManagerService','HTTPService','UniverThreadCommentDataSourcePlugin','Add','filter','IThreadCommentDataSourceService','_sessionService','/edit'];_0x5cb6=function(){return _0x5b3ed9;};return _0x5cb6();}
|
|
1
|
+
function _0x5494(_0x2da943,_0x4c4b59){_0x2da943=_0x2da943-0x178;const _0xcde168=_0xcde1();let _0x5494b9=_0xcde168[_0x2da943];return _0x5494b9;}(function(_0x8547df,_0x2ff8a2){const _0x296aff=_0x5494,_0xaab348=_0x8547df();while(!![]){try{const _0x66d31d=-parseInt(_0x296aff(0x1ba))/0x1+-parseInt(_0x296aff(0x187))/0x2+-parseInt(_0x296aff(0x17b))/0x3+parseInt(_0x296aff(0x18d))/0x4+parseInt(_0x296aff(0x1f1))/0x5*(parseInt(_0x296aff(0x191))/0x6)+parseInt(_0x296aff(0x1dd))/0x7*(parseInt(_0x296aff(0x197))/0x8)+-parseInt(_0x296aff(0x193))/0x9*(parseInt(_0x296aff(0x17c))/0xa);if(_0x66d31d===_0x2ff8a2)break;else _0xaab348['push'](_0xaab348['shift']());}catch(_0x54a8bd){_0xaab348['push'](_0xaab348['shift']());}}}(_0xcde1,0x71723),function(_0x7e153,_0x238e7a){const _0x251611=_0x5494;typeof exports==_0x251611(0x1a3)&&typeof module<'u'?_0x238e7a(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==_0x251611(0x1c7)&&define[_0x251611(0x1d3)]?define([_0x251611(0x19e),'@univerjs-pro/collaboration-client',_0x251611(0x1ea),'@univerjs/core',_0x251611(0x1ee),'@univerjs/thread-comment',_0x251611(0x1b9),'@univerjs/network'],_0x238e7a):(_0x7e153=typeof globalThis<'u'?globalThis:_0x7e153||self,_0x238e7a(_0x7e153[_0x251611(0x1ac)]={},_0x7e153[_0x251611(0x17a)],_0x7e153[_0x251611(0x1d8)],_0x7e153[_0x251611(0x198)],_0x7e153['UniverThreadCommentUi'],_0x7e153[_0x251611(0x1e9)],_0x7e153[_0x251611(0x1b9)],_0x7e153[_0x251611(0x178)]));}(this,function(_0x2858e6,_0x5d4d54,_0x15a3a5,_0x52c03a,_0xc56e17,_0x145bf2,_0x1c3753,_0x1e3975){'use strict';const _0x2ff827=_0x5494;const _0xa588b=_0x2ff827(0x1b6);var _0x50ef57=(_0x20d56f=>(_0x20d56f[_0x20d56f['OpenOrReOpen']=0x0]=_0x2ff827(0x1d2),_0x20d56f[_0x20d56f[_0x2ff827(0x1db)]=0x1]=_0x2ff827(0x1db),_0x20d56f[_0x20d56f['UNRECOGNIZED']=-0x1]=_0x2ff827(0x1a0),_0x20d56f))(_0x50ef57||{}),_0x1f227d=(_0x4bd4ed=>(_0x4bd4ed[_0x4bd4ed['Unknown']=0x0]=_0x2ff827(0x183),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x19b)]=0x1]=_0x2ff827(0x19b),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x1bd)]=0x2]=_0x2ff827(0x1bd),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x1ad)]=0x3]=_0x2ff827(0x1ad),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x1cb)]=0x4]=_0x2ff827(0x1cb),_0x4bd4ed[_0x4bd4ed[_0x2ff827(0x1ab)]=0x5]=_0x2ff827(0x1ab),_0x4bd4ed[_0x4bd4ed['UNRECOGNIZED']=-0x1]=_0x2ff827(0x1a0),_0x4bd4ed))(_0x1f227d||{});const _0x9e6462=_0x3dfca1=>_0x52c03a[_0x2ff827(0x18e)](new Date(+_0x3dfca1))[_0x2ff827(0x1f5)](_0x2ff827(0x1b3)),_0x2d1ece=async(_0x14ccba,_0x43ab90)=>{const _0x1bc2b0=_0x2ff827,_0xeb5bba=_0x14ccba['get'](_0x52c03a['UserManagerService']),_0x56607e=_0x14ccba[_0x1bc2b0(0x1e7)](_0x1e3975[_0x1bc2b0(0x182)]);_0x43ab90[_0x1bc2b0(0x1a9)](_0x14028c=>{const _0x23a665=_0x1bc2b0;_0xeb5bba[_0x23a665(0x1b2)](_0x14028c)&&_0x43ab90[_0x23a665(0x19f)](_0x14028c);}),_0x43ab90[_0x1bc2b0(0x17f)]&&(await _0x56607e[_0x1bc2b0(0x1e7)]('/universer-api/user/list',{'params':{'userIDs':[..._0x43ab90]}}))['body'][_0x1bc2b0(0x189)][_0x1bc2b0(0x1a9)](_0x52a978=>{_0x52a978&&_0xeb5bba['addUser'](_0x52a978);});};var _0x581cfe=Object['getOwnPropertyDescriptor'],_0x37469d=(_0x327957,_0x4c86bd,_0xa4186,_0x746712)=>{for(var _0xdadb24=_0x746712>0x1?void 0x0:_0x746712?_0x581cfe(_0x4c86bd,_0xa4186):_0x4c86bd,_0x150691=_0x327957['length']-0x1,_0x82b322;_0x150691>=0x0;_0x150691--)(_0x82b322=_0x327957[_0x150691])&&(_0xdadb24=_0x82b322(_0xdadb24)||_0xdadb24);return _0xdadb24;},_0x160ad5=(_0x27242a,_0x383a29)=>(_0x533d6f,_0x579608)=>_0x383a29(_0x533d6f,_0x579608,_0x27242a);let _0x1404e9=class extends _0x52c03a['Disposable']{constructor(_0x6edd8c,_0x48b745,_0x571d8a,_0x32a05c){const _0x2078a0=_0x2ff827;super(),this['_commentService']=_0x6edd8c,this[_0x2078a0(0x1f3)]=_0x48b745,this[_0x2078a0(0x1c0)]=_0x571d8a,this[_0x2078a0(0x1d9)]=_0x32a05c,this['_init'](),this[_0x2078a0(0x1eb)]();}[_0x2ff827(0x1eb)](){const _0x2a05d5=_0x2ff827;this[_0x2a05d5(0x1a4)](this['_threadCommentModel'][_0x2a05d5(0x1fb)][_0x2a05d5(0x1e4)](_0x1c3753[_0x2a05d5(0x1b5)](0x10))['subscribe'](_0x45b059=>{const _0x7bc7d7=_0x2a05d5,_0xa2e2f4=new Set();_0x45b059[_0x7bc7d7(0x1a9)](_0xec2e34=>{const _0x287134=_0x7bc7d7;if(_0xec2e34['type']==='add'){const _0x150eee=_0xec2e34[_0x287134(0x1f0)][_0x287134(0x19d)];_0xa2e2f4[_0x287134(0x1f2)](_0x150eee);}}),_0x2d1ece(this[_0x7bc7d7(0x1d9)],_0xa2e2f4);}));}[_0x2ff827(0x1a7)](){const _0x5d17ea=_0x2ff827;this['disposeWithMe'](this['_commentService'][_0x5d17ea(0x1fb)]['subscribe'](async _0x4947e8=>{const _0x46b9c6=_0x5d17ea;var _0x537dda,_0x13d6d6,_0x111d0b,_0x40630e;const _0x2499ae=(_0x537dda=this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1cc)](_0x4947e8['unitId'])['find'](_0x10324f=>_0x10324f[_0x46b9c6(0x1e2)]===_0x4947e8[_0x46b9c6(0x1e2)]))==null?void 0x0:_0x537dda[_0x46b9c6(0x1aa)];if(!_0x2499ae)return;const {unitId:_0xafa2a7,subUnitId:_0x115621}=_0x2499ae;switch(_0x4947e8[_0x46b9c6(0x1d6)]&&this[_0x46b9c6(0x1c0)][_0x46b9c6(0x1cd)](_0x4947e8['user']),_0x4947e8[_0x46b9c6(0x1bf)]){case _0x1f227d[_0x46b9c6(0x19b)]:break;case _0x1f227d[_0x46b9c6(0x1bd)]:{this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1c2)](_0xafa2a7,_0x115621,{'unitId':_0xafa2a7,'subUnitId':_0x115621,'ref':'','id':_0x4947e8[_0x46b9c6(0x18b)],'dT':_0x9e6462(+_0x4947e8['createTimestamp']),'threadId':_0x4947e8['threadId'],'personId':(_0x111d0b=(_0x13d6d6=_0x4947e8[_0x46b9c6(0x1d6)])==null?void 0x0:_0x13d6d6[_0x46b9c6(0x1d4)])!=null?_0x111d0b:_0x4947e8[_0x46b9c6(0x1f7)],'text':JSON[_0x46b9c6(0x1e5)](_0x4947e8['content']),'parentId':_0x2499ae['id']});break;}case _0x1f227d[_0x46b9c6(0x1cb)]:{const _0x2b72c1=this[_0x46b9c6(0x1f3)]['getComment'](_0xafa2a7,_0x115621,_0x4947e8[_0x46b9c6(0x18b)]);_0x2b72c1&&_0x2b72c1[_0x46b9c6(0x1fd)]&&this[_0x46b9c6(0x1f3)][_0x46b9c6(0x19a)](_0xafa2a7,_0x115621,_0x4947e8[_0x46b9c6(0x18b)]);break;}case _0x1f227d[_0x46b9c6(0x1ad)]:{this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1b1)](_0xafa2a7,_0x115621,{'commentId':_0x4947e8[_0x46b9c6(0x18b)],'text':JSON['parse'](_0x4947e8[_0x46b9c6(0x1e8)])});break;}case _0x1f227d['Solve']:{const _0x2f4b26=(_0x40630e=this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1cc)](_0x4947e8[_0x46b9c6(0x1d5)])[_0x46b9c6(0x181)](_0x4a3979=>_0x4a3979[_0x46b9c6(0x1e2)]===_0x4947e8[_0x46b9c6(0x1e2)]))==null?void 0x0:_0x40630e[_0x46b9c6(0x1aa)];_0x2f4b26&&this[_0x46b9c6(0x1f3)][_0x46b9c6(0x1af)](_0xafa2a7,_0x115621,_0x2f4b26['id'],_0x4947e8['solved']===_0x50ef57[_0x46b9c6(0x1db)]);break;}}}));}};_0x1404e9=_0x37469d([_0x160ad5(0x0,_0x52c03a['Inject'](_0x5d4d54[_0x2ff827(0x196)])),_0x160ad5(0x1,_0x52c03a[_0x2ff827(0x17d)](_0x145bf2[_0x2ff827(0x1f9)])),_0x160ad5(0x2,_0x52c03a[_0x2ff827(0x17d)](_0x52c03a[_0x2ff827(0x1b0)])),_0x160ad5(0x3,_0x52c03a[_0x2ff827(0x17d)](_0x52c03a[_0x2ff827(0x1c4)]))],_0x1404e9);const _0x45275b=_0x2ff827(0x18f),_0x58e418={};var _0x10aa1f=Object[_0x2ff827(0x1a1)],_0xef3d6d=(_0x30f272,_0x36016f,_0x3e4c1b,_0xb970da)=>{for(var _0x1fce80=_0xb970da>0x1?void 0x0:_0xb970da?_0x10aa1f(_0x36016f,_0x3e4c1b):_0x36016f,_0x5dc51f=_0x30f272['length']-0x1,_0x429236;_0x5dc51f>=0x0;_0x5dc51f--)(_0x429236=_0x30f272[_0x5dc51f])&&(_0x1fce80=_0x429236(_0x1fce80)||_0x1fce80);return _0x1fce80;},_0x106443=(_0x3c3160,_0x702c3d)=>(_0x26519a,_0x26e1a0)=>_0x702c3d(_0x26519a,_0x26e1a0,_0x3c3160);function _0x125548(_0x4e2840,_0xa4db0b){const _0x52eb5d=_0x2ff827,_0x5f0048=_0x4e2840[_0x52eb5d(0x199)][0x0];return{..._0xa4db0b,'id':_0x5f0048[_0x52eb5d(0x18b)],'resolved':_0x4e2840[_0x52eb5d(0x188)]===0x1,'dT':_0x9e6462(_0x5f0048['createTimestamp']),'personId':_0x5f0048[_0x52eb5d(0x1f7)],'threadId':_0x5f0048[_0x52eb5d(0x1e2)]};}function _0x14b53d(_0x178b55,_0x56c5c0,_0x328928){const _0x20482a=_0x2ff827;var _0x3e7e2b,_0x416285;if(((_0x416285=(_0x3e7e2b=_0x178b55==null?void 0x0:_0x178b55['replies'])==null?void 0x0:_0x3e7e2b['length'])!=null?_0x416285:0x0)>0x0){const _0x5e88e3=(_0x13b963,_0x39fdbe)=>({'id':_0x13b963[_0x20482a(0x18b)],'threadId':_0x13b963['threadId'],'dT':_0x9e6462(_0x13b963[_0x20482a(0x1fc)]),'personId':_0x13b963[_0x20482a(0x1f7)],'resolved':_0x178b55[_0x20482a(0x188)]===_0x50ef57[_0x20482a(0x1db)],'unitId':_0x56c5c0,'subUnitId':_0x328928,'text':JSON[_0x20482a(0x1e5)](_0x13b963[_0x20482a(0x1e8)]),'parentId':_0x39fdbe}),_0x3916e0=_0x5e88e3(_0x178b55['replies'][0x0]);return{..._0x3916e0,'children':_0x178b55['replies']['slice'](0x1)[_0x20482a(0x185)](_0x5bd917=>_0x5e88e3(_0x5bd917,_0x3916e0['id']))};}return null;}let _0x324652=class{constructor(_0x42fe0c,_0x3034a8,_0x337398){const _0x229ba7=_0x2ff827;this['_httpService']=_0x42fe0c,this[_0x229ba7(0x1c0)]=_0x3034a8,this[_0x229ba7(0x1df)]=_0x337398;}async[_0x2ff827(0x1c2)](_0xafd77a){const _0x926feb=_0x2ff827;var _0x30487e,_0x8b192e;const {parentId:_0x42d32e,unitId:_0x39eedc,text:_0x415621,threadId:_0x1bf2fe}=_0xafd77a,_0x4d29a1=(_0x8b192e=(_0x30487e=_0x415621[_0x926feb(0x1f8)])==null?void 0x0:_0x30487e[_0x926feb(0x1e1)](_0x1c5972=>_0x1c5972[_0x926feb(0x1de)]===_0x52c03a[_0x926feb(0x1b8)][_0x926feb(0x195)])[_0x926feb(0x185)](_0x47d8cb=>_0x47d8cb[_0x926feb(0x1ff)]))!=null?_0x8b192e:[],_0x242546=JSON[_0x926feb(0x1a6)](_0x415621),_0x2f9312=(await this[_0x926feb(0x1df)][_0x926feb(0x1e3)](_0x39eedc))[_0x926feb(0x1e6)]();if(_0x42d32e){const _0x703251={'memberId':_0x2f9312,'unitId':_0x39eedc,'content':_0x242546,'mention':_0x4d29a1,'threadId':_0x1bf2fe},_0x24c23d=(await this[_0x926feb(0x18c)][_0x926feb(0x18a)](_0x926feb(0x1bc)+_0x39eedc+_0x926feb(0x186),{'body':_0x703251}))[_0x926feb(0x1c6)]['reply'];return{..._0xafd77a,'id':_0x24c23d[_0x926feb(0x18b)],'dT':_0x52c03a[_0x926feb(0x18e)](+_0x24c23d[_0x926feb(0x1fc)])[_0x926feb(0x1f5)](_0x926feb(0x1b3)),'personId':_0x24c23d[_0x926feb(0x1f7)]};}else{const _0x5deba={'memberId':_0x2f9312,'unitId':_0x39eedc,'content':_0x242546,'mention':_0x4d29a1},_0x40731a=await this[_0x926feb(0x18c)][_0x926feb(0x18a)](_0x926feb(0x1bc)+_0x39eedc+'/add',{'body':_0x5deba});return _0x125548(_0x40731a[_0x926feb(0x1c6)]['comment'],_0xafd77a);}}async[_0x2ff827(0x1b1)](_0x35d9f2){const _0x116620=_0x2ff827;var _0x4e4bb1,_0x55c1fe;const {text:_0x2f59be,unitId:_0x140fc1}=_0x35d9f2,_0x5d6739=(_0x55c1fe=(_0x4e4bb1=_0x2f59be['customRanges'])==null?void 0x0:_0x4e4bb1[_0x116620(0x1e1)](_0x2d6efc=>_0x2d6efc[_0x116620(0x1de)]===_0x52c03a[_0x116620(0x1b8)]['COMMENT'])[_0x116620(0x185)](_0x161a6e=>_0x161a6e['rangeId']))!=null?_0x55c1fe:[],_0x425735=JSON['stringify'](_0x2f59be),_0x235e0d=_0x35d9f2['threadId'],_0x246e3b=_0x35d9f2['id'],_0x1f97b6={'memberId':(await this[_0x116620(0x1df)][_0x116620(0x1e3)](_0x140fc1))[_0x116620(0x1e6)](),'unitId':_0x140fc1,'threadId':_0x235e0d,'mention':_0x5d6739,'content':_0x425735,'replyId':_0x246e3b},_0x154cb0=await this[_0x116620(0x18c)]['post'](_0x116620(0x1bc)+_0x140fc1+_0x116620(0x1ec),{'body':_0x1f97b6});return!_0x154cb0[_0x116620(0x1c6)][_0x116620(0x1ef)]||_0x154cb0[_0x116620(0x1c6)]['error']['code']===0x1;}async['resolveComment'](_0xaa50bf){const _0x57106a=_0x2ff827,{unitId:_0x40a945}=_0xaa50bf,_0x45dd50=_0xaa50bf['threadId'],_0x130e12={'memberId':this[_0x57106a(0x1c0)][_0x57106a(0x1f4)]()['userID'],'unitId':_0x40a945,'threadId':_0x45dd50,'solved':_0xaa50bf[_0x57106a(0x1cf)]?_0x50ef57[_0x57106a(0x1db)]:_0x50ef57[_0x57106a(0x1d2)]},_0x1843ae=await this['_httpService'][_0x57106a(0x18a)](_0x57106a(0x1bc)+_0x40a945+_0x57106a(0x1c8),{'body':_0x130e12});return!_0x1843ae[_0x57106a(0x1c6)][_0x57106a(0x1ef)]||_0x1843ae['body'][_0x57106a(0x1ef)][_0x57106a(0x1b7)]===0x1;}async[_0x2ff827(0x19a)](_0x438f36,_0x1671eb,_0x786f6e,_0x56bc72){const _0x16eca6=_0x2ff827,_0x1de31f={'memberId':(await this[_0x16eca6(0x1df)][_0x16eca6(0x1e3)](_0x438f36))[_0x16eca6(0x1e6)](),'threadId':_0x786f6e,'replyId':_0x56bc72,'unitId':_0x438f36},_0x226afa=await this[_0x16eca6(0x18c)][_0x16eca6(0x18a)](_0x16eca6(0x1bc)+_0x438f36+_0x16eca6(0x1a2),{'body':_0x1de31f});return!_0x226afa[_0x16eca6(0x1c6)]['error']||_0x226afa['body'][_0x16eca6(0x1ef)][_0x16eca6(0x1b7)]===0x1;}async[_0x2ff827(0x184)](_0x389557,_0x4e3d61,_0x35bc6c){const _0x5d42c9=_0x2ff827,_0x2752c1={'unitId':_0x389557,'threadId':_0x35bc6c},_0x1e2ae8=await this[_0x5d42c9(0x18c)][_0x5d42c9(0x18a)](_0x5d42c9(0x1bc)+_0x389557+_0x5d42c9(0x1ce),{'body':_0x2752c1}),_0x95033b=_0x35bc6c[_0x5d42c9(0x185)](_0x28a74e=>_0x14b53d(_0x1e2ae8[_0x5d42c9(0x1c6)][_0x5d42c9(0x1a5)][_0x28a74e],_0x389557,_0x4e3d61))['filter'](Boolean);return Object[_0x5d42c9(0x1f6)](_0x1e2ae8[_0x5d42c9(0x1c6)][_0x5d42c9(0x189)])[_0x5d42c9(0x1a9)](_0x2f3b81=>{const _0x1a253b=_0x5d42c9;this[_0x1a253b(0x1c0)][_0x1a253b(0x1cd)](_0x2f3b81);}),_0x95033b;}[_0x2ff827(0x1c3)](_0x58668f){const _0x94a523=_0x2ff827;return{'id':_0x58668f['id'],'threadId':_0x58668f[_0x94a523(0x1e2)],'ref':_0x58668f[_0x94a523(0x1a8)]};}};_0x324652=_0xef3d6d([_0x106443(0x0,_0x52c03a[_0x2ff827(0x17d)](_0x1e3975[_0x2ff827(0x182)])),_0x106443(0x1,_0x52c03a['Inject'](_0x52c03a[_0x2ff827(0x1b0)])),_0x106443(0x2,_0x52c03a[_0x2ff827(0x17d)](_0x5d4d54[_0x2ff827(0x1ae)]))],_0x324652);var _0x4674a9=Object['getOwnPropertyDescriptor'],_0xb7c442=(_0x180826,_0x1956db,_0x3c747e,_0x10e2e6)=>{const _0x1a4422=_0x2ff827;for(var _0x279f4b=_0x10e2e6>0x1?void 0x0:_0x10e2e6?_0x4674a9(_0x1956db,_0x3c747e):_0x1956db,_0x95674b=_0x180826[_0x1a4422(0x190)]-0x1,_0x21d269;_0x95674b>=0x0;_0x95674b--)(_0x21d269=_0x180826[_0x95674b])&&(_0x279f4b=_0x21d269(_0x279f4b)||_0x279f4b);return _0x279f4b;},_0x6e2c95=(_0x1aa42f,_0x3755b7)=>(_0x188abb,_0x30d7f5)=>_0x3755b7(_0x188abb,_0x30d7f5,_0x1aa42f);let _0x2de520=class extends _0x52c03a[_0x2ff827(0x1d7)]{constructor(_0x42d223,_0x4581c5){const _0x20d49a=_0x2ff827;super(),this[_0x20d49a(0x1be)]=_0x42d223,this[_0x20d49a(0x1dc)]=_0x4581c5,this['_initDataSource']();}[_0x2ff827(0x1fa)](){const _0x4817b9=_0x2ff827;this['_threadCommentDataSourceService'][_0x4817b9(0x1c5)]=this[_0x4817b9(0x1dc)],this[_0x4817b9(0x1be)][_0x4817b9(0x1bb)]=!0x1;}};_0x2de520=_0xb7c442([_0x6e2c95(0x0,_0x145bf2[_0x2ff827(0x1c9)]),_0x6e2c95(0x1,_0x52c03a[_0x2ff827(0x17d)](_0x324652))],_0x2de520);var _0x56bc5a=Object['defineProperty'],_0x38453d=Object[_0x2ff827(0x1a1)],_0xbfd37=(_0x59d714,_0x3a4dd1,_0xc8018d)=>_0x3a4dd1 in _0x59d714?_0x56bc5a(_0x59d714,_0x3a4dd1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc8018d}):_0x59d714[_0x3a4dd1]=_0xc8018d,_0x397687=(_0x5e9b3c,_0x4f2da8,_0x20c44f,_0x2e57cf)=>{const _0x1e91ae=_0x2ff827;for(var _0x3da5f5=_0x2e57cf>0x1?void 0x0:_0x2e57cf?_0x38453d(_0x4f2da8,_0x20c44f):_0x4f2da8,_0x2917c5=_0x5e9b3c[_0x1e91ae(0x190)]-0x1,_0x32a78e;_0x2917c5>=0x0;_0x2917c5--)(_0x32a78e=_0x5e9b3c[_0x2917c5])&&(_0x3da5f5=_0x32a78e(_0x3da5f5)||_0x3da5f5);return _0x3da5f5;},_0x2f6136=(_0x102368,_0x1ff961)=>(_0x352117,_0x3c8af0)=>_0x1ff961(_0x352117,_0x3c8af0,_0x102368),_0x30b006=(_0x47156f,_0x39970d,_0x54522)=>_0xbfd37(_0x47156f,typeof _0x39970d!=_0x2ff827(0x1b4)?_0x39970d+'':_0x39970d,_0x54522);_0x2858e6[_0x2ff827(0x1fe)]=class extends _0x52c03a[_0x2ff827(0x194)]{constructor(_0x6478fd=_0x58e418,_0x411613,_0x38b6a9){const _0x58c25a=_0x2ff827;super(),this[_0x58c25a(0x180)]=_0x6478fd,this[_0x58c25a(0x1d9)]=_0x411613,this[_0x58c25a(0x1da)]=_0x38b6a9;const {..._0x316430}=_0x52c03a['merge']({},_0x58e418,this[_0x58c25a(0x180)]);this['_configService'][_0x58c25a(0x19c)](_0x45275b,_0x316430);}['onStarting'](){const _0x20924d=_0x2ff827;[[_0x324652],[_0x2de520],[_0x1404e9]][_0x20924d(0x1a9)](_0x226f38=>{const _0x9357b2=_0x20924d;this['_injector'][_0x9357b2(0x1f2)](_0x226f38);});}[_0x2ff827(0x1c1)](){const _0x51a2cc=_0x2ff827;this['_injector'][_0x51a2cc(0x1e7)](_0x2de520),this[_0x51a2cc(0x1d9)][_0x51a2cc(0x1e7)](_0x1404e9);}},_0x30b006(_0x2858e6['UniverThreadCommentDataSourcePlugin'],_0x2ff827(0x1e0),_0xa588b),_0x30b006(_0x2858e6[_0x2ff827(0x1fe)],_0x2ff827(0x1bf),_0x52c03a['UniverInstanceType']['UNIVER_UNKNOWN']),_0x2858e6[_0x2ff827(0x1fe)]=_0x397687([_0x52c03a[_0x2ff827(0x17e)](_0xc56e17[_0x2ff827(0x1ed)],_0x5d4d54[_0x2ff827(0x1ca)],_0x15a3a5[_0x2ff827(0x179)]),_0x2f6136(0x1,_0x52c03a[_0x2ff827(0x17d)](_0x52c03a[_0x2ff827(0x1c4)])),_0x2f6136(0x2,_0x52c03a[_0x2ff827(0x1d1)])],_0x2858e6[_0x2ff827(0x1fe)]),Object['defineProperty'](_0x2858e6,Symbol[_0x2ff827(0x192)],{'value':_0x2ff827(0x1d0)});}));function _0xcde1(){const _0x731c3f=['rangeId','UniverNetwork','UniverLicensePlugin','UniverProCollaborationClient','1533684WOKvcG','513610qEYyvY','Inject','DependentOn','size','_config','find','HTTPService','Unknown','listComments','map','/reply','1068218BwGBuV','solved','users','post','replyId','_httpService','2734232RLhLAC','dayjs','thread-comment-data-source.config','length','23676Jnpxfs','toStringTag','9yqbjse','Plugin','COMMENT','CommentService','85288iXaiLZ','UniverCore','replies','deleteComment','Add','setConfig','personId','exports','delete','UNRECOGNIZED','getOwnPropertyDescriptor','/delete','object','disposeWithMe','comments','stringify','_init','ref','forEach','root','Solve','UniverProThreadCommentDatasource','Edit','CollaborationSessionService','resolveComment','UserManagerService','updateComment','getUser','YYYY/MM/DD\x20HH:mm','symbol','bufferTime','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','code','CustomRangeType','rxjs','17022eHJMqh','syncUpdateMutationToColla','/universer-api/comment/unit/','Reply','_threadCommentDataSourceService','type','_userService','onReady','addComment','saveCommentToSnapshot','Injector','dataSource','body','function','/solved','IThreadCommentDataSourceService','UniverCollaborationClientPlugin','Delete','getUnit','addUser','/list','resolved','Module','IConfigService','OpenOrReOpen','amd','userID','unitId','user','Disposable','UniverProLicense','_injector','_configService','Solved','_threadCommentDataSource','287FUXqXx','rangeType','_sessionService','pluginName','filter','threadId','requireSession','pipe','parse','getMemberID','get','content','UniverThreadComment','@univerjs-pro/license','_initUserSync','/edit','UniverThreadCommentUIPlugin','@univerjs/thread-comment-ui','error','payload','580EgRvgB','add','_threadCommentModel','getCurrentUser','format','values','userId','customRanges','ThreadCommentModel','_initDataSource','commentUpdate$','createTimestamp','parentId','UniverThreadCommentDataSourcePlugin'];_0xcde1=function(){return _0x731c3f;};return _0xcde1();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.15.0-insiders.
|
|
3
|
+
"version": "0.15.0-insiders.20260107-3d1cfdf",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs
|
|
48
|
+
"@univerjs/core": "0.15.0-insiders.20260107-3d1cfdf",
|
|
49
|
+
"@univerjs-pro/license": "0.15.0-insiders.20260107-3d1cfdf",
|
|
50
|
+
"@univerjs/network": "0.15.0-insiders.20260107-3d1cfdf",
|
|
49
51
|
"@univerjs/protocol": "0.1.48",
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/
|
|
53
|
-
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260106-79b11f9",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260106-79b11f9"
|
|
52
|
+
"@univerjs/thread-comment": "0.15.0-insiders.20260107-3d1cfdf",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.15.0-insiders.20260107-3d1cfdf",
|
|
54
|
+
"@univerjs-pro/collaboration-client": "0.15.0-insiders.20260107-3d1cfdf"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|