@univerjs-pro/thread-comment-datasource 0.6.1 → 0.6.2-nightly.202503031606
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/umd/index.js +1 -1
- package/package.json +11 -11
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x153259=_0x573a;function _0x3da2(){const _0x44ccc2=['7EpsGwa','requireSession','_commentService','IConfigService','createTimestamp','map','solved','onStarting','DependentOn','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','15286792FaZMVe','user','Solve','CustomRangeType','getUnit','getComment','/reply','onReady','find','deleteComment','Disposable','rangeType','personId','add','userID','Module','_httpService','@univerjs/thread-comment','addUser','4ivYFez','736516RtegBk','52160339VTCdOA','body','3673645UEmfQE','/list','rxjs','@univerjs/core','UNRECOGNIZED','thread-comment-data-source.config','IThreadCommentDataSourceService','UNIVER_UNKNOWN','customRanges','10LFkNxg','/solved','subscribe','getMemberID','_config','format','listComments','getCurrentUser','resolveComment','_configService','Injector','userId','COMMENT','/universer-api/comment/unit/','type','ThreadCommentModel','_initDataSource','threadId','pluginName','replies','post','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','ref','_threadCommentDataSourceService','dayjs','/edit','code','forEach','UniverThreadCommentDataSourcePlugin','Solved','_threadCommentModel','360966FlGtzm','saveCommentToSnapshot','syncUpdateMutationToColla','/universer-api/user/list','UniverLicensePlugin','Edit','_init','replyId','UserManagerService','error','getUser','bufferTime','Delete','1120958cOlwYp','parse','@univerjs-pro/license','Add','unitId','updateComment','filter','@univerjs-pro/collaboration-client','_sessionService','users','HTTPService','values','14113107RWVsql','rangeId','@univerjs/thread-comment-ui','disposeWithMe','UniverThreadCommentUIPlugin','commentUpdate$','_injector','reply','stringify','get','parentId','delete','YYYY/MM/DD\x20HH:mm','Inject','resolved','dataSource','pipe','CollaborationSessionService','_threadCommentDataSource','6qMRKty','Unknown','Reply','addComment','defineProperty','content','@univerjs/network','payload','_userService','comments','length'];_0x3da2=function(){return _0x44ccc2;};return _0x3da2();}(function(_0x40f8a2,_0x2e68c1){const _0x217744=_0x573a,_0x2411c4=_0x40f8a2();while(!![]){try{const _0x5ab198=-parseInt(_0x217744(0x103))/0x1+parseInt(_0x217744(0x13c))/0x2*(parseInt(_0x217744(0xda))/0x3)+-parseInt(_0x217744(0x102))/0x4*(parseInt(_0x217744(0x106))/0x5)+parseInt(_0x217744(0x12f))/0x6*(parseInt(_0x217744(0xe5))/0x7)+-parseInt(_0x217744(0xef))/0x8+-parseInt(_0x217744(0xc7))/0x9*(parseInt(_0x217744(0x10f))/0xa)+parseInt(_0x217744(0x104))/0xb;if(_0x5ab198===_0x2e68c1)break;else _0x2411c4['push'](_0x2411c4['shift']());}catch(_0x349f55){_0x2411c4['push'](_0x2411c4['shift']());}}}(_0x3da2,0xed7cf));Object[_0x153259(0xde)](exports,Symbol['toStringTag'],{'value':_0x153259(0xfe)});const b=require(_0x153259(0x143)),T=require(_0x153259(0x13e)),c=require(_0x153259(0x109)),j=require(_0x153259(0xc9)),M=require(_0x153259(0x100)),w=require(_0x153259(0x108)),P=require(_0x153259(0xe0)),U=_0x153259(0xee);var I=(_0xc58103=>(_0xc58103[_0xc58103['OpenOrReOpen']=0x0]='OpenOrReOpen',_0xc58103[_0xc58103[_0x153259(0x12d)]=0x1]=_0x153259(0x12d),_0xc58103[_0xc58103['UNRECOGNIZED']=-0x1]=_0x153259(0x10a),_0xc58103))(I||{}),v=(_0x12db65=>(_0x12db65[_0x12db65[_0x153259(0xdb)]=0x0]='Unknown',_0x12db65[_0x12db65['Add']=0x1]=_0x153259(0x13f),_0x12db65[_0x12db65[_0x153259(0xdc)]=0x2]=_0x153259(0xdc),_0x12db65[_0x12db65[_0x153259(0x134)]=0x3]='Edit',_0x12db65[_0x12db65['Delete']=0x4]=_0x153259(0x13b),_0x12db65[_0x12db65[_0x153259(0xf1)]=0x5]='Solve',_0x12db65[_0x12db65[_0x153259(0x10a)]=-0x1]='UNRECOGNIZED',_0x12db65))(v||{});const f=_0x496775=>c['dayjs'](new Date(+_0x496775))[_0x153259(0x114)](_0x153259(0xd3)),R=async(_0xe2191b,_0x57da1e)=>{const _0x2f21e8=_0x153259,_0x2f2065=_0xe2191b['get'](c[_0x2f21e8(0x137)]),_0x37ebab=_0xe2191b['get'](P['HTTPService']);_0x57da1e[_0x2f21e8(0x12b)](_0x26f019=>{const _0x3c2ca4=_0x2f21e8;_0x2f2065[_0x3c2ca4(0x139)](_0x26f019)&&_0x57da1e[_0x3c2ca4(0xd2)](_0x26f019);}),_0x57da1e['size']&&(await _0x37ebab[_0x2f21e8(0xd0)](_0x2f21e8(0x132),{'params':{'userIDs':[..._0x57da1e]}}))[_0x2f21e8(0x105)][_0x2f21e8(0xc4)][_0x2f21e8(0x12b)](_0x123790=>{const _0x2044e7=_0x2f21e8;_0x123790&&_0x2f2065[_0x2044e7(0x101)](_0x123790);});};function _0x573a(_0x44e0f2,_0x6365d8){const _0x3da262=_0x3da2();return _0x573a=function(_0x573a6a,_0x4f6b19){_0x573a6a=_0x573a6a-0xc4;let _0x183c49=_0x3da262[_0x573a6a];return _0x183c49;},_0x573a(_0x44e0f2,_0x6365d8);}var $=Object[_0x153259(0x124)],E=(_0x4e378e,_0x283f08,_0x2239f1,_0x26a02c)=>{for(var _0x242bcc=_0x26a02c>0x1?void 0x0:_0x26a02c?$(_0x283f08,_0x2239f1):_0x283f08,_0x993af4=_0x4e378e['length']-0x1,_0x2b943f;_0x993af4>=0x0;_0x993af4--)(_0x2b943f=_0x4e378e[_0x993af4])&&(_0x242bcc=_0x2b943f(_0x242bcc)||_0x242bcc);return _0x242bcc;},S=(_0x4a0562,_0x4d1423)=>(_0xb07afb,_0x4ba6f6)=>_0x4d1423(_0xb07afb,_0x4ba6f6,_0x4a0562);let p=class extends c[_0x153259(0xf9)]{constructor(_0x31123a,_0x229bb5,_0xab1c50,_0x389c06){const _0x2a2c92=_0x153259;super(),this[_0x2a2c92(0xe7)]=_0x31123a,this['_threadCommentModel']=_0x229bb5,this['_userService']=_0xab1c50,this['_injector']=_0x389c06,this[_0x2a2c92(0x135)](),this['_initUserSync']();}['_initUserSync'](){const _0x4a63ce=_0x153259;this[_0x4a63ce(0xca)](this[_0x4a63ce(0x12e)][_0x4a63ce(0xcc)][_0x4a63ce(0xd7)](w[_0x4a63ce(0x13a)](0x10))[_0x4a63ce(0x111)](_0x30cf12=>{const _0x5d2f7b=new Set();_0x30cf12['forEach'](_0x444ed1=>{const _0x1fb518=_0x573a;switch(_0x444ed1[_0x1fb518(0x11d)]){case _0x1fb518(0xfc):{const _0xf7c9a4=_0x444ed1[_0x1fb518(0xe1)][_0x1fb518(0xfb)];_0x5d2f7b[_0x1fb518(0xfc)](_0xf7c9a4);break;}}}),R(this['_injector'],_0x5d2f7b);}));}[_0x153259(0x135)](){const _0x165a2c=_0x153259;this['disposeWithMe'](this['_commentService'][_0x165a2c(0xcc)][_0x165a2c(0x111)](async _0x6b053c=>{const _0xb6cb6f=_0x165a2c;var _0x5b4a1f,_0x5f21b9,_0x5775e1,_0x389025;const _0x331fff=(_0x5b4a1f=this[_0xb6cb6f(0x12e)]['getUnit'](_0x6b053c[_0xb6cb6f(0x140)])[_0xb6cb6f(0xf7)](_0x267d2b=>_0x267d2b['threadId']===_0x6b053c['threadId']))==null?void 0x0:_0x5b4a1f['root'];if(!_0x331fff)return;const {unitId:_0x34244c,subUnitId:_0x2bcce8}=_0x331fff;switch(_0x6b053c[_0xb6cb6f(0xf0)]&&this[_0xb6cb6f(0xe2)][_0xb6cb6f(0x101)](_0x6b053c['user']),_0x6b053c[_0xb6cb6f(0x11d)]){case v[_0xb6cb6f(0x13f)]:break;case v[_0xb6cb6f(0xdc)]:{this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xdd)](_0x34244c,_0x2bcce8,{'unitId':_0x34244c,'subUnitId':_0x2bcce8,'ref':'','id':_0x6b053c['replyId'],'dT':f(+_0x6b053c[_0xb6cb6f(0xe9)]),'threadId':_0x6b053c['threadId'],'personId':(_0x5775e1=(_0x5f21b9=_0x6b053c['user'])==null?void 0x0:_0x5f21b9[_0xb6cb6f(0xfd)])!=null?_0x5775e1:_0x6b053c[_0xb6cb6f(0x11a)],'text':JSON[_0xb6cb6f(0x13d)](_0x6b053c[_0xb6cb6f(0xdf)]),'parentId':_0x331fff['id']});break;}case v[_0xb6cb6f(0x13b)]:{const _0x12079d=this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf4)](_0x34244c,_0x2bcce8,_0x6b053c[_0xb6cb6f(0x136)]);_0x12079d&&_0x12079d[_0xb6cb6f(0xd1)]&&this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf8)](_0x34244c,_0x2bcce8,_0x6b053c[_0xb6cb6f(0x136)]);break;}case v['Edit']:{this[_0xb6cb6f(0x12e)][_0xb6cb6f(0x141)](_0x34244c,_0x2bcce8,{'commentId':_0x6b053c['replyId'],'text':JSON['parse'](_0x6b053c[_0xb6cb6f(0xdf)])});break;}case v[_0xb6cb6f(0xf1)]:{const _0x35b3b2=(_0x389025=this[_0xb6cb6f(0x12e)][_0xb6cb6f(0xf3)](_0x6b053c['unitId'])[_0xb6cb6f(0xf7)](_0x49868a=>_0x49868a[_0xb6cb6f(0x120)]===_0x6b053c[_0xb6cb6f(0x120)]))==null?void 0x0:_0x389025['root'];_0x35b3b2&&this[_0xb6cb6f(0x12e)][_0xb6cb6f(0x117)](_0x34244c,_0x2bcce8,_0x35b3b2['id'],_0x6b053c[_0xb6cb6f(0xeb)]===I[_0xb6cb6f(0x12d)]);break;}}}));}};p=E([S(0x0,c[_0x153259(0xd4)](b['CommentService'])),S(0x1,c['Inject'](M[_0x153259(0x11e)])),S(0x2,c[_0x153259(0xd4)](c[_0x153259(0x137)])),S(0x3,c[_0x153259(0xd4)](c[_0x153259(0x119)]))],p);const q=_0x153259(0x10b),D={};var A=Object[_0x153259(0x124)],x=(_0x5e3839,_0x3bb5ad,_0x424a57,_0x2e5258)=>{const _0x45c3e7=_0x153259;for(var _0x5f5c14=_0x2e5258>0x1?void 0x0:_0x2e5258?A(_0x3bb5ad,_0x424a57):_0x3bb5ad,_0x734136=_0x5e3839[_0x45c3e7(0xe4)]-0x1,_0x1dede9;_0x734136>=0x0;_0x734136--)(_0x1dede9=_0x5e3839[_0x734136])&&(_0x5f5c14=_0x1dede9(_0x5f5c14)||_0x5f5c14);return _0x5f5c14;},_=(_0x55bb87,_0xdabfb3)=>(_0x44693e,_0x31902b)=>_0xdabfb3(_0x44693e,_0x31902b,_0x55bb87);function Y(_0x3e9307,_0xedbab9){const _0x49bde7=_0x153259,_0x12e711=_0x3e9307['replies'][0x0];return{..._0xedbab9,'id':_0x12e711[_0x49bde7(0x136)],'resolved':_0x3e9307[_0x49bde7(0xeb)]===0x1,'dT':f(_0x12e711[_0x49bde7(0xe9)]),'personId':_0x12e711[_0x49bde7(0x11a)],'threadId':_0x12e711[_0x49bde7(0x120)]};}function G(_0x4ab868,_0x460ece,_0x25e337){const _0x475db0=_0x153259;var _0x5bf14f,_0x4a8ace;if(((_0x4a8ace=(_0x5bf14f=_0x4ab868==null?void 0x0:_0x4ab868[_0x475db0(0x122)])==null?void 0x0:_0x5bf14f['length'])!=null?_0x4a8ace:0x0)>0x0){const _0x25a209=(_0x1ec2d8,_0x24ab34)=>({'id':_0x1ec2d8['replyId'],'threadId':_0x1ec2d8['threadId'],'dT':f(_0x1ec2d8['createTimestamp']),'personId':_0x1ec2d8[_0x475db0(0x11a)],'resolved':_0x4ab868['solved']===I[_0x475db0(0x12d)],'unitId':_0x460ece,'subUnitId':_0x25e337,'text':JSON['parse'](_0x1ec2d8['content']),'parentId':_0x24ab34}),_0xec3a50=_0x25a209(_0x4ab868[_0x475db0(0x122)][0x0]);return{..._0xec3a50,'children':_0x4ab868[_0x475db0(0x122)]['slice'](0x1)[_0x475db0(0xea)](_0x3b68e1=>_0x25a209(_0x3b68e1,_0xec3a50['id']))};}return null;}let g=class{constructor(_0x440ffb,_0x3e275d,_0x5d7b98,_0x43c70d){const _0x31d4cf=_0x153259;this[_0x31d4cf(0xff)]=_0x440ffb,this[_0x31d4cf(0xe2)]=_0x3e275d,this['_sessionService']=_0x5d7b98,this[_0x31d4cf(0xcd)]=_0x43c70d;}async[_0x153259(0xdd)](_0x4fed14){const _0x124be3=_0x153259;var _0x56c865,_0x346e6b;const {parentId:_0x5e1d33,unitId:_0x5585e0,text:_0x2191db,threadId:_0x126ce6}=_0x4fed14,_0x3a07d6=(_0x346e6b=(_0x56c865=_0x2191db[_0x124be3(0x10e)])==null?void 0x0:_0x56c865['filter'](_0x19b519=>_0x19b519[_0x124be3(0xfa)]===c[_0x124be3(0xf2)][_0x124be3(0x11b)])[_0x124be3(0xea)](_0x4dbdb8=>_0x4dbdb8[_0x124be3(0xc8)]))!=null?_0x346e6b:[],_0x7594e=JSON[_0x124be3(0xcf)](_0x2191db),_0x5a8fb6=(await this[_0x124be3(0x144)]['requireSession'](_0x5585e0))[_0x124be3(0x112)]();if(_0x5e1d33){const _0x56948b={'memberId':_0x5a8fb6,'unitId':_0x5585e0,'content':_0x7594e,'mention':_0x3a07d6,'threadId':_0x126ce6},_0x353fa9=(await this[_0x124be3(0xff)][_0x124be3(0x123)](_0x124be3(0x11c)+_0x5585e0+_0x124be3(0xf5),{'body':_0x56948b}))[_0x124be3(0x105)][_0x124be3(0xce)];return{..._0x4fed14,'id':_0x353fa9[_0x124be3(0x136)],'dT':c[_0x124be3(0x128)](+_0x353fa9['createTimestamp'])[_0x124be3(0x114)](_0x124be3(0xd3)),'personId':_0x353fa9['userId']};}else{const _0x557eea={'memberId':_0x5a8fb6,'unitId':_0x5585e0,'content':_0x7594e,'mention':_0x3a07d6},_0x53bcdb=await this[_0x124be3(0xff)][_0x124be3(0x123)](_0x124be3(0x11c)+_0x5585e0+'/add',{'body':_0x557eea});return Y(_0x53bcdb[_0x124be3(0x105)]['comment'],_0x4fed14);}}async['updateComment'](_0x5d82a7){const _0xb2b8ab=_0x153259;var _0x1c8d88,_0x4309a6;const {text:_0x1dc847,unitId:_0x21457f}=_0x5d82a7,_0x1acaa3=(_0x4309a6=(_0x1c8d88=_0x1dc847['customRanges'])==null?void 0x0:_0x1c8d88[_0xb2b8ab(0x142)](_0x14d690=>_0x14d690[_0xb2b8ab(0xfa)]===c[_0xb2b8ab(0xf2)]['COMMENT'])['map'](_0x46b2c0=>_0x46b2c0['rangeId']))!=null?_0x4309a6:[],_0x277819=JSON[_0xb2b8ab(0xcf)](_0x1dc847),_0x1a0acf=_0x5d82a7['threadId'],_0x6576f9=_0x5d82a7['id'],_0x35ee97={'memberId':(await this[_0xb2b8ab(0x144)][_0xb2b8ab(0xe6)](_0x21457f))[_0xb2b8ab(0x112)](),'unitId':_0x21457f,'threadId':_0x1a0acf,'mention':_0x1acaa3,'content':_0x277819,'replyId':_0x6576f9},_0x111da2=await this[_0xb2b8ab(0xff)][_0xb2b8ab(0x123)](_0xb2b8ab(0x11c)+_0x21457f+_0xb2b8ab(0x129),{'body':_0x35ee97});return!_0x111da2['body'][_0xb2b8ab(0x138)]||_0x111da2[_0xb2b8ab(0x105)]['error'][_0xb2b8ab(0x12a)]===0x1;}async[_0x153259(0x117)](_0x218fe7){const _0x406fdf=_0x153259,{unitId:_0x39bc9a}=_0x218fe7,_0x8b869=_0x218fe7['threadId'],_0x588471={'memberId':this['_userService'][_0x406fdf(0x116)]()[_0x406fdf(0xfd)],'unitId':_0x39bc9a,'threadId':_0x8b869,'solved':_0x218fe7[_0x406fdf(0xd5)]?I['Solved']:I['OpenOrReOpen']},_0xb6d735=await this[_0x406fdf(0xff)]['post'](_0x406fdf(0x11c)+_0x39bc9a+_0x406fdf(0x110),{'body':_0x588471});return!_0xb6d735['body'][_0x406fdf(0x138)]||_0xb6d735[_0x406fdf(0x105)][_0x406fdf(0x138)][_0x406fdf(0x12a)]===0x1;}async[_0x153259(0xf8)](_0x3c228f,_0x40bf2e,_0x5910ea,_0x2a4cce){const _0x12f587=_0x153259,_0x21b617={'memberId':(await this[_0x12f587(0x144)][_0x12f587(0xe6)](_0x3c228f))[_0x12f587(0x112)](),'threadId':_0x5910ea,'replyId':_0x2a4cce,'unitId':_0x3c228f},_0x35df84=await this[_0x12f587(0xff)][_0x12f587(0x123)](_0x12f587(0x11c)+_0x3c228f+'/delete',{'body':_0x21b617});return!_0x35df84[_0x12f587(0x105)][_0x12f587(0x138)]||_0x35df84[_0x12f587(0x105)]['error'][_0x12f587(0x12a)]===0x1;}async[_0x153259(0x115)](_0xca1bf,_0x4ecb50,_0x4bd003){const _0x5eff24=_0x153259,_0x3b52d5={'unitId':_0xca1bf,'threadId':_0x4bd003},_0x274ab1=await this[_0x5eff24(0xff)][_0x5eff24(0x123)]('/universer-api/comment/unit/'+_0xca1bf+_0x5eff24(0x107),{'body':_0x3b52d5}),_0x2e2e54=_0x4bd003[_0x5eff24(0xea)](_0x1b3152=>G(_0x274ab1[_0x5eff24(0x105)][_0x5eff24(0xe3)][_0x1b3152],_0xca1bf,_0x4ecb50))[_0x5eff24(0x142)](Boolean);return Object[_0x5eff24(0xc6)](_0x274ab1[_0x5eff24(0x105)][_0x5eff24(0xc4)])['forEach'](_0x2b2cd9=>{const _0x181769=_0x5eff24;this[_0x181769(0xe2)][_0x181769(0x101)](_0x2b2cd9);}),_0x2e2e54;}[_0x153259(0x130)](_0x473926){const _0x42d1c8=_0x153259;return{'id':_0x473926['id'],'threadId':_0x473926[_0x42d1c8(0x120)],'ref':_0x473926[_0x42d1c8(0x126)]};}};g=x([_(0x0,c[_0x153259(0xd4)](P[_0x153259(0xc5)])),_(0x1,c[_0x153259(0xd4)](c['UserManagerService'])),_(0x2,c['Inject'](b[_0x153259(0xd8)])),_(0x3,c[_0x153259(0xd4)](c[_0x153259(0x119)]))],g);var H=Object[_0x153259(0x124)],J=(_0x233908,_0x5d0202,_0x5767e7,_0x663d9c)=>{const _0x29f15c=_0x153259;for(var _0x11404b=_0x663d9c>0x1?void 0x0:_0x663d9c?H(_0x5d0202,_0x5767e7):_0x5d0202,_0x26967b=_0x233908[_0x29f15c(0xe4)]-0x1,_0x18f775;_0x26967b>=0x0;_0x26967b--)(_0x18f775=_0x233908[_0x26967b])&&(_0x11404b=_0x18f775(_0x11404b)||_0x11404b);return _0x11404b;},y=(_0x1f41d7,_0x11eafc)=>(_0x3223e9,_0x31c36e)=>_0x11eafc(_0x3223e9,_0x31c36e,_0x1f41d7);let C=class extends c['Disposable']{constructor(_0x45604b,_0x32b273){const _0x1e4233=_0x153259;super(),this[_0x1e4233(0x127)]=_0x45604b,this[_0x1e4233(0xd9)]=_0x32b273,this['_initDataSource']();}[_0x153259(0x11f)](){const _0x5f0ca0=_0x153259;this[_0x5f0ca0(0x127)][_0x5f0ca0(0xd6)]=this[_0x5f0ca0(0xd9)],this[_0x5f0ca0(0x127)][_0x5f0ca0(0x131)]=!0x1;}};C=J([y(0x0,M[_0x153259(0x10c)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x153259(0xde)],L=Object[_0x153259(0x124)],Z=(_0x3ce056,_0x2aaf54,_0xe60ec)=>_0x2aaf54 in _0x3ce056?F(_0x3ce056,_0x2aaf54,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xe60ec}):_0x3ce056[_0x2aaf54]=_0xe60ec,W=(_0x3fe632,_0x45ce44,_0x323244,_0x4899ce)=>{const _0x41bca7=_0x153259;for(var _0x3996cb=_0x4899ce>0x1?void 0x0:_0x4899ce?L(_0x45ce44,_0x323244):_0x45ce44,_0x196e16=_0x3fe632[_0x41bca7(0xe4)]-0x1,_0x314d6c;_0x196e16>=0x0;_0x196e16--)(_0x314d6c=_0x3fe632[_0x196e16])&&(_0x3996cb=_0x314d6c(_0x3996cb)||_0x3996cb);return _0x3996cb;},O=(_0x1b9a58,_0x1535cb)=>(_0x22aa72,_0x55641d)=>_0x1535cb(_0x22aa72,_0x55641d,_0x1b9a58),N=(_0x3a739a,_0x53c538,_0x581cd1)=>Z(_0x3a739a,typeof _0x53c538!='symbol'?_0x53c538+'':_0x53c538,_0x581cd1);exports[_0x153259(0x12c)]=class extends c['Plugin']{constructor(_0xd1394e=D,_0x121799,_0xcdb078){const _0xda47da=_0x153259;super(),this['_config']=_0xd1394e,this[_0xda47da(0xcd)]=_0x121799,this['_configService']=_0xcdb078;const {..._0x4b9835}=c['merge']({},D,this[_0xda47da(0x113)]);this[_0xda47da(0x118)]['setConfig'](q,_0x4b9835);}[_0x153259(0xec)](){const _0x23d7eb=_0x153259;[[g],[C],[p]][_0x23d7eb(0x12b)](_0x512246=>{const _0x41d877=_0x23d7eb;this[_0x41d877(0xcd)][_0x41d877(0xfc)](_0x512246);});}[_0x153259(0xf6)](){const _0x29fa3c=_0x153259;this[_0x29fa3c(0xcd)][_0x29fa3c(0xd0)](C),this[_0x29fa3c(0xcd)]['get'](p);}},N(exports[_0x153259(0x12c)],_0x153259(0x121),U),N(exports[_0x153259(0x12c)],'type',c['UniverInstanceType'][_0x153259(0x10d)]),exports[_0x153259(0x12c)]=W([c[_0x153259(0xed)](j[_0x153259(0xcb)],b[_0x153259(0x125)],T[_0x153259(0x133)]),O(0x1,c[_0x153259(0xd4)](c[_0x153259(0x119)])),O(0x2,c[_0x153259(0xe8)])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x2cd34a=_0x3c05;(function(_0x46d5f5,_0x49a94d){const _0x43eacf=_0x3c05,_0x495cff=_0x46d5f5();while(!![]){try{const _0x2ed150=-parseInt(_0x43eacf(0x11e))/0x1+-parseInt(_0x43eacf(0xde))/0x2*(-parseInt(_0x43eacf(0xea))/0x3)+-parseInt(_0x43eacf(0xf3))/0x4+-parseInt(_0x43eacf(0x11c))/0x5*(parseInt(_0x43eacf(0xf0))/0x6)+parseInt(_0x43eacf(0xfc))/0x7+-parseInt(_0x43eacf(0x120))/0x8*(-parseInt(_0x43eacf(0xc8))/0x9)+parseInt(_0x43eacf(0xba))/0xa;if(_0x2ed150===_0x49a94d)break;else _0x495cff['push'](_0x495cff['shift']());}catch(_0x49a6c7){_0x495cff['push'](_0x495cff['shift']());}}}(_0x500d,0x6d648));Object[_0x2cd34a(0xbb)](exports,Symbol[_0x2cd34a(0xf2)],{'value':_0x2cd34a(0xc7)});const b=require(_0x2cd34a(0xce)),T=require(_0x2cd34a(0xdc)),c=require('@univerjs/core'),j=require(_0x2cd34a(0x11d)),M=require(_0x2cd34a(0xeb)),w=require(_0x2cd34a(0xef)),P=require(_0x2cd34a(0xff)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4e4346=>(_0x4e4346[_0x4e4346[_0x2cd34a(0x133)]=0x0]=_0x2cd34a(0x133),_0x4e4346[_0x4e4346['Solved']=0x1]=_0x2cd34a(0x10f),_0x4e4346[_0x4e4346['UNRECOGNIZED']=-0x1]=_0x2cd34a(0x130),_0x4e4346))(I||{}),v=(_0x4f70cd=>(_0x4f70cd[_0x4f70cd[_0x2cd34a(0xca)]=0x0]=_0x2cd34a(0xca),_0x4f70cd[_0x4f70cd[_0x2cd34a(0x110)]=0x1]='Add',_0x4f70cd[_0x4f70cd['Reply']=0x2]=_0x2cd34a(0xd8),_0x4f70cd[_0x4f70cd[_0x2cd34a(0x10e)]=0x3]=_0x2cd34a(0x10e),_0x4f70cd[_0x4f70cd[_0x2cd34a(0x127)]=0x4]=_0x2cd34a(0x127),_0x4f70cd[_0x4f70cd[_0x2cd34a(0x113)]=0x5]=_0x2cd34a(0x113),_0x4f70cd[_0x4f70cd['UNRECOGNIZED']=-0x1]=_0x2cd34a(0x130),_0x4f70cd))(v||{});const f=_0x5a200f=>c[_0x2cd34a(0xcf)](new Date(+_0x5a200f))[_0x2cd34a(0xc1)]('YYYY/MM/DD\x20HH:mm'),R=async(_0xdaa30e,_0x562790)=>{const _0x3adbed=_0x2cd34a,_0x491a22=_0xdaa30e[_0x3adbed(0xbf)](c[_0x3adbed(0xfe)]),_0x280e4d=_0xdaa30e[_0x3adbed(0xbf)](P[_0x3adbed(0xd2)]);_0x562790[_0x3adbed(0xe9)](_0x2519aa=>{_0x491a22['getUser'](_0x2519aa)&&_0x562790['delete'](_0x2519aa);}),_0x562790[_0x3adbed(0xc9)]&&(await _0x280e4d[_0x3adbed(0xbf)](_0x3adbed(0xbd),{'params':{'userIDs':[..._0x562790]}}))[_0x3adbed(0xbc)][_0x3adbed(0xd5)][_0x3adbed(0xe9)](_0x197f39=>{const _0x5a747f=_0x3adbed;_0x197f39&&_0x491a22[_0x5a747f(0x128)](_0x197f39);});};var $=Object[_0x2cd34a(0xdb)],E=(_0x3b5f1e,_0x405699,_0x553bc8,_0x1d5fa2)=>{const _0x5aba6b=_0x2cd34a;for(var _0x88dc84=_0x1d5fa2>0x1?void 0x0:_0x1d5fa2?$(_0x405699,_0x553bc8):_0x405699,_0x437f8a=_0x3b5f1e[_0x5aba6b(0xcc)]-0x1,_0x29b78f;_0x437f8a>=0x0;_0x437f8a--)(_0x29b78f=_0x3b5f1e[_0x437f8a])&&(_0x88dc84=_0x29b78f(_0x88dc84)||_0x88dc84);return _0x88dc84;},S=(_0x2bb5dc,_0x4924ae)=>(_0x1bc917,_0x499dfe)=>_0x4924ae(_0x1bc917,_0x499dfe,_0x2bb5dc);let p=class extends c[_0x2cd34a(0x118)]{constructor(_0x5da55a,_0x578731,_0x1285f4,_0x305f99){const _0x369a04=_0x2cd34a;super(),this[_0x369a04(0x11a)]=_0x5da55a,this[_0x369a04(0xb9)]=_0x578731,this[_0x369a04(0x12d)]=_0x1285f4,this['_injector']=_0x305f99,this[_0x369a04(0xfa)](),this[_0x369a04(0xf4)]();}[_0x2cd34a(0xf4)](){const _0x1adb7b=_0x2cd34a;this[_0x1adb7b(0x102)](this[_0x1adb7b(0xb9)][_0x1adb7b(0x12c)]['pipe'](w[_0x1adb7b(0xe1)](0x10))[_0x1adb7b(0x122)](_0xdeb8de=>{const _0x46ad8b=new Set();_0xdeb8de['forEach'](_0x1813ac=>{const _0x2e17a5=_0x3c05;switch(_0x1813ac[_0x2e17a5(0xd1)]){case _0x2e17a5(0xbe):{const _0x1de973=_0x1813ac[_0x2e17a5(0x119)][_0x2e17a5(0xe6)];_0x46ad8b['add'](_0x1de973);break;}}}),R(this['_injector'],_0x46ad8b);}));}['_init'](){const _0x8b62aa=_0x2cd34a;this[_0x8b62aa(0x102)](this[_0x8b62aa(0x11a)][_0x8b62aa(0x12c)]['subscribe'](async _0x48b1c4=>{const _0x4be0a8=_0x8b62aa;var _0x1a26c7,_0x429eaa,_0x103bd2,_0x545480;const _0x16e945=(_0x1a26c7=this['_threadCommentModel'][_0x4be0a8(0x111)](_0x48b1c4['unitId'])['find'](_0x4ba1d1=>_0x4ba1d1['threadId']===_0x48b1c4[_0x4be0a8(0x131)]))==null?void 0x0:_0x1a26c7[_0x4be0a8(0x134)];if(!_0x16e945)return;const {unitId:_0x17d695,subUnitId:_0x3a54b6}=_0x16e945;switch(_0x48b1c4[_0x4be0a8(0x10a)]&&this[_0x4be0a8(0x12d)]['addUser'](_0x48b1c4[_0x4be0a8(0x10a)]),_0x48b1c4[_0x4be0a8(0xd1)]){case v[_0x4be0a8(0x110)]:break;case v[_0x4be0a8(0xd8)]:{this[_0x4be0a8(0xb9)]['addComment'](_0x17d695,_0x3a54b6,{'unitId':_0x17d695,'subUnitId':_0x3a54b6,'ref':'','id':_0x48b1c4[_0x4be0a8(0xc5)],'dT':f(+_0x48b1c4[_0x4be0a8(0x116)]),'threadId':_0x48b1c4['threadId'],'personId':(_0x103bd2=(_0x429eaa=_0x48b1c4[_0x4be0a8(0x10a)])==null?void 0x0:_0x429eaa[_0x4be0a8(0x129)])!=null?_0x103bd2:_0x48b1c4[_0x4be0a8(0xda)],'text':JSON['parse'](_0x48b1c4[_0x4be0a8(0xe2)]),'parentId':_0x16e945['id']});break;}case v[_0x4be0a8(0x127)]:{const _0x289cc4=this[_0x4be0a8(0xb9)][_0x4be0a8(0xc6)](_0x17d695,_0x3a54b6,_0x48b1c4[_0x4be0a8(0xc5)]);_0x289cc4&&_0x289cc4[_0x4be0a8(0xfb)]&&this['_threadCommentModel'][_0x4be0a8(0xd6)](_0x17d695,_0x3a54b6,_0x48b1c4[_0x4be0a8(0xc5)]);break;}case v[_0x4be0a8(0x10e)]:{this['_threadCommentModel'][_0x4be0a8(0x11b)](_0x17d695,_0x3a54b6,{'commentId':_0x48b1c4[_0x4be0a8(0xc5)],'text':JSON[_0x4be0a8(0x108)](_0x48b1c4[_0x4be0a8(0xe2)])});break;}case v[_0x4be0a8(0x113)]:{const _0x176565=(_0x545480=this[_0x4be0a8(0xb9)][_0x4be0a8(0x111)](_0x48b1c4['unitId'])['find'](_0x48e7f2=>_0x48e7f2[_0x4be0a8(0x131)]===_0x48b1c4[_0x4be0a8(0x131)]))==null?void 0x0:_0x545480['root'];_0x176565&&this[_0x4be0a8(0xb9)][_0x4be0a8(0x103)](_0x17d695,_0x3a54b6,_0x176565['id'],_0x48b1c4[_0x4be0a8(0xc4)]===I[_0x4be0a8(0x10f)]);break;}}}));}};p=E([S(0x0,c[_0x2cd34a(0x101)](b[_0x2cd34a(0xe5)])),S(0x1,c[_0x2cd34a(0x101)](M[_0x2cd34a(0x11f)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x2cd34a(0x10b),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x16f433,_0x3b50f7,_0x3ee17e,_0x4540f8)=>{for(var _0x4a67e3=_0x4540f8>0x1?void 0x0:_0x4540f8?A(_0x3b50f7,_0x3ee17e):_0x3b50f7,_0x5ad11f=_0x16f433['length']-0x1,_0x238fbb;_0x5ad11f>=0x0;_0x5ad11f--)(_0x238fbb=_0x16f433[_0x5ad11f])&&(_0x4a67e3=_0x238fbb(_0x4a67e3)||_0x4a67e3);return _0x4a67e3;},_=(_0x93af8c,_0x5a9c0f)=>(_0x3c0118,_0x1900d3)=>_0x5a9c0f(_0x3c0118,_0x1900d3,_0x93af8c);function _0x500d(){const _0x4927da=['code','CommentService','personId','YYYY/MM/DD\x20HH:mm','CollaborationSessionService','forEach','5583hBsaTr','@univerjs/thread-comment','error','setConfig','UNIVER_UNKNOWN','rxjs','6MDCllA','reply','toStringTag','911528IaeDBH','_initUserSync','getMemberID','rangeId','UniverThreadCommentDataSourcePlugin','comments','UniverCollaborationClientPlugin','_init','parentId','1646596awTKwZ','_threadCommentDataSource','UserManagerService','@univerjs/network','saveCommentToSnapshot','Inject','disposeWithMe','resolveComment','CustomRangeType','Plugin','/edit','onStarting','parse','merge','user','thread-comment-data-source.config','_injector','resolved','Edit','Solved','Add','getUnit','Injector','Solve','symbol','requireSession','createTimestamp','_config','Disposable','payload','_commentService','updateComment','1527445WPMWrQ','@univerjs/thread-comment-ui','530537ugbxCp','ThreadCommentModel','6152pHciCV','ref','subscribe','getCurrentUser','pluginName','customRanges','UniverLicensePlugin','Delete','addUser','userID','map','syncUpdateMutationToColla','commentUpdate$','_userService','COMMENT','_initDataSource','UNRECOGNIZED','threadId','onReady','OpenOrReOpen','root','_threadCommentModel','3725220YiLFnn','defineProperty','body','/universer-api/user/list','add','get','_httpService','format','replies','_threadCommentDataSourceService','solved','replyId','getComment','Module','738bLCVCe','size','Unknown','stringify','length','values','@univerjs-pro/collaboration-client','dayjs','/add','type','HTTPService','filter','IConfigService','users','deleteComment','slice','Reply','addComment','userId','getOwnPropertyDescriptor','@univerjs-pro/license','/universer-api/comment/unit/','904jlpwbR','rangeType','post','bufferTime','content','_sessionService'];_0x500d=function(){return _0x4927da;};return _0x500d();}function Y(_0x24f5ea,_0x110ec8){const _0x4a94ff=_0x2cd34a,_0x3df9ad=_0x24f5ea[_0x4a94ff(0xc2)][0x0];return{..._0x110ec8,'id':_0x3df9ad['replyId'],'resolved':_0x24f5ea[_0x4a94ff(0xc4)]===0x1,'dT':f(_0x3df9ad[_0x4a94ff(0x116)]),'personId':_0x3df9ad['userId'],'threadId':_0x3df9ad[_0x4a94ff(0x131)]};}function G(_0x99286d,_0x14d6aa,_0x1b29fd){const _0x278523=_0x2cd34a;var _0xc2af30,_0x5f009f;if(((_0x5f009f=(_0xc2af30=_0x99286d==null?void 0x0:_0x99286d['replies'])==null?void 0x0:_0xc2af30[_0x278523(0xcc)])!=null?_0x5f009f:0x0)>0x0){const _0x141427=(_0x502d31,_0x3e3b62)=>({'id':_0x502d31[_0x278523(0xc5)],'threadId':_0x502d31[_0x278523(0x131)],'dT':f(_0x502d31[_0x278523(0x116)]),'personId':_0x502d31[_0x278523(0xda)],'resolved':_0x99286d[_0x278523(0xc4)]===I[_0x278523(0x10f)],'unitId':_0x14d6aa,'subUnitId':_0x1b29fd,'text':JSON[_0x278523(0x108)](_0x502d31[_0x278523(0xe2)]),'parentId':_0x3e3b62}),_0x2df5b2=_0x141427(_0x99286d[_0x278523(0xc2)][0x0]);return{..._0x2df5b2,'children':_0x99286d[_0x278523(0xc2)][_0x278523(0xd7)](0x1)['map'](_0x22851d=>_0x141427(_0x22851d,_0x2df5b2['id']))};}return null;}let g=class{constructor(_0x548ae4,_0x2bbb92,_0x223e05,_0x324691){const _0x343728=_0x2cd34a;this['_httpService']=_0x548ae4,this[_0x343728(0x12d)]=_0x2bbb92,this['_sessionService']=_0x223e05,this[_0x343728(0x10c)]=_0x324691;}async[_0x2cd34a(0xd9)](_0x4f08f3){const _0xbb1845=_0x2cd34a;var _0x536416,_0xd43993;const {parentId:_0x4b3555,unitId:_0x48d09d,text:_0x22e737,threadId:_0x2b7b07}=_0x4f08f3,_0x9d46c2=(_0xd43993=(_0x536416=_0x22e737[_0xbb1845(0x125)])==null?void 0x0:_0x536416['filter'](_0x5eebe2=>_0x5eebe2['rangeType']===c[_0xbb1845(0x104)][_0xbb1845(0x12e)])[_0xbb1845(0x12a)](_0xf89891=>_0xf89891[_0xbb1845(0xf6)]))!=null?_0xd43993:[],_0x3789ae=JSON['stringify'](_0x22e737),_0x1ea6d4=(await this['_sessionService'][_0xbb1845(0x115)](_0x48d09d))[_0xbb1845(0xf5)]();if(_0x4b3555){const _0x36d83d={'memberId':_0x1ea6d4,'unitId':_0x48d09d,'content':_0x3789ae,'mention':_0x9d46c2,'threadId':_0x2b7b07},_0x4a389f=(await this['_httpService'][_0xbb1845(0xe0)](_0xbb1845(0xdd)+_0x48d09d+'/reply',{'body':_0x36d83d}))[_0xbb1845(0xbc)][_0xbb1845(0xf1)];return{..._0x4f08f3,'id':_0x4a389f['replyId'],'dT':c[_0xbb1845(0xcf)](+_0x4a389f[_0xbb1845(0x116)])[_0xbb1845(0xc1)](_0xbb1845(0xe7)),'personId':_0x4a389f['userId']};}else{const _0x13a76d={'memberId':_0x1ea6d4,'unitId':_0x48d09d,'content':_0x3789ae,'mention':_0x9d46c2},_0x1c7b97=await this[_0xbb1845(0xc0)][_0xbb1845(0xe0)](_0xbb1845(0xdd)+_0x48d09d+_0xbb1845(0xd0),{'body':_0x13a76d});return Y(_0x1c7b97['body']['comment'],_0x4f08f3);}}async[_0x2cd34a(0x11b)](_0x1d6693){const _0x3c319a=_0x2cd34a;var _0x2e8308,_0x2444ac;const {text:_0x32a2a6,unitId:_0x3710f8}=_0x1d6693,_0x55bfea=(_0x2444ac=(_0x2e8308=_0x32a2a6['customRanges'])==null?void 0x0:_0x2e8308[_0x3c319a(0xd3)](_0x3631bf=>_0x3631bf[_0x3c319a(0xdf)]===c['CustomRangeType'][_0x3c319a(0x12e)])['map'](_0xdd53c9=>_0xdd53c9[_0x3c319a(0xf6)]))!=null?_0x2444ac:[],_0x34e774=JSON[_0x3c319a(0xcb)](_0x32a2a6),_0x34113b=_0x1d6693[_0x3c319a(0x131)],_0x4318b7=_0x1d6693['id'],_0x2afe27={'memberId':(await this[_0x3c319a(0xe3)][_0x3c319a(0x115)](_0x3710f8))['getMemberID'](),'unitId':_0x3710f8,'threadId':_0x34113b,'mention':_0x55bfea,'content':_0x34e774,'replyId':_0x4318b7},_0x320584=await this[_0x3c319a(0xc0)][_0x3c319a(0xe0)](_0x3c319a(0xdd)+_0x3710f8+_0x3c319a(0x106),{'body':_0x2afe27});return!_0x320584[_0x3c319a(0xbc)][_0x3c319a(0xec)]||_0x320584[_0x3c319a(0xbc)][_0x3c319a(0xec)][_0x3c319a(0xe4)]===0x1;}async[_0x2cd34a(0x103)](_0x3de7f5){const _0x27fc53=_0x2cd34a,{unitId:_0x31b86f}=_0x3de7f5,_0x271e69=_0x3de7f5[_0x27fc53(0x131)],_0x465b1d={'memberId':this['_userService'][_0x27fc53(0x123)]()['userID'],'unitId':_0x31b86f,'threadId':_0x271e69,'solved':_0x3de7f5[_0x27fc53(0x10d)]?I[_0x27fc53(0x10f)]:I[_0x27fc53(0x133)]},_0x271f90=await this[_0x27fc53(0xc0)][_0x27fc53(0xe0)](_0x27fc53(0xdd)+_0x31b86f+'/solved',{'body':_0x465b1d});return!_0x271f90['body'][_0x27fc53(0xec)]||_0x271f90['body']['error']['code']===0x1;}async[_0x2cd34a(0xd6)](_0x2b2cfa,_0x504896,_0x253f35,_0x561f79){const _0x2d636d=_0x2cd34a,_0x2ea6cc={'memberId':(await this[_0x2d636d(0xe3)][_0x2d636d(0x115)](_0x2b2cfa))['getMemberID'](),'threadId':_0x253f35,'replyId':_0x561f79,'unitId':_0x2b2cfa},_0x57941f=await this['_httpService'][_0x2d636d(0xe0)](_0x2d636d(0xdd)+_0x2b2cfa+'/delete',{'body':_0x2ea6cc});return!_0x57941f[_0x2d636d(0xbc)][_0x2d636d(0xec)]||_0x57941f[_0x2d636d(0xbc)][_0x2d636d(0xec)][_0x2d636d(0xe4)]===0x1;}async['listComments'](_0x2265f7,_0x564e51,_0x4e8d47){const _0x343784=_0x2cd34a,_0x2e4abf={'unitId':_0x2265f7,'threadId':_0x4e8d47},_0x1de765=await this[_0x343784(0xc0)]['post'](_0x343784(0xdd)+_0x2265f7+'/list',{'body':_0x2e4abf}),_0x1d050b=_0x4e8d47[_0x343784(0x12a)](_0x5a4a31=>G(_0x1de765['body'][_0x343784(0xf8)][_0x5a4a31],_0x2265f7,_0x564e51))[_0x343784(0xd3)](Boolean);return Object[_0x343784(0xcd)](_0x1de765[_0x343784(0xbc)][_0x343784(0xd5)])[_0x343784(0xe9)](_0x975601=>{this['_userService']['addUser'](_0x975601);}),_0x1d050b;}[_0x2cd34a(0x100)](_0x2143d2){const _0x171a2c=_0x2cd34a;return{'id':_0x2143d2['id'],'threadId':_0x2143d2[_0x171a2c(0x131)],'ref':_0x2143d2[_0x171a2c(0x121)]};}};g=x([_(0x0,c[_0x2cd34a(0x101)](P[_0x2cd34a(0xd2)])),_(0x1,c[_0x2cd34a(0x101)](c['UserManagerService'])),_(0x2,c[_0x2cd34a(0x101)](b[_0x2cd34a(0xe8)])),_(0x3,c[_0x2cd34a(0x101)](c['Injector']))],g);var H=Object[_0x2cd34a(0xdb)],J=(_0x545cef,_0x51f1f4,_0x39863a,_0x22c529)=>{for(var _0x3a4fa1=_0x22c529>0x1?void 0x0:_0x22c529?H(_0x51f1f4,_0x39863a):_0x51f1f4,_0x765c03=_0x545cef['length']-0x1,_0x1c4688;_0x765c03>=0x0;_0x765c03--)(_0x1c4688=_0x545cef[_0x765c03])&&(_0x3a4fa1=_0x1c4688(_0x3a4fa1)||_0x3a4fa1);return _0x3a4fa1;},y=(_0x135695,_0x5d9a2b)=>(_0x394174,_0x1f33ba)=>_0x5d9a2b(_0x394174,_0x1f33ba,_0x135695);let C=class extends c[_0x2cd34a(0x118)]{constructor(_0x55f9df,_0xaf139b){const _0x1f0264=_0x2cd34a;super(),this[_0x1f0264(0xc3)]=_0x55f9df,this['_threadCommentDataSource']=_0xaf139b,this[_0x1f0264(0x12f)]();}['_initDataSource'](){const _0x23cd17=_0x2cd34a;this[_0x23cd17(0xc3)]['dataSource']=this[_0x23cd17(0xfd)],this[_0x23cd17(0xc3)][_0x23cd17(0x12b)]=!0x1;}};function _0x3c05(_0x30f10d,_0x5eeaf9){const _0x500d35=_0x500d();return _0x3c05=function(_0x3c059e,_0x2c163c){_0x3c059e=_0x3c059e-0xb9;let _0x7f97f3=_0x500d35[_0x3c059e];return _0x7f97f3;},_0x3c05(_0x30f10d,_0x5eeaf9);}C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x2cd34a(0x101)](g))],C);var F=Object[_0x2cd34a(0xbb)],L=Object[_0x2cd34a(0xdb)],Z=(_0xc70187,_0x3c62d2,_0x343eb3)=>_0x3c62d2 in _0xc70187?F(_0xc70187,_0x3c62d2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x343eb3}):_0xc70187[_0x3c62d2]=_0x343eb3,W=(_0x56eefe,_0x471bfa,_0x38c952,_0x4ef207)=>{const _0x59dc66=_0x2cd34a;for(var _0x26266d=_0x4ef207>0x1?void 0x0:_0x4ef207?L(_0x471bfa,_0x38c952):_0x471bfa,_0x27cf86=_0x56eefe[_0x59dc66(0xcc)]-0x1,_0x48e055;_0x27cf86>=0x0;_0x27cf86--)(_0x48e055=_0x56eefe[_0x27cf86])&&(_0x26266d=_0x48e055(_0x26266d)||_0x26266d);return _0x26266d;},O=(_0xa6caaf,_0x47dfdd)=>(_0x4c06b1,_0x2cc046)=>_0x47dfdd(_0x4c06b1,_0x2cc046,_0xa6caaf),N=(_0x1ccaa9,_0x39e6fd,_0x3f3902)=>Z(_0x1ccaa9,typeof _0x39e6fd!=_0x2cd34a(0x114)?_0x39e6fd+'':_0x39e6fd,_0x3f3902);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x2cd34a(0x105)]{constructor(_0x18388b=D,_0x4ee941,_0x2f10b4){const _0x56277d=_0x2cd34a;super(),this[_0x56277d(0x117)]=_0x18388b,this[_0x56277d(0x10c)]=_0x4ee941,this['_configService']=_0x2f10b4;const {..._0x249976}=c[_0x56277d(0x109)]({},D,this[_0x56277d(0x117)]);this['_configService'][_0x56277d(0xed)](q,_0x249976);}[_0x2cd34a(0x107)](){const _0x7c7a71=_0x2cd34a;[[g],[C],[p]][_0x7c7a71(0xe9)](_0x164681=>{const _0x247dcc=_0x7c7a71;this[_0x247dcc(0x10c)][_0x247dcc(0xbe)](_0x164681);});}[_0x2cd34a(0x132)](){const _0x31b24b=_0x2cd34a;this[_0x31b24b(0x10c)][_0x31b24b(0xbf)](C),this[_0x31b24b(0x10c)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x2cd34a(0x124),U),N(exports[_0x2cd34a(0xf7)],'type',c['UniverInstanceType'][_0x2cd34a(0xee)]),exports[_0x2cd34a(0xf7)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x2cd34a(0xf9)],T[_0x2cd34a(0x126)]),O(0x1,c[_0x2cd34a(0x101)](c[_0x2cd34a(0x112)])),O(0x2,c[_0x2cd34a(0xd4)])],exports[_0x2cd34a(0xf7)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3f576e=_0x2bba;(function(_0x8fc6b8,_0x31236a){const _0x4e00a6=_0x2bba,_0x2260fc=_0x8fc6b8();while(!![]){try{const _0x2134fb=-parseInt(_0x4e00a6(0x165))/0x1+-parseInt(_0x4e00a6(0x17b))/0x2+-parseInt(_0x4e00a6(0x186))/0x3*(-parseInt(_0x4e00a6(0x160))/0x4)+parseInt(_0x4e00a6(0x157))/0x5+-parseInt(_0x4e00a6(0x13b))/0x6*(-parseInt(_0x4e00a6(0x188))/0x7)+-parseInt(_0x4e00a6(0x137))/0x8+-parseInt(_0x4e00a6(0x13d))/0x9*(-parseInt(_0x4e00a6(0x19a))/0xa);if(_0x2134fb===_0x31236a)break;else _0x2260fc['push'](_0x2260fc['shift']());}catch(_0x3928ea){_0x2260fc['push'](_0x2260fc['shift']());}}}(_0x1891,0x771ec));import{CommentService as _0x5e1c55,CollaborationSessionService as _0x204e5c,UniverCollaborationClientPlugin as _0x5c2273}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x135297}from'@univerjs-pro/license';import{dayjs as _0x2a150e,UserManagerService as _0x2a30d4,Inject as _0x592b52,Injector as _0x4a76a3,Disposable as _0x9723fb,CustomRangeType as _0xae705a,UniverInstanceType as _0x42e5e1,DependentOn as _0x1b0624,IConfigService as _0x1b40d4,Plugin as _0x583448,merge as _0x3c6b71}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x7d5c51}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x13689c,IThreadCommentDataSourceService as _0x3137f2}from'@univerjs/thread-comment';import{bufferTime as _0x5c3244}from'rxjs';import{HTTPService as _0x588dab}from'@univerjs/network';const W=_0x3f576e(0x18b);var I=(_0x17370e=>(_0x17370e[_0x17370e['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x17370e[_0x17370e[_0x3f576e(0x154)]=0x1]=_0x3f576e(0x154),_0x17370e[_0x17370e[_0x3f576e(0x16e)]=-0x1]=_0x3f576e(0x16e),_0x17370e))(I||{}),v=(_0x571eb8=>(_0x571eb8[_0x571eb8[_0x3f576e(0x187)]=0x0]=_0x3f576e(0x187),_0x571eb8[_0x571eb8['Add']=0x1]=_0x3f576e(0x138),_0x571eb8[_0x571eb8[_0x3f576e(0x164)]=0x2]=_0x3f576e(0x164),_0x571eb8[_0x571eb8[_0x3f576e(0x17d)]=0x3]='Edit',_0x571eb8[_0x571eb8[_0x3f576e(0x18e)]=0x4]=_0x3f576e(0x18e),_0x571eb8[_0x571eb8['Solve']=0x5]=_0x3f576e(0x18a),_0x571eb8[_0x571eb8['UNRECOGNIZED']=-0x1]=_0x3f576e(0x16e),_0x571eb8))(v||{});const D=_0x20d79b=>_0x2a150e(new Date(+_0x20d79b))[_0x3f576e(0x197)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x398d7b,_0x4f34e1)=>{const _0x284fc5=_0x3f576e,_0xa22078=_0x398d7b[_0x284fc5(0x18d)](_0x2a30d4),_0x46095f=_0x398d7b['get'](_0x588dab);_0x4f34e1[_0x284fc5(0x182)](_0x3d6165=>{const _0x5caf99=_0x284fc5;_0xa22078[_0x5caf99(0x169)](_0x3d6165)&&_0x4f34e1[_0x5caf99(0x13f)](_0x3d6165);}),_0x4f34e1[_0x284fc5(0x189)]&&(await _0x46095f[_0x284fc5(0x18d)](_0x284fc5(0x155),{'params':{'userIDs':[..._0x4f34e1]}}))['body'][_0x284fc5(0x13a)][_0x284fc5(0x182)](_0x3fa92c=>{const _0xf5a411=_0x284fc5;_0x3fa92c&&_0xa22078[_0xf5a411(0x172)](_0x3fa92c);});};function _0x1891(){const _0x3330e0=['onReady','parse','addUser','_configService','filter','_initUserSync','_commentService','resolveComment','rangeType','/solved','dataSource','1125664EIijNR','getUnit','Edit','thread-comment-data-source.config','_config','customRanges','parentId','forEach','values','_threadCommentDataSourceService','body','447Wxkvyq','Unknown','14Wmbwta','size','Solve','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','deleteComment','get','Delete','createTimestamp','user','commentUpdate$','symbol','/delete','listComments','root','error','format','_init','requireSession','615670SavEmg','getMemberID','/add','unitId','/list','5087032COvAAV','Add','personId','users','114330VolXZP','_threadCommentModel','117LZjAlx','_sessionService','delete','getOwnPropertyDescriptor','COMMENT','OpenOrReOpen','find','length','_threadCommentDataSource','content','disposeWithMe','saveCommentToSnapshot','/universer-api/comment/unit/','code','reply','post','_httpService','comments','add','onStarting','slice','_injector','threadId','Solved','/universer-api/user/list','comment','279975kGAILP','replies','rangeId','subscribe','solved','userID','/reply','_initDataSource','defineProperty','24864eelevK','map','type','replyId','Reply','134033YklwcN','UNIVER_UNKNOWN','updateComment','syncUpdateMutationToColla','getUser','userId','addComment','_userService','setConfig','UNRECOGNIZED','stringify'];_0x1891=function(){return _0x3330e0;};return _0x1891();}var K=Object[_0x3f576e(0x140)],V=(_0x4d70c4,_0x307f50,_0x4de368,_0x5f176a)=>{const _0x17aaca=_0x3f576e;for(var _0x1ef6c3=_0x5f176a>0x1?void 0x0:_0x5f176a?K(_0x307f50,_0x4de368):_0x307f50,_0x9719ed=_0x4d70c4[_0x17aaca(0x144)]-0x1,_0x3a2416;_0x9719ed>=0x0;_0x9719ed--)(_0x3a2416=_0x4d70c4[_0x9719ed])&&(_0x1ef6c3=_0x3a2416(_0x1ef6c3)||_0x1ef6c3);return _0x1ef6c3;},p=(_0x29ae7a,_0x45ce74)=>(_0x538d1c,_0x3f0d04)=>_0x45ce74(_0x538d1c,_0x3f0d04,_0x29ae7a);let S=class extends _0x9723fb{constructor(_0x23c811,_0x24c69a,_0x30f5fa,_0x356520){const _0xcfb457=_0x3f576e;super(),this[_0xcfb457(0x176)]=_0x23c811,this['_threadCommentModel']=_0x24c69a,this[_0xcfb457(0x16c)]=_0x30f5fa,this['_injector']=_0x356520,this[_0xcfb457(0x198)](),this[_0xcfb457(0x175)]();}['_initUserSync'](){const _0x484262=_0x3f576e;this[_0x484262(0x147)](this['_threadCommentModel'][_0x484262(0x191)]['pipe'](_0x5c3244(0x10))[_0x484262(0x15a)](_0x193d1d=>{const _0x49ed96=_0x484262,_0x2ccb6e=new Set();_0x193d1d['forEach'](_0x2ec015=>{const _0x5c761c=_0x2bba;switch(_0x2ec015['type']){case _0x5c761c(0x14f):{const _0x3ffbe6=_0x2ec015['payload'][_0x5c761c(0x139)];_0x2ccb6e['add'](_0x3ffbe6);break;}}}),B(this[_0x49ed96(0x152)],_0x2ccb6e);}));}[_0x3f576e(0x198)](){const _0x2b2210=_0x3f576e;this[_0x2b2210(0x147)](this[_0x2b2210(0x176)][_0x2b2210(0x191)][_0x2b2210(0x15a)](async _0x8fd85c=>{const _0x46ec60=_0x2b2210;var _0x24292a,_0x457c6a,_0x237f77,_0x1df3fd;const _0x19ebfc=(_0x24292a=this['_threadCommentModel'][_0x46ec60(0x17c)](_0x8fd85c[_0x46ec60(0x19d)])[_0x46ec60(0x143)](_0x222b6c=>_0x222b6c[_0x46ec60(0x153)]===_0x8fd85c[_0x46ec60(0x153)]))==null?void 0x0:_0x24292a['root'];if(!_0x19ebfc)return;const {unitId:_0x589714,subUnitId:_0xae0290}=_0x19ebfc;switch(_0x8fd85c[_0x46ec60(0x190)]&&this[_0x46ec60(0x16c)][_0x46ec60(0x172)](_0x8fd85c[_0x46ec60(0x190)]),_0x8fd85c[_0x46ec60(0x162)]){case v[_0x46ec60(0x138)]:break;case v[_0x46ec60(0x164)]:{this[_0x46ec60(0x13c)][_0x46ec60(0x16b)](_0x589714,_0xae0290,{'unitId':_0x589714,'subUnitId':_0xae0290,'ref':'','id':_0x8fd85c[_0x46ec60(0x163)],'dT':D(+_0x8fd85c[_0x46ec60(0x18f)]),'threadId':_0x8fd85c[_0x46ec60(0x153)],'personId':(_0x237f77=(_0x457c6a=_0x8fd85c[_0x46ec60(0x190)])==null?void 0x0:_0x457c6a[_0x46ec60(0x15c)])!=null?_0x237f77:_0x8fd85c['userId'],'text':JSON[_0x46ec60(0x171)](_0x8fd85c[_0x46ec60(0x146)]),'parentId':_0x19ebfc['id']});break;}case v[_0x46ec60(0x18e)]:{const _0x433285=this['_threadCommentModel']['getComment'](_0x589714,_0xae0290,_0x8fd85c[_0x46ec60(0x163)]);_0x433285&&_0x433285[_0x46ec60(0x181)]&&this[_0x46ec60(0x13c)][_0x46ec60(0x18c)](_0x589714,_0xae0290,_0x8fd85c[_0x46ec60(0x163)]);break;}case v[_0x46ec60(0x17d)]:{this[_0x46ec60(0x13c)][_0x46ec60(0x167)](_0x589714,_0xae0290,{'commentId':_0x8fd85c[_0x46ec60(0x163)],'text':JSON[_0x46ec60(0x171)](_0x8fd85c[_0x46ec60(0x146)])});break;}case v[_0x46ec60(0x18a)]:{const _0x37f24b=(_0x1df3fd=this[_0x46ec60(0x13c)][_0x46ec60(0x17c)](_0x8fd85c[_0x46ec60(0x19d)])[_0x46ec60(0x143)](_0x141efb=>_0x141efb[_0x46ec60(0x153)]===_0x8fd85c['threadId']))==null?void 0x0:_0x1df3fd[_0x46ec60(0x195)];_0x37f24b&&this[_0x46ec60(0x13c)][_0x46ec60(0x177)](_0x589714,_0xae0290,_0x37f24b['id'],_0x8fd85c['solved']===I[_0x46ec60(0x154)]);break;}}}));}};function _0x2bba(_0x4be3f1,_0x4021db){const _0x18913b=_0x1891();return _0x2bba=function(_0x2bbaf1,_0x818b6f){_0x2bbaf1=_0x2bbaf1-0x136;let _0x25ef84=_0x18913b[_0x2bbaf1];return _0x25ef84;},_0x2bba(_0x4be3f1,_0x4021db);}S=V([p(0x0,_0x592b52(_0x5e1c55)),p(0x1,_0x592b52(_0x13689c)),p(0x2,_0x592b52(_0x2a30d4)),p(0x3,_0x592b52(_0x4a76a3))],S);const z=_0x3f576e(0x17e),M={};var k=Object[_0x3f576e(0x140)],Q=(_0x106f82,_0x276829,_0x173cb9,_0x5a0b33)=>{const _0x4333d1=_0x3f576e;for(var _0x2b1f1b=_0x5a0b33>0x1?void 0x0:_0x5a0b33?k(_0x276829,_0x173cb9):_0x276829,_0x17edec=_0x106f82[_0x4333d1(0x144)]-0x1,_0x442e5d;_0x17edec>=0x0;_0x17edec--)(_0x442e5d=_0x106f82[_0x17edec])&&(_0x2b1f1b=_0x442e5d(_0x2b1f1b)||_0x2b1f1b);return _0x2b1f1b;},_=(_0xb7ebd4,_0x19d7e0)=>(_0x40ca97,_0x3f8652)=>_0x19d7e0(_0x40ca97,_0x3f8652,_0xb7ebd4);function X(_0x429ef0,_0x5db180){const _0x5def07=_0x3f576e,_0x288292=_0x429ef0['replies'][0x0];return{..._0x5db180,'id':_0x288292['replyId'],'resolved':_0x429ef0[_0x5def07(0x15b)]===0x1,'dT':D(_0x288292[_0x5def07(0x18f)]),'personId':_0x288292['userId'],'threadId':_0x288292[_0x5def07(0x153)]};}function ee(_0x5ce140,_0x5993bc,_0x2513d4){const _0x530b77=_0x3f576e;var _0xdaf972,_0x18c2e1;if(((_0x18c2e1=(_0xdaf972=_0x5ce140==null?void 0x0:_0x5ce140[_0x530b77(0x158)])==null?void 0x0:_0xdaf972[_0x530b77(0x144)])!=null?_0x18c2e1:0x0)>0x0){const _0x38e37f=(_0x15fb0e,_0x588788)=>({'id':_0x15fb0e[_0x530b77(0x163)],'threadId':_0x15fb0e[_0x530b77(0x153)],'dT':D(_0x15fb0e[_0x530b77(0x18f)]),'personId':_0x15fb0e[_0x530b77(0x16a)],'resolved':_0x5ce140['solved']===I[_0x530b77(0x154)],'unitId':_0x5993bc,'subUnitId':_0x2513d4,'text':JSON[_0x530b77(0x171)](_0x15fb0e[_0x530b77(0x146)]),'parentId':_0x588788}),_0x24c196=_0x38e37f(_0x5ce140['replies'][0x0]);return{..._0x24c196,'children':_0x5ce140[_0x530b77(0x158)][_0x530b77(0x151)](0x1)[_0x530b77(0x161)](_0x11e028=>_0x38e37f(_0x11e028,_0x24c196['id']))};}return null;}let f=class{constructor(_0x7bd1fc,_0x42294b,_0x344372,_0x18f904){const _0x54b862=_0x3f576e;this['_httpService']=_0x7bd1fc,this[_0x54b862(0x16c)]=_0x42294b,this[_0x54b862(0x13e)]=_0x344372,this[_0x54b862(0x152)]=_0x18f904;}async[_0x3f576e(0x16b)](_0x2d8607){const _0x15fea3=_0x3f576e;var _0x471769,_0x21cd34;const {parentId:_0x3bf006,unitId:_0x49d3b7,text:_0x5ec571,threadId:_0x565c34}=_0x2d8607,_0x20705b=(_0x21cd34=(_0x471769=_0x5ec571[_0x15fea3(0x180)])==null?void 0x0:_0x471769['filter'](_0x279921=>_0x279921[_0x15fea3(0x178)]===_0xae705a['COMMENT'])[_0x15fea3(0x161)](_0x122d4d=>_0x122d4d['rangeId']))!=null?_0x21cd34:[],_0x45e22b=JSON[_0x15fea3(0x16f)](_0x5ec571),_0x525742=(await this[_0x15fea3(0x13e)][_0x15fea3(0x199)](_0x49d3b7))['getMemberID']();if(_0x3bf006){const _0x3f7c49={'memberId':_0x525742,'unitId':_0x49d3b7,'content':_0x45e22b,'mention':_0x20705b,'threadId':_0x565c34},_0x197977=(await this[_0x15fea3(0x14d)][_0x15fea3(0x14c)](_0x15fea3(0x149)+_0x49d3b7+_0x15fea3(0x15d),{'body':_0x3f7c49}))[_0x15fea3(0x185)][_0x15fea3(0x14b)];return{..._0x2d8607,'id':_0x197977[_0x15fea3(0x163)],'dT':_0x2a150e(+_0x197977[_0x15fea3(0x18f)])[_0x15fea3(0x197)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x197977['userId']};}else{const _0x19388e={'memberId':_0x525742,'unitId':_0x49d3b7,'content':_0x45e22b,'mention':_0x20705b},_0xdb4060=await this[_0x15fea3(0x14d)][_0x15fea3(0x14c)]('/universer-api/comment/unit/'+_0x49d3b7+_0x15fea3(0x19c),{'body':_0x19388e});return X(_0xdb4060[_0x15fea3(0x185)][_0x15fea3(0x156)],_0x2d8607);}}async[_0x3f576e(0x167)](_0x1eba1f){const _0x1d2a88=_0x3f576e;var _0x33369e,_0x3eabe6;const {text:_0x1cdf30,unitId:_0x4297a7}=_0x1eba1f,_0x5e524b=(_0x3eabe6=(_0x33369e=_0x1cdf30[_0x1d2a88(0x180)])==null?void 0x0:_0x33369e[_0x1d2a88(0x174)](_0xa5e4ad=>_0xa5e4ad[_0x1d2a88(0x178)]===_0xae705a[_0x1d2a88(0x141)])[_0x1d2a88(0x161)](_0xe5249e=>_0xe5249e[_0x1d2a88(0x159)]))!=null?_0x3eabe6:[],_0x30faef=JSON['stringify'](_0x1cdf30),_0x5d3e4e=_0x1eba1f[_0x1d2a88(0x153)],_0x50bd77=_0x1eba1f['id'],_0x178f21={'memberId':(await this['_sessionService'][_0x1d2a88(0x199)](_0x4297a7))[_0x1d2a88(0x19b)](),'unitId':_0x4297a7,'threadId':_0x5d3e4e,'mention':_0x5e524b,'content':_0x30faef,'replyId':_0x50bd77},_0xc400a8=await this[_0x1d2a88(0x14d)]['post']('/universer-api/comment/unit/'+_0x4297a7+'/edit',{'body':_0x178f21});return!_0xc400a8[_0x1d2a88(0x185)][_0x1d2a88(0x196)]||_0xc400a8[_0x1d2a88(0x185)][_0x1d2a88(0x196)][_0x1d2a88(0x14a)]===0x1;}async['resolveComment'](_0xae1d7d){const _0x329dac=_0x3f576e,{unitId:_0x99bc9f}=_0xae1d7d,_0xc1e4ea=_0xae1d7d[_0x329dac(0x153)],_0x5eea92={'memberId':this[_0x329dac(0x16c)]['getCurrentUser']()[_0x329dac(0x15c)],'unitId':_0x99bc9f,'threadId':_0xc1e4ea,'solved':_0xae1d7d['resolved']?I['Solved']:I[_0x329dac(0x142)]},_0x21eb3d=await this['_httpService'][_0x329dac(0x14c)]('/universer-api/comment/unit/'+_0x99bc9f+_0x329dac(0x179),{'body':_0x5eea92});return!_0x21eb3d[_0x329dac(0x185)][_0x329dac(0x196)]||_0x21eb3d[_0x329dac(0x185)]['error'][_0x329dac(0x14a)]===0x1;}async[_0x3f576e(0x18c)](_0x3a844e,_0x4973ea,_0x421bcb,_0x293cbd){const _0x17e78e=_0x3f576e,_0x406cb9={'memberId':(await this[_0x17e78e(0x13e)][_0x17e78e(0x199)](_0x3a844e))[_0x17e78e(0x19b)](),'threadId':_0x421bcb,'replyId':_0x293cbd,'unitId':_0x3a844e},_0x397c5e=await this[_0x17e78e(0x14d)][_0x17e78e(0x14c)]('/universer-api/comment/unit/'+_0x3a844e+_0x17e78e(0x193),{'body':_0x406cb9});return!_0x397c5e[_0x17e78e(0x185)]['error']||_0x397c5e[_0x17e78e(0x185)][_0x17e78e(0x196)][_0x17e78e(0x14a)]===0x1;}async[_0x3f576e(0x194)](_0x3bae5a,_0x5abb49,_0x3d6be4){const _0x1d5948=_0x3f576e,_0x19ac59={'unitId':_0x3bae5a,'threadId':_0x3d6be4},_0x3b2215=await this['_httpService']['post'](_0x1d5948(0x149)+_0x3bae5a+_0x1d5948(0x136),{'body':_0x19ac59}),_0x3efb55=_0x3d6be4[_0x1d5948(0x161)](_0x350303=>ee(_0x3b2215['body'][_0x1d5948(0x14e)][_0x350303],_0x3bae5a,_0x5abb49))[_0x1d5948(0x174)](Boolean);return Object[_0x1d5948(0x183)](_0x3b2215[_0x1d5948(0x185)][_0x1d5948(0x13a)])[_0x1d5948(0x182)](_0x56fa3d=>{const _0x2e4ca0=_0x1d5948;this['_userService'][_0x2e4ca0(0x172)](_0x56fa3d);}),_0x3efb55;}[_0x3f576e(0x148)](_0x443126){const _0x3a481f=_0x3f576e;return{'id':_0x443126['id'],'threadId':_0x443126[_0x3a481f(0x153)],'ref':_0x443126['ref']};}};f=Q([_(0x0,_0x592b52(_0x588dab)),_(0x1,_0x592b52(_0x2a30d4)),_(0x2,_0x592b52(_0x204e5c)),_(0x3,_0x592b52(_0x4a76a3))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x384ff3,_0x54b0ce,_0x4bf32d,_0x43f53f)=>{const _0x3dcc9b=_0x3f576e;for(var _0x321d61=_0x43f53f>0x1?void 0x0:_0x43f53f?re(_0x54b0ce,_0x4bf32d):_0x54b0ce,_0x432c53=_0x384ff3[_0x3dcc9b(0x144)]-0x1,_0x5b245a;_0x432c53>=0x0;_0x432c53--)(_0x5b245a=_0x384ff3[_0x432c53])&&(_0x321d61=_0x5b245a(_0x321d61)||_0x321d61);return _0x321d61;},N=(_0xd78bfe,_0x90ae10)=>(_0x4b9510,_0x1bfcf6)=>_0x90ae10(_0x4b9510,_0x1bfcf6,_0xd78bfe);let g=class extends _0x9723fb{constructor(_0x4453c2,_0x5515e2){const _0x31406b=_0x3f576e;super(),this[_0x31406b(0x184)]=_0x4453c2,this['_threadCommentDataSource']=_0x5515e2,this[_0x31406b(0x15e)]();}[_0x3f576e(0x15e)](){const _0x1ac0a3=_0x3f576e;this[_0x1ac0a3(0x184)][_0x1ac0a3(0x17a)]=this[_0x1ac0a3(0x145)],this[_0x1ac0a3(0x184)][_0x1ac0a3(0x168)]=!0x1;}};g=te([N(0x0,_0x3137f2),N(0x1,_0x592b52(f))],g);var se=Object[_0x3f576e(0x15f)],oe=Object[_0x3f576e(0x140)],ne=(_0x18455d,_0x22fae1,_0x1ddba7)=>_0x22fae1 in _0x18455d?se(_0x18455d,_0x22fae1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ddba7}):_0x18455d[_0x22fae1]=_0x1ddba7,ie=(_0x41f713,_0x286c02,_0x2bcd9f,_0x4c9485)=>{for(var _0x5227ac=_0x4c9485>0x1?void 0x0:_0x4c9485?oe(_0x286c02,_0x2bcd9f):_0x286c02,_0x3187da=_0x41f713['length']-0x1,_0x4c2fe8;_0x3187da>=0x0;_0x3187da--)(_0x4c2fe8=_0x41f713[_0x3187da])&&(_0x5227ac=_0x4c2fe8(_0x5227ac)||_0x5227ac);return _0x5227ac;},w=(_0x38c06f,_0x4a69fd)=>(_0x1107dd,_0x1f449c)=>_0x4a69fd(_0x1107dd,_0x1f449c,_0x38c06f),$=(_0x2f1d3b,_0x2512aa,_0x4bfa68)=>ne(_0x2f1d3b,typeof _0x2512aa!=_0x3f576e(0x192)?_0x2512aa+'':_0x2512aa,_0x4bfa68);let b=class extends _0x583448{constructor(_0x20d472=M,_0x13c453,_0x58f12e){const _0x306b7e=_0x3f576e;super(),this[_0x306b7e(0x17f)]=_0x20d472,this[_0x306b7e(0x152)]=_0x13c453,this['_configService']=_0x58f12e;const {..._0x448c87}=_0x3c6b71({},M,this[_0x306b7e(0x17f)]);this[_0x306b7e(0x173)][_0x306b7e(0x16d)](z,_0x448c87);}[_0x3f576e(0x150)](){const _0x444a63=_0x3f576e;[[f],[g],[S]][_0x444a63(0x182)](_0x18b1a1=>{const _0x3c7aee=_0x444a63;this[_0x3c7aee(0x152)][_0x3c7aee(0x14f)](_0x18b1a1);});}[_0x3f576e(0x170)](){const _0x5e908e=_0x3f576e;this[_0x5e908e(0x152)][_0x5e908e(0x18d)](g),this[_0x5e908e(0x152)][_0x5e908e(0x18d)](S);}};$(b,'pluginName',W),$(b,_0x3f576e(0x162),_0x42e5e1[_0x3f576e(0x166)]),b=ie([_0x1b0624(_0x7d5c51,_0x5c2273,_0x135297),w(0x1,_0x592b52(_0x4a76a3)),w(0x2,_0x1b40d4)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x383d7f=_0x59d7;(function(_0x28ea28,_0x35201e){const _0x41088b=_0x59d7,_0xf3aa6=_0x28ea28();while(!![]){try{const _0x1c34a4=-parseInt(_0x41088b(0x155))/0x1+parseInt(_0x41088b(0x16d))/0x2*(parseInt(_0x41088b(0x11e))/0x3)+parseInt(_0x41088b(0x12b))/0x4+parseInt(_0x41088b(0x171))/0x5*(parseInt(_0x41088b(0x116))/0x6)+parseInt(_0x41088b(0x168))/0x7+parseInt(_0x41088b(0x151))/0x8+-parseInt(_0x41088b(0x128))/0x9*(parseInt(_0x41088b(0x13f))/0xa);if(_0x1c34a4===_0x35201e)break;else _0xf3aa6['push'](_0xf3aa6['shift']());}catch(_0x38beeb){_0xf3aa6['push'](_0xf3aa6['shift']());}}}(_0x169b,0xafb80));import{CommentService as _0x3e1c3e,CollaborationSessionService as _0x47deb1,UniverCollaborationClientPlugin as _0x552ab1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5beee8}from'@univerjs-pro/license';import{dayjs as _0x268799,UserManagerService as _0x13f5b7,Inject as _0x5c8570,Injector as _0x2a193b,Disposable as _0x4f4098,CustomRangeType as _0x5105bf,UniverInstanceType as _0xe88912,DependentOn as _0x24675c,IConfigService as _0x4c4a24,Plugin as _0x291806,merge as _0x6ae9ba}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5f535f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4c1c76,IThreadCommentDataSourceService as _0x59f743}from'@univerjs/thread-comment';import{bufferTime as _0x5b454b}from'rxjs';import{HTTPService as _0x5762aa}from'@univerjs/network';const W=_0x383d7f(0x149);var I=(_0x24bfa7=>(_0x24bfa7[_0x24bfa7[_0x383d7f(0x124)]=0x0]=_0x383d7f(0x124),_0x24bfa7[_0x24bfa7['Solved']=0x1]=_0x383d7f(0x153),_0x24bfa7[_0x24bfa7[_0x383d7f(0x125)]=-0x1]=_0x383d7f(0x125),_0x24bfa7))(I||{}),v=(_0xeb512e=>(_0xeb512e[_0xeb512e[_0x383d7f(0x119)]=0x0]=_0x383d7f(0x119),_0xeb512e[_0xeb512e[_0x383d7f(0x142)]=0x1]=_0x383d7f(0x142),_0xeb512e[_0xeb512e[_0x383d7f(0x148)]=0x2]=_0x383d7f(0x148),_0xeb512e[_0xeb512e[_0x383d7f(0x143)]=0x3]='Edit',_0xeb512e[_0xeb512e[_0x383d7f(0x134)]=0x4]=_0x383d7f(0x134),_0xeb512e[_0xeb512e['Solve']=0x5]=_0x383d7f(0x159),_0xeb512e[_0xeb512e[_0x383d7f(0x125)]=-0x1]=_0x383d7f(0x125),_0xeb512e))(v||{});const D=_0xe8670f=>_0x268799(new Date(+_0xe8670f))[_0x383d7f(0x13d)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1838d3,_0x292688)=>{const _0x1d91ba=_0x383d7f,_0x24dfaf=_0x1838d3[_0x1d91ba(0x132)](_0x13f5b7),_0x257569=_0x1838d3[_0x1d91ba(0x132)](_0x5762aa);_0x292688['forEach'](_0xda5790=>{const _0x511bc0=_0x1d91ba;_0x24dfaf['getUser'](_0xda5790)&&_0x292688[_0x511bc0(0x141)](_0xda5790);}),_0x292688[_0x1d91ba(0x11b)]&&(await _0x257569[_0x1d91ba(0x132)]('/universer-api/user/list',{'params':{'userIDs':[..._0x292688]}}))[_0x1d91ba(0x14b)][_0x1d91ba(0x13e)]['forEach'](_0x3a1bf7=>{const _0x10d6a6=_0x1d91ba;_0x3a1bf7&&_0x24dfaf[_0x10d6a6(0x15f)](_0x3a1bf7);});};var K=Object[_0x383d7f(0x161)],V=(_0x2378dd,_0x3c44bd,_0x56f720,_0x32c746)=>{const _0x14f9fb=_0x383d7f;for(var _0x272c56=_0x32c746>0x1?void 0x0:_0x32c746?K(_0x3c44bd,_0x56f720):_0x3c44bd,_0x37d0af=_0x2378dd[_0x14f9fb(0x122)]-0x1,_0x5a7e64;_0x37d0af>=0x0;_0x37d0af--)(_0x5a7e64=_0x2378dd[_0x37d0af])&&(_0x272c56=_0x5a7e64(_0x272c56)||_0x272c56);return _0x272c56;},p=(_0x327282,_0xc0af3b)=>(_0x1c8c2a,_0x424f45)=>_0xc0af3b(_0x1c8c2a,_0x424f45,_0x327282);let S=class extends _0x4f4098{constructor(_0x2e7a8f,_0xe15e7e,_0x2c98b5,_0x45d869){const _0x24acc0=_0x383d7f;super(),this['_commentService']=_0x2e7a8f,this[_0x24acc0(0x11a)]=_0xe15e7e,this[_0x24acc0(0x144)]=_0x2c98b5,this[_0x24acc0(0x169)]=_0x45d869,this['_init'](),this[_0x24acc0(0x170)]();}['_initUserSync'](){const _0x44b33f=_0x383d7f;this[_0x44b33f(0x167)](this[_0x44b33f(0x11a)][_0x44b33f(0x140)]['pipe'](_0x5b454b(0x10))['subscribe'](_0x460501=>{const _0x4b4ea8=_0x44b33f,_0x423f62=new Set();_0x460501[_0x4b4ea8(0x156)](_0x6a4067=>{const _0x58b323=_0x4b4ea8;switch(_0x6a4067[_0x58b323(0x14f)]){case _0x58b323(0x15a):{const _0x2fa93f=_0x6a4067[_0x58b323(0x13c)]['personId'];_0x423f62[_0x58b323(0x15a)](_0x2fa93f);break;}}}),B(this[_0x4b4ea8(0x169)],_0x423f62);}));}['_init'](){const _0x224229=_0x383d7f;this['disposeWithMe'](this[_0x224229(0x16a)][_0x224229(0x140)][_0x224229(0x154)](async _0x35b878=>{const _0x104081=_0x224229;var _0x2e100b,_0x283b35,_0x29cde2,_0x330972;const _0x1f813e=(_0x2e100b=this[_0x104081(0x11a)][_0x104081(0x138)](_0x35b878['unitId'])['find'](_0x334188=>_0x334188['threadId']===_0x35b878['threadId']))==null?void 0x0:_0x2e100b['root'];if(!_0x1f813e)return;const {unitId:_0x5d7021,subUnitId:_0x242782}=_0x1f813e;switch(_0x35b878['user']&&this['_userService'][_0x104081(0x15f)](_0x35b878[_0x104081(0x15b)]),_0x35b878[_0x104081(0x14f)]){case v[_0x104081(0x142)]:break;case v[_0x104081(0x148)]:{this[_0x104081(0x11a)]['addComment'](_0x5d7021,_0x242782,{'unitId':_0x5d7021,'subUnitId':_0x242782,'ref':'','id':_0x35b878[_0x104081(0x12d)],'dT':D(+_0x35b878[_0x104081(0x11c)]),'threadId':_0x35b878[_0x104081(0x14e)],'personId':(_0x29cde2=(_0x283b35=_0x35b878['user'])==null?void 0x0:_0x283b35[_0x104081(0x11f)])!=null?_0x29cde2:_0x35b878[_0x104081(0x113)],'text':JSON[_0x104081(0x126)](_0x35b878[_0x104081(0x165)]),'parentId':_0x1f813e['id']});break;}case v[_0x104081(0x134)]:{const _0x155d28=this['_threadCommentModel'][_0x104081(0x160)](_0x5d7021,_0x242782,_0x35b878[_0x104081(0x12d)]);_0x155d28&&_0x155d28[_0x104081(0x14d)]&&this[_0x104081(0x11a)][_0x104081(0x12f)](_0x5d7021,_0x242782,_0x35b878[_0x104081(0x12d)]);break;}case v['Edit']:{this[_0x104081(0x11a)]['updateComment'](_0x5d7021,_0x242782,{'commentId':_0x35b878[_0x104081(0x12d)],'text':JSON[_0x104081(0x126)](_0x35b878[_0x104081(0x165)])});break;}case v['Solve']:{const _0x10093f=(_0x330972=this[_0x104081(0x11a)][_0x104081(0x138)](_0x35b878['unitId'])[_0x104081(0x164)](_0x36dc0c=>_0x36dc0c['threadId']===_0x35b878[_0x104081(0x14e)]))==null?void 0x0:_0x330972[_0x104081(0x145)];_0x10093f&&this['_threadCommentModel'][_0x104081(0x14c)](_0x5d7021,_0x242782,_0x10093f['id'],_0x35b878[_0x104081(0x127)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x5c8570(_0x3e1c3e)),p(0x1,_0x5c8570(_0x4c1c76)),p(0x2,_0x5c8570(_0x13f5b7)),p(0x3,_0x5c8570(_0x2a193b))],S);const z=_0x383d7f(0x117),M={};var k=Object[_0x383d7f(0x161)],Q=(_0x5fe1bd,_0x41d6a0,_0x40c0dc,_0x165b71)=>{const _0x3eed80=_0x383d7f;for(var _0x483d02=_0x165b71>0x1?void 0x0:_0x165b71?k(_0x41d6a0,_0x40c0dc):_0x41d6a0,_0x11b29f=_0x5fe1bd[_0x3eed80(0x122)]-0x1,_0x30f29b;_0x11b29f>=0x0;_0x11b29f--)(_0x30f29b=_0x5fe1bd[_0x11b29f])&&(_0x483d02=_0x30f29b(_0x483d02)||_0x483d02);return _0x483d02;},_=(_0xc395e4,_0x42d1fd)=>(_0x5db939,_0x575e46)=>_0x42d1fd(_0x5db939,_0x575e46,_0xc395e4);function X(_0x386e3,_0x2cee17){const _0x19f09f=_0x383d7f,_0x100f2f=_0x386e3[_0x19f09f(0x136)][0x0];return{..._0x2cee17,'id':_0x100f2f[_0x19f09f(0x12d)],'resolved':_0x386e3['solved']===0x1,'dT':D(_0x100f2f[_0x19f09f(0x11c)]),'personId':_0x100f2f[_0x19f09f(0x113)],'threadId':_0x100f2f[_0x19f09f(0x14e)]};}function ee(_0x549c44,_0x140e0e,_0x3d3f40){const _0x983dcf=_0x383d7f;var _0x398147,_0x378b55;if(((_0x378b55=(_0x398147=_0x549c44==null?void 0x0:_0x549c44['replies'])==null?void 0x0:_0x398147[_0x983dcf(0x122)])!=null?_0x378b55:0x0)>0x0){const _0x3fdae6=(_0x314002,_0x3dffa6)=>({'id':_0x314002[_0x983dcf(0x12d)],'threadId':_0x314002[_0x983dcf(0x14e)],'dT':D(_0x314002[_0x983dcf(0x11c)]),'personId':_0x314002['userId'],'resolved':_0x549c44[_0x983dcf(0x127)]===I[_0x983dcf(0x153)],'unitId':_0x140e0e,'subUnitId':_0x3d3f40,'text':JSON[_0x983dcf(0x126)](_0x314002['content']),'parentId':_0x3dffa6}),_0x4237c4=_0x3fdae6(_0x549c44[_0x983dcf(0x136)][0x0]);return{..._0x4237c4,'children':_0x549c44[_0x983dcf(0x136)][_0x983dcf(0x120)](0x1)['map'](_0x39be88=>_0x3fdae6(_0x39be88,_0x4237c4['id']))};}return null;}let f=class{constructor(_0x232860,_0x3653b6,_0x567910,_0x20b6f9){const _0x1da43b=_0x383d7f;this[_0x1da43b(0x12e)]=_0x232860,this[_0x1da43b(0x144)]=_0x3653b6,this['_sessionService']=_0x567910,this[_0x1da43b(0x169)]=_0x20b6f9;}async[_0x383d7f(0x123)](_0x1c677c){const _0x57704e=_0x383d7f;var _0x4b07d7,_0x47efc8;const {parentId:_0x360e08,unitId:_0x31f4f4,text:_0x440cfb,threadId:_0x47da53}=_0x1c677c,_0x32e5a6=(_0x47efc8=(_0x4b07d7=_0x440cfb[_0x57704e(0x15d)])==null?void 0x0:_0x4b07d7[_0x57704e(0x12c)](_0x4b85df=>_0x4b85df[_0x57704e(0x172)]===_0x5105bf[_0x57704e(0x12a)])['map'](_0x39f2af=>_0x39f2af['rangeId']))!=null?_0x47efc8:[],_0x37093e=JSON['stringify'](_0x440cfb),_0x243c24=(await this['_sessionService']['requireSession'](_0x31f4f4))[_0x57704e(0x135)]();if(_0x360e08){const _0x2e7176={'memberId':_0x243c24,'unitId':_0x31f4f4,'content':_0x37093e,'mention':_0x32e5a6,'threadId':_0x47da53},_0x426f9b=(await this['_httpService'][_0x57704e(0x118)]('/universer-api/comment/unit/'+_0x31f4f4+_0x57704e(0x129),{'body':_0x2e7176}))[_0x57704e(0x14b)]['reply'];return{..._0x1c677c,'id':_0x426f9b[_0x57704e(0x12d)],'dT':_0x268799(+_0x426f9b['createTimestamp'])[_0x57704e(0x13d)](_0x57704e(0x162)),'personId':_0x426f9b[_0x57704e(0x113)]};}else{const _0x552dc7={'memberId':_0x243c24,'unitId':_0x31f4f4,'content':_0x37093e,'mention':_0x32e5a6},_0x36b536=await this[_0x57704e(0x12e)]['post'](_0x57704e(0x130)+_0x31f4f4+'/add',{'body':_0x552dc7});return X(_0x36b536[_0x57704e(0x14b)]['comment'],_0x1c677c);}}async[_0x383d7f(0x147)](_0x3f9b2c){const _0x3673d6=_0x383d7f;var _0x463a3a,_0x469095;const {text:_0x21fad3,unitId:_0x46e0aa}=_0x3f9b2c,_0x46545d=(_0x469095=(_0x463a3a=_0x21fad3[_0x3673d6(0x15d)])==null?void 0x0:_0x463a3a[_0x3673d6(0x12c)](_0x487a0a=>_0x487a0a['rangeType']===_0x5105bf[_0x3673d6(0x12a)])[_0x3673d6(0x15c)](_0x4b4373=>_0x4b4373[_0x3673d6(0x139)]))!=null?_0x469095:[],_0x518334=JSON['stringify'](_0x21fad3),_0x3ec1c3=_0x3f9b2c[_0x3673d6(0x14e)],_0x2bc671=_0x3f9b2c['id'],_0xf3096a={'memberId':(await this['_sessionService'][_0x3673d6(0x121)](_0x46e0aa))['getMemberID'](),'unitId':_0x46e0aa,'threadId':_0x3ec1c3,'mention':_0x46545d,'content':_0x518334,'replyId':_0x2bc671},_0x3cbeba=await this[_0x3673d6(0x12e)]['post'](_0x3673d6(0x130)+_0x46e0aa+_0x3673d6(0x166),{'body':_0xf3096a});return!_0x3cbeba[_0x3673d6(0x14b)]['error']||_0x3cbeba[_0x3673d6(0x14b)][_0x3673d6(0x146)][_0x3673d6(0x133)]===0x1;}async[_0x383d7f(0x14c)](_0x56b200){const _0x1f8cc8=_0x383d7f,{unitId:_0x313e8b}=_0x56b200,_0x46066e=_0x56b200[_0x1f8cc8(0x14e)],_0x455819={'memberId':this[_0x1f8cc8(0x144)]['getCurrentUser']()['userID'],'unitId':_0x313e8b,'threadId':_0x46066e,'solved':_0x56b200['resolved']?I['Solved']:I[_0x1f8cc8(0x124)]},_0x3a9dc5=await this['_httpService']['post'](_0x1f8cc8(0x130)+_0x313e8b+_0x1f8cc8(0x16b),{'body':_0x455819});return!_0x3a9dc5['body']['error']||_0x3a9dc5['body'][_0x1f8cc8(0x146)][_0x1f8cc8(0x133)]===0x1;}async['deleteComment'](_0x1426b9,_0x33fa00,_0x148410,_0x5b2ae4){const _0x1cc744=_0x383d7f,_0x321776={'memberId':(await this[_0x1cc744(0x114)][_0x1cc744(0x121)](_0x1426b9))['getMemberID'](),'threadId':_0x148410,'replyId':_0x5b2ae4,'unitId':_0x1426b9},_0x4c4d5b=await this[_0x1cc744(0x12e)][_0x1cc744(0x118)]('/universer-api/comment/unit/'+_0x1426b9+'/delete',{'body':_0x321776});return!_0x4c4d5b[_0x1cc744(0x14b)][_0x1cc744(0x146)]||_0x4c4d5b[_0x1cc744(0x14b)][_0x1cc744(0x146)][_0x1cc744(0x133)]===0x1;}async[_0x383d7f(0x15e)](_0x4d0352,_0xeacc82,_0x14eca2){const _0x2324c6=_0x383d7f,_0x388122={'unitId':_0x4d0352,'threadId':_0x14eca2},_0x3af4ea=await this[_0x2324c6(0x12e)]['post'](_0x2324c6(0x130)+_0x4d0352+_0x2324c6(0x152),{'body':_0x388122}),_0xe1705d=_0x14eca2[_0x2324c6(0x15c)](_0x1b683f=>ee(_0x3af4ea[_0x2324c6(0x14b)][_0x2324c6(0x158)][_0x1b683f],_0x4d0352,_0xeacc82))[_0x2324c6(0x12c)](Boolean);return Object[_0x2324c6(0x13b)](_0x3af4ea[_0x2324c6(0x14b)][_0x2324c6(0x13e)])['forEach'](_0x4e27cb=>{const _0x4d40aa=_0x2324c6;this['_userService'][_0x4d40aa(0x15f)](_0x4e27cb);}),_0xe1705d;}[_0x383d7f(0x137)](_0x4ba47c){const _0x10bca5=_0x383d7f;return{'id':_0x4ba47c['id'],'threadId':_0x4ba47c[_0x10bca5(0x14e)],'ref':_0x4ba47c[_0x10bca5(0x13a)]};}};f=Q([_(0x0,_0x5c8570(_0x5762aa)),_(0x1,_0x5c8570(_0x13f5b7)),_(0x2,_0x5c8570(_0x47deb1)),_(0x3,_0x5c8570(_0x2a193b))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x29a8e6,_0x3dbf4e,_0x4aa51c,_0x439157)=>{const _0x40e579=_0x383d7f;for(var _0x3d6b78=_0x439157>0x1?void 0x0:_0x439157?re(_0x3dbf4e,_0x4aa51c):_0x3dbf4e,_0x482f4f=_0x29a8e6[_0x40e579(0x122)]-0x1,_0x3ea110;_0x482f4f>=0x0;_0x482f4f--)(_0x3ea110=_0x29a8e6[_0x482f4f])&&(_0x3d6b78=_0x3ea110(_0x3d6b78)||_0x3d6b78);return _0x3d6b78;},N=(_0x465ca3,_0x43735d)=>(_0x50429d,_0x38ac72)=>_0x43735d(_0x50429d,_0x38ac72,_0x465ca3);let g=class extends _0x4f4098{constructor(_0x981a2a,_0x5d848d){const _0x10014f=_0x383d7f;super(),this[_0x10014f(0x11d)]=_0x981a2a,this[_0x10014f(0x16e)]=_0x5d848d,this['_initDataSource']();}['_initDataSource'](){const _0xf23160=_0x383d7f;this[_0xf23160(0x11d)][_0xf23160(0x150)]=this[_0xf23160(0x16e)],this['_threadCommentDataSourceService'][_0xf23160(0x14a)]=!0x1;}};g=te([N(0x0,_0x59f743),N(0x1,_0x5c8570(f))],g);var se=Object[_0x383d7f(0x131)],oe=Object[_0x383d7f(0x161)],ne=(_0x5bfcb4,_0x39be1e,_0x20d126)=>_0x39be1e in _0x5bfcb4?se(_0x5bfcb4,_0x39be1e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20d126}):_0x5bfcb4[_0x39be1e]=_0x20d126,ie=(_0x410041,_0x2b8d9c,_0x3ff2f7,_0x38e2f8)=>{for(var _0x670de8=_0x38e2f8>0x1?void 0x0:_0x38e2f8?oe(_0x2b8d9c,_0x3ff2f7):_0x2b8d9c,_0x27d0b0=_0x410041['length']-0x1,_0x57e23b;_0x27d0b0>=0x0;_0x27d0b0--)(_0x57e23b=_0x410041[_0x27d0b0])&&(_0x670de8=_0x57e23b(_0x670de8)||_0x670de8);return _0x670de8;},w=(_0x5bcce2,_0x3c77e1)=>(_0x422059,_0x145879)=>_0x3c77e1(_0x422059,_0x145879,_0x5bcce2),$=(_0x264f40,_0x464f74,_0x253d6d)=>ne(_0x264f40,typeof _0x464f74!=_0x383d7f(0x163)?_0x464f74+'':_0x464f74,_0x253d6d);let b=class extends _0x291806{constructor(_0x4917e0=M,_0x327f14,_0x1385db){const _0x42f595=_0x383d7f;super(),this[_0x42f595(0x16c)]=_0x4917e0,this[_0x42f595(0x169)]=_0x327f14,this[_0x42f595(0x157)]=_0x1385db;const {..._0x5a0212}=_0x6ae9ba({},M,this[_0x42f595(0x16c)]);this[_0x42f595(0x157)]['setConfig'](z,_0x5a0212);}[_0x383d7f(0x115)](){const _0x43de69=_0x383d7f;[[f],[g],[S]][_0x43de69(0x156)](_0x445e70=>{const _0x443126=_0x43de69;this[_0x443126(0x169)]['add'](_0x445e70);});}[_0x383d7f(0x16f)](){const _0x491448=_0x383d7f;this[_0x491448(0x169)][_0x491448(0x132)](g),this[_0x491448(0x169)][_0x491448(0x132)](S);}};$(b,'pluginName',W),$(b,'type',_0xe88912['UNIVER_UNKNOWN']),b=ie([_0x24675c(_0x5f535f,_0x552ab1,_0x5beee8),w(0x1,_0x5c8570(_0x2a193b)),w(0x2,_0x4c4a24)],b);function _0x59d7(_0x55ca49,_0x133be4){const _0x169be5=_0x169b();return _0x59d7=function(_0x59d7e2,_0xaacfaa){_0x59d7e2=_0x59d7e2-0x113;let _0x194725=_0x169be5[_0x59d7e2];return _0x194725;},_0x59d7(_0x55ca49,_0x133be4);}function _0x169b(){const _0x3fca19=['1821029bSDiSG','_injector','_commentService','/solved','_config','30yVoFJx','_threadCommentDataSource','onReady','_initUserSync','115HFgBpY','rangeType','userId','_sessionService','onStarting','273930mHfNZU','thread-comment-data-source.config','post','Unknown','_threadCommentModel','size','createTimestamp','_threadCommentDataSourceService','228699xPhDnM','userID','slice','requireSession','length','addComment','OpenOrReOpen','UNRECOGNIZED','parse','solved','21371211bwhnnb','/reply','COMMENT','4442520RgCnvY','filter','replyId','_httpService','deleteComment','/universer-api/comment/unit/','defineProperty','get','code','Delete','getMemberID','replies','saveCommentToSnapshot','getUnit','rangeId','ref','values','payload','format','users','10HJvRny','commentUpdate$','delete','Add','Edit','_userService','root','error','updateComment','Reply','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','syncUpdateMutationToColla','body','resolveComment','parentId','threadId','type','dataSource','5564560lLqFNp','/list','Solved','subscribe','1165584JQOHAV','forEach','_configService','comments','Solve','add','user','map','customRanges','listComments','addUser','getComment','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','symbol','find','content','/edit','disposeWithMe'];_0x169b=function(){return _0x3fca19;};return _0x169b();}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xb520d2,_0xd688d9){const _0x24b211=_0x1f47,_0x291b0c=_0xb520d2();while(!![]){try{const _0x54edaa=-parseInt(_0x24b211(0x1b2))/0x1*(parseInt(_0x24b211(0x1da))/0x2)+-parseInt(_0x24b211(0x177))/0x3*(parseInt(_0x24b211(0x1a7))/0x4)+parseInt(_0x24b211(0x170))/0x5*(parseInt(_0x24b211(0x1a9))/0x6)+parseInt(_0x24b211(0x17c))/0x7*(-parseInt(_0x24b211(0x188))/0x8)+parseInt(_0x24b211(0x185))/0x9*(parseInt(_0x24b211(0x1d6))/0xa)+parseInt(_0x24b211(0x17a))/0xb+-parseInt(_0x24b211(0x1cc))/0xc*(-parseInt(_0x24b211(0x190))/0xd);if(_0x54edaa===_0xd688d9)break;else _0x291b0c['push'](_0x291b0c['shift']());}catch(_0x34bf3e){_0x291b0c['push'](_0x291b0c['shift']());}}}(_0x4a3b,0x3fec0),function(_0x33de4d,_0x340c14){const _0x11a207=_0x1f47;typeof exports==_0x11a207(0x168)&&typeof module<'u'?_0x340c14(exports,require(_0x11a207(0x175)),require(_0x11a207(0x1c8)),require('@univerjs/core'),require(_0x11a207(0x1ba)),require('@univerjs/thread-comment'),require(_0x11a207(0x193)),require(_0x11a207(0x1aa))):typeof define=='function'&&define[_0x11a207(0x1c2)]?define([_0x11a207(0x197),_0x11a207(0x175),'@univerjs-pro/license',_0x11a207(0x195),'@univerjs/thread-comment-ui','@univerjs/thread-comment','rxjs',_0x11a207(0x1aa)],_0x340c14):(_0x33de4d=typeof globalThis<'u'?globalThis:_0x33de4d||self,_0x340c14(_0x33de4d['UniverProThreadCommentDatasource']={},_0x33de4d[_0x11a207(0x1c4)],_0x33de4d['UniverProLicense'],_0x33de4d['UniverCore'],_0x33de4d[_0x11a207(0x167)],_0x33de4d['UniverThreadComment'],_0x33de4d[_0x11a207(0x193)],_0x33de4d['UniverNetwork']));}(this,function(_0x2f5869,_0x1964b2,_0x2356c0,_0x4ecff4,_0x392893,_0x223cf2,_0x170bcb,_0x5071d1){'use strict';const _0x1565f7=_0x1f47;const _0x577ec7=_0x1565f7(0x16c);var _0x4bf784=(_0x4a8aa0=>(_0x4a8aa0[_0x4a8aa0['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x4a8aa0[_0x4a8aa0[_0x1565f7(0x1d9)]=0x1]=_0x1565f7(0x1d9),_0x4a8aa0[_0x4a8aa0[_0x1565f7(0x1ad)]=-0x1]=_0x1565f7(0x1ad),_0x4a8aa0))(_0x4bf784||{}),_0x532eb8=(_0x58e9f6=>(_0x58e9f6[_0x58e9f6[_0x1565f7(0x1e9)]=0x0]=_0x1565f7(0x1e9),_0x58e9f6[_0x58e9f6['Add']=0x1]=_0x1565f7(0x1d5),_0x58e9f6[_0x58e9f6[_0x1565f7(0x19b)]=0x2]=_0x1565f7(0x19b),_0x58e9f6[_0x58e9f6[_0x1565f7(0x16b)]=0x3]=_0x1565f7(0x16b),_0x58e9f6[_0x58e9f6[_0x1565f7(0x182)]=0x4]='Delete',_0x58e9f6[_0x58e9f6[_0x1565f7(0x1cb)]=0x5]=_0x1565f7(0x1cb),_0x58e9f6[_0x58e9f6['UNRECOGNIZED']=-0x1]=_0x1565f7(0x1ad),_0x58e9f6))(_0x532eb8||{});const _0x7c2e05=_0x3285ae=>_0x4ecff4['dayjs'](new Date(+_0x3285ae))[_0x1565f7(0x17f)](_0x1565f7(0x1ec)),_0x5d1307=async(_0x398a5d,_0x5f2bb7)=>{const _0x1c00b9=_0x1565f7,_0x365795=_0x398a5d[_0x1c00b9(0x163)](_0x4ecff4[_0x1c00b9(0x173)]),_0x4c42dd=_0x398a5d[_0x1c00b9(0x163)](_0x5071d1[_0x1c00b9(0x1a0)]);_0x5f2bb7[_0x1c00b9(0x1bd)](_0x1a39d3=>{const _0x17c5f0=_0x1c00b9;_0x365795[_0x17c5f0(0x199)](_0x1a39d3)&&_0x5f2bb7[_0x17c5f0(0x1c6)](_0x1a39d3);}),_0x5f2bb7[_0x1c00b9(0x166)]&&(await _0x4c42dd[_0x1c00b9(0x163)](_0x1c00b9(0x1e5),{'params':{'userIDs':[..._0x5f2bb7]}}))[_0x1c00b9(0x1d4)][_0x1c00b9(0x1c5)][_0x1c00b9(0x1bd)](_0x533de4=>{_0x533de4&&_0x365795['addUser'](_0x533de4);});};var _0x1f3567=Object['getOwnPropertyDescriptor'],_0x48368a=(_0x1af139,_0x5216b2,_0x47a5ea,_0x3e747a)=>{for(var _0x321e93=_0x3e747a>0x1?void 0x0:_0x3e747a?_0x1f3567(_0x5216b2,_0x47a5ea):_0x5216b2,_0x3576c2=_0x1af139['length']-0x1,_0x4b43ce;_0x3576c2>=0x0;_0x3576c2--)(_0x4b43ce=_0x1af139[_0x3576c2])&&(_0x321e93=_0x4b43ce(_0x321e93)||_0x321e93);return _0x321e93;},_0x2d7630=(_0x426114,_0x577956)=>(_0x411ae3,_0x13ef2d)=>_0x577956(_0x411ae3,_0x13ef2d,_0x426114);let _0x22d035=class extends _0x4ecff4[_0x1565f7(0x1bc)]{constructor(_0x21e631,_0x5c46da,_0x1e17cf,_0x5ef412){const _0x5dfd2f=_0x1565f7;super(),this[_0x5dfd2f(0x1eb)]=_0x21e631,this[_0x5dfd2f(0x1ce)]=_0x5c46da,this[_0x5dfd2f(0x1ab)]=_0x1e17cf,this[_0x5dfd2f(0x19a)]=_0x5ef412,this[_0x5dfd2f(0x178)](),this[_0x5dfd2f(0x1b3)]();}[_0x1565f7(0x1b3)](){const _0x3d296a=_0x1565f7;this[_0x3d296a(0x189)](this['_threadCommentModel'][_0x3d296a(0x184)][_0x3d296a(0x1db)](_0x170bcb[_0x3d296a(0x1ae)](0x10))[_0x3d296a(0x1b5)](_0x1a4497=>{const _0x58ee65=_0x3d296a,_0x2a7346=new Set();_0x1a4497[_0x58ee65(0x1bd)](_0x149438=>{const _0x1cb2a3=_0x58ee65;switch(_0x149438['type']){case'add':{const _0x1861e5=_0x149438[_0x1cb2a3(0x18e)][_0x1cb2a3(0x186)];_0x2a7346[_0x1cb2a3(0x169)](_0x1861e5);break;}}}),_0x5d1307(this[_0x58ee65(0x19a)],_0x2a7346);}));}['_init'](){const _0x32e36b=_0x1565f7;this[_0x32e36b(0x189)](this['_commentService'][_0x32e36b(0x184)][_0x32e36b(0x1b5)](async _0x1b5d9a=>{const _0x30e761=_0x32e36b;var _0x1c0ea2,_0x1f50c0,_0x1840d3,_0x45e24c;const _0x5e0d2d=(_0x1c0ea2=this[_0x30e761(0x1ce)]['getUnit'](_0x1b5d9a[_0x30e761(0x183)])[_0x30e761(0x1ca)](_0x436048=>_0x436048[_0x30e761(0x1a3)]===_0x1b5d9a[_0x30e761(0x1a3)]))==null?void 0x0:_0x1c0ea2[_0x30e761(0x18c)];if(!_0x5e0d2d)return;const {unitId:_0x4a36f7,subUnitId:_0x4c66fd}=_0x5e0d2d;switch(_0x1b5d9a[_0x30e761(0x19e)]&&this[_0x30e761(0x1ab)]['addUser'](_0x1b5d9a[_0x30e761(0x19e)]),_0x1b5d9a[_0x30e761(0x1c3)]){case _0x532eb8[_0x30e761(0x1d5)]:break;case _0x532eb8[_0x30e761(0x19b)]:{this[_0x30e761(0x1ce)][_0x30e761(0x198)](_0x4a36f7,_0x4c66fd,{'unitId':_0x4a36f7,'subUnitId':_0x4c66fd,'ref':'','id':_0x1b5d9a[_0x30e761(0x1bb)],'dT':_0x7c2e05(+_0x1b5d9a[_0x30e761(0x1ac)]),'threadId':_0x1b5d9a[_0x30e761(0x1a3)],'personId':(_0x1840d3=(_0x1f50c0=_0x1b5d9a[_0x30e761(0x19e)])==null?void 0x0:_0x1f50c0[_0x30e761(0x1bf)])!=null?_0x1840d3:_0x1b5d9a[_0x30e761(0x16d)],'text':JSON['parse'](_0x1b5d9a['content']),'parentId':_0x5e0d2d['id']});break;}case _0x532eb8[_0x30e761(0x182)]:{const _0x4507d1=this[_0x30e761(0x1ce)][_0x30e761(0x164)](_0x4a36f7,_0x4c66fd,_0x1b5d9a['replyId']);_0x4507d1&&_0x4507d1[_0x30e761(0x187)]&&this[_0x30e761(0x1ce)][_0x30e761(0x1d0)](_0x4a36f7,_0x4c66fd,_0x1b5d9a[_0x30e761(0x1bb)]);break;}case _0x532eb8['Edit']:{this[_0x30e761(0x1ce)][_0x30e761(0x17d)](_0x4a36f7,_0x4c66fd,{'commentId':_0x1b5d9a[_0x30e761(0x1bb)],'text':JSON['parse'](_0x1b5d9a['content'])});break;}case _0x532eb8[_0x30e761(0x1cb)]:{const _0x54c31e=(_0x45e24c=this[_0x30e761(0x1ce)]['getUnit'](_0x1b5d9a['unitId'])[_0x30e761(0x1ca)](_0x5ec8a2=>_0x5ec8a2[_0x30e761(0x1a3)]===_0x1b5d9a[_0x30e761(0x1a3)]))==null?void 0x0:_0x45e24c[_0x30e761(0x18c)];_0x54c31e&&this['_threadCommentModel'][_0x30e761(0x194)](_0x4a36f7,_0x4c66fd,_0x54c31e['id'],_0x1b5d9a[_0x30e761(0x18a)]===_0x4bf784['Solved']);break;}}}));}};_0x22d035=_0x48368a([_0x2d7630(0x0,_0x4ecff4[_0x1565f7(0x17e)](_0x1964b2['CommentService'])),_0x2d7630(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x223cf2[_0x1565f7(0x165)])),_0x2d7630(0x2,_0x4ecff4['Inject'](_0x4ecff4['UserManagerService'])),_0x2d7630(0x3,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4['Injector']))],_0x22d035);const _0x36e886='thread-comment-data-source.config',_0x2e8f12={};var _0x847824=Object[_0x1565f7(0x1b8)],_0x3a377e=(_0x1dcf84,_0x32971d,_0x1d3118,_0x328b5b)=>{const _0x4eb1cb=_0x1565f7;for(var _0x12bbdb=_0x328b5b>0x1?void 0x0:_0x328b5b?_0x847824(_0x32971d,_0x1d3118):_0x32971d,_0x50aa27=_0x1dcf84[_0x4eb1cb(0x176)]-0x1,_0x5a64eb;_0x50aa27>=0x0;_0x50aa27--)(_0x5a64eb=_0x1dcf84[_0x50aa27])&&(_0x12bbdb=_0x5a64eb(_0x12bbdb)||_0x12bbdb);return _0x12bbdb;},_0x2bdfc5=(_0x2d17e0,_0x11b3d0)=>(_0x3595a3,_0x2a1778)=>_0x11b3d0(_0x3595a3,_0x2a1778,_0x2d17e0);function _0x36cda4(_0x2f63ae,_0x2d2c32){const _0x5aa780=_0x1565f7,_0x2ea3e6=_0x2f63ae['replies'][0x0];return{..._0x2d2c32,'id':_0x2ea3e6[_0x5aa780(0x1bb)],'resolved':_0x2f63ae[_0x5aa780(0x18a)]===0x1,'dT':_0x7c2e05(_0x2ea3e6['createTimestamp']),'personId':_0x2ea3e6[_0x5aa780(0x16d)],'threadId':_0x2ea3e6[_0x5aa780(0x1a3)]};}function _0x2b555f(_0x3af6c7,_0x5a744a,_0x564665){const _0xf15fcd=_0x1565f7;var _0x417bcd,_0x51cbaa;if(((_0x51cbaa=(_0x417bcd=_0x3af6c7==null?void 0x0:_0x3af6c7[_0xf15fcd(0x174)])==null?void 0x0:_0x417bcd[_0xf15fcd(0x176)])!=null?_0x51cbaa:0x0)>0x0){const _0x263106=(_0x43f653,_0x45b493)=>({'id':_0x43f653['replyId'],'threadId':_0x43f653[_0xf15fcd(0x1a3)],'dT':_0x7c2e05(_0x43f653['createTimestamp']),'personId':_0x43f653[_0xf15fcd(0x16d)],'resolved':_0x3af6c7[_0xf15fcd(0x18a)]===_0x4bf784[_0xf15fcd(0x1d9)],'unitId':_0x5a744a,'subUnitId':_0x564665,'text':JSON[_0xf15fcd(0x1dc)](_0x43f653[_0xf15fcd(0x16a)]),'parentId':_0x45b493}),_0x4b2a26=_0x263106(_0x3af6c7[_0xf15fcd(0x174)][0x0]);return{..._0x4b2a26,'children':_0x3af6c7[_0xf15fcd(0x174)][_0xf15fcd(0x1a8)](0x1)['map'](_0x50b9ce=>_0x263106(_0x50b9ce,_0x4b2a26['id']))};}return null;}let _0x3123b7=class{constructor(_0x2bfba8,_0x48b265,_0x28989c,_0x140840){const _0x19fbe8=_0x1565f7;this[_0x19fbe8(0x1b6)]=_0x2bfba8,this[_0x19fbe8(0x1ab)]=_0x48b265,this[_0x19fbe8(0x16e)]=_0x28989c,this[_0x19fbe8(0x19a)]=_0x140840;}async[_0x1565f7(0x198)](_0x4d53ea){const _0xecf319=_0x1565f7;var _0x1893c7,_0x557973;const {parentId:_0x38ece6,unitId:_0x2127c1,text:_0x547914,threadId:_0x286b80}=_0x4d53ea,_0x18cf56=(_0x557973=(_0x1893c7=_0x547914['customRanges'])==null?void 0x0:_0x1893c7[_0xecf319(0x1cf)](_0x45cc02=>_0x45cc02['rangeType']===_0x4ecff4[_0xecf319(0x16f)][_0xecf319(0x18f)])['map'](_0x4f6253=>_0x4f6253[_0xecf319(0x1a6)]))!=null?_0x557973:[],_0x4f4f7d=JSON[_0xecf319(0x181)](_0x547914),_0x23326d=(await this['_sessionService'][_0xecf319(0x192)](_0x2127c1))['getMemberID']();if(_0x38ece6){const _0x193e40={'memberId':_0x23326d,'unitId':_0x2127c1,'content':_0x4f4f7d,'mention':_0x18cf56,'threadId':_0x286b80},_0x5b2552=(await this[_0xecf319(0x1b6)]['post'](_0xecf319(0x1e1)+_0x2127c1+_0xecf319(0x161),{'body':_0x193e40}))[_0xecf319(0x1d4)][_0xecf319(0x162)];return{..._0x4d53ea,'id':_0x5b2552[_0xecf319(0x1bb)],'dT':_0x4ecff4[_0xecf319(0x1c0)](+_0x5b2552[_0xecf319(0x1ac)])['format'](_0xecf319(0x1ec)),'personId':_0x5b2552[_0xecf319(0x16d)]};}else{const _0x27f0b5={'memberId':_0x23326d,'unitId':_0x2127c1,'content':_0x4f4f7d,'mention':_0x18cf56},_0xf1aab9=await this[_0xecf319(0x1b6)][_0xecf319(0x1d8)]('/universer-api/comment/unit/'+_0x2127c1+_0xecf319(0x19f),{'body':_0x27f0b5});return _0x36cda4(_0xf1aab9['body'][_0xecf319(0x1a2)],_0x4d53ea);}}async[_0x1565f7(0x17d)](_0x55519f){const _0x401c59=_0x1565f7;var _0x3f4e93,_0x43225f;const {text:_0x3d87b6,unitId:_0x530de5}=_0x55519f,_0x470201=(_0x43225f=(_0x3f4e93=_0x3d87b6[_0x401c59(0x179)])==null?void 0x0:_0x3f4e93[_0x401c59(0x1cf)](_0x27f9ba=>_0x27f9ba[_0x401c59(0x1e8)]===_0x4ecff4['CustomRangeType'][_0x401c59(0x18f)])[_0x401c59(0x18d)](_0x3236fa=>_0x3236fa[_0x401c59(0x1a6)]))!=null?_0x43225f:[],_0xced78=JSON[_0x401c59(0x181)](_0x3d87b6),_0x4001ff=_0x55519f[_0x401c59(0x1a3)],_0x392105=_0x55519f['id'],_0xc61612={'memberId':(await this['_sessionService']['requireSession'](_0x530de5))[_0x401c59(0x19c)](),'unitId':_0x530de5,'threadId':_0x4001ff,'mention':_0x470201,'content':_0xced78,'replyId':_0x392105},_0x5b1fd5=await this[_0x401c59(0x1b6)][_0x401c59(0x1d8)]('/universer-api/comment/unit/'+_0x530de5+_0x401c59(0x171),{'body':_0xc61612});return!_0x5b1fd5[_0x401c59(0x1d4)][_0x401c59(0x1a5)]||_0x5b1fd5[_0x401c59(0x1d4)]['error'][_0x401c59(0x180)]===0x1;}async['resolveComment'](_0xebf8e){const _0x4ed956=_0x1565f7,{unitId:_0x2a93f6}=_0xebf8e,_0x11ec66=_0xebf8e['threadId'],_0xc3cb5c={'memberId':this[_0x4ed956(0x1ab)][_0x4ed956(0x191)]()[_0x4ed956(0x1bf)],'unitId':_0x2a93f6,'threadId':_0x11ec66,'solved':_0xebf8e[_0x4ed956(0x1b7)]?_0x4bf784['Solved']:_0x4bf784[_0x4ed956(0x18b)]},_0x470aa9=await this[_0x4ed956(0x1b6)][_0x4ed956(0x1d8)](_0x4ed956(0x1e1)+_0x2a93f6+_0x4ed956(0x1e7),{'body':_0xc3cb5c});return!_0x470aa9[_0x4ed956(0x1d4)]['error']||_0x470aa9[_0x4ed956(0x1d4)][_0x4ed956(0x1a5)][_0x4ed956(0x180)]===0x1;}async['deleteComment'](_0x10db93,_0x2b6a62,_0x3c5b18,_0x4e58c5){const _0x570acb=_0x1565f7,_0x2bb34b={'memberId':(await this[_0x570acb(0x16e)][_0x570acb(0x192)](_0x10db93))[_0x570acb(0x19c)](),'threadId':_0x3c5b18,'replyId':_0x4e58c5,'unitId':_0x10db93},_0x3c0787=await this[_0x570acb(0x1b6)][_0x570acb(0x1d8)]('/universer-api/comment/unit/'+_0x10db93+_0x570acb(0x1b4),{'body':_0x2bb34b});return!_0x3c0787[_0x570acb(0x1d4)][_0x570acb(0x1a5)]||_0x3c0787[_0x570acb(0x1d4)]['error'][_0x570acb(0x180)]===0x1;}async[_0x1565f7(0x1d7)](_0x3e0893,_0xdfafd7,_0x3eaf12){const _0xf17b9a=_0x1565f7,_0x54cff3={'unitId':_0x3e0893,'threadId':_0x3eaf12},_0x1249c2=await this[_0xf17b9a(0x1b6)][_0xf17b9a(0x1d8)](_0xf17b9a(0x1e1)+_0x3e0893+_0xf17b9a(0x1e2),{'body':_0x54cff3}),_0x5c0a0e=_0x3eaf12['map'](_0x2606c2=>_0x2b555f(_0x1249c2[_0xf17b9a(0x1d4)]['comments'][_0x2606c2],_0x3e0893,_0xdfafd7))['filter'](Boolean);return Object['values'](_0x1249c2[_0xf17b9a(0x1d4)]['users'])[_0xf17b9a(0x1bd)](_0x5ded80=>{const _0x4b874b=_0xf17b9a;this[_0x4b874b(0x1ab)][_0x4b874b(0x1df)](_0x5ded80);}),_0x5c0a0e;}['saveCommentToSnapshot'](_0x1a5074){const _0x58e8a4=_0x1565f7;return{'id':_0x1a5074['id'],'threadId':_0x1a5074[_0x58e8a4(0x1a3)],'ref':_0x1a5074[_0x58e8a4(0x1e3)]};}};_0x3123b7=_0x3a377e([_0x2bdfc5(0x0,_0x4ecff4[_0x1565f7(0x17e)](_0x5071d1['HTTPService'])),_0x2bdfc5(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4['UserManagerService'])),_0x2bdfc5(0x2,_0x4ecff4['Inject'](_0x1964b2[_0x1565f7(0x1dd)])),_0x2bdfc5(0x3,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4[_0x1565f7(0x1d1)]))],_0x3123b7);var _0x34817e=Object[_0x1565f7(0x1b8)],_0x5219a3=(_0x29bbc5,_0x357171,_0x5ca252,_0x54c407)=>{const _0x34047=_0x1565f7;for(var _0xb7a9de=_0x54c407>0x1?void 0x0:_0x54c407?_0x34817e(_0x357171,_0x5ca252):_0x357171,_0x4fcfcb=_0x29bbc5[_0x34047(0x176)]-0x1,_0x4d4e19;_0x4fcfcb>=0x0;_0x4fcfcb--)(_0x4d4e19=_0x29bbc5[_0x4fcfcb])&&(_0xb7a9de=_0x4d4e19(_0xb7a9de)||_0xb7a9de);return _0xb7a9de;},_0x16a223=(_0x183c3d,_0x40b296)=>(_0x5da1f7,_0x561c0f)=>_0x40b296(_0x5da1f7,_0x561c0f,_0x183c3d);let _0x28da2a=class extends _0x4ecff4[_0x1565f7(0x1bc)]{constructor(_0x36a8c7,_0x19cdd8){const _0x5cc775=_0x1565f7;super(),this[_0x5cc775(0x1a1)]=_0x36a8c7,this[_0x5cc775(0x1c9)]=_0x19cdd8,this['_initDataSource']();}[_0x1565f7(0x1c1)](){const _0x469df5=_0x1565f7;this[_0x469df5(0x1a1)][_0x469df5(0x1a4)]=this[_0x469df5(0x1c9)],this['_threadCommentDataSourceService'][_0x469df5(0x1d2)]=!0x1;}};_0x28da2a=_0x5219a3([_0x16a223(0x0,_0x223cf2['IThreadCommentDataSourceService']),_0x16a223(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x3123b7))],_0x28da2a);var _0x2c5d99=Object[_0x1565f7(0x172)],_0x14fd11=Object['getOwnPropertyDescriptor'],_0x27ea05=(_0x463728,_0x1e7ebd,_0x1a7353)=>_0x1e7ebd in _0x463728?_0x2c5d99(_0x463728,_0x1e7ebd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a7353}):_0x463728[_0x1e7ebd]=_0x1a7353,_0x1ba6b4=(_0x5d9495,_0x3e726a,_0x101750,_0x5e31fa)=>{const _0x4cfcfd=_0x1565f7;for(var _0x4bfdb9=_0x5e31fa>0x1?void 0x0:_0x5e31fa?_0x14fd11(_0x3e726a,_0x101750):_0x3e726a,_0x3e5982=_0x5d9495[_0x4cfcfd(0x176)]-0x1,_0x21298f;_0x3e5982>=0x0;_0x3e5982--)(_0x21298f=_0x5d9495[_0x3e5982])&&(_0x4bfdb9=_0x21298f(_0x4bfdb9)||_0x4bfdb9);return _0x4bfdb9;},_0x4a63be=(_0x3c6f76,_0x379ad4)=>(_0x40640a,_0x14700c)=>_0x379ad4(_0x40640a,_0x14700c,_0x3c6f76),_0x8efde3=(_0x41e6df,_0x5e84e4,_0x51f6be)=>_0x27ea05(_0x41e6df,typeof _0x5e84e4!=_0x1565f7(0x1b1)?_0x5e84e4+'':_0x5e84e4,_0x51f6be);_0x2f5869['UniverThreadCommentDataSourcePlugin']=class extends _0x4ecff4[_0x1565f7(0x1cd)]{constructor(_0x4281af=_0x2e8f12,_0x460c90,_0x50dba1){const _0x2b02c6=_0x1565f7;super(),this[_0x2b02c6(0x1ea)]=_0x4281af,this[_0x2b02c6(0x19a)]=_0x460c90,this[_0x2b02c6(0x1d3)]=_0x50dba1;const {..._0x1377bc}=_0x4ecff4[_0x2b02c6(0x17b)]({},_0x2e8f12,this[_0x2b02c6(0x1ea)]);this[_0x2b02c6(0x1d3)]['setConfig'](_0x36e886,_0x1377bc);}[_0x1565f7(0x1c7)](){[[_0x3123b7],[_0x28da2a],[_0x22d035]]['forEach'](_0x53e0b9=>{const _0x3a885f=_0x1f47;this[_0x3a885f(0x19a)][_0x3a885f(0x169)](_0x53e0b9);});}['onReady'](){const _0x154628=_0x1565f7;this[_0x154628(0x19a)][_0x154628(0x163)](_0x28da2a),this[_0x154628(0x19a)][_0x154628(0x163)](_0x22d035);}},_0x8efde3(_0x2f5869[_0x1565f7(0x1b0)],'pluginName',_0x577ec7),_0x8efde3(_0x2f5869[_0x1565f7(0x1b0)],'type',_0x4ecff4[_0x1565f7(0x196)][_0x1565f7(0x1b9)]),_0x2f5869[_0x1565f7(0x1b0)]=_0x1ba6b4([_0x4ecff4[_0x1565f7(0x1af)](_0x392893[_0x1565f7(0x1de)],_0x1964b2[_0x1565f7(0x1e6)],_0x2356c0[_0x1565f7(0x1e4)]),_0x4a63be(0x1,_0x4ecff4[_0x1565f7(0x17e)](_0x4ecff4[_0x1565f7(0x1d1)])),_0x4a63be(0x2,_0x4ecff4[_0x1565f7(0x1e0)])],_0x2f5869[_0x1565f7(0x1b0)]),Object['defineProperty'](_0x2f5869,Symbol[_0x1565f7(0x19d)],{'value':_0x1565f7(0x1be)});}));function _0x1f47(_0x20a5a5,_0x2a1ee2){const _0x4a3bf6=_0x4a3b();return _0x1f47=function(_0x1f473d,_0x335606){_0x1f473d=_0x1f473d-0x161;let _0x4fa57a=_0x4a3bf6[_0x1f473d];return _0x4fa57a;},_0x1f47(_0x20a5a5,_0x2a1ee2);}function _0x4a3b(){const _0x3f0f7f=['users','delete','onStarting','@univerjs-pro/license','_threadCommentDataSource','find','Solve','60vnaIMm','Plugin','_threadCommentModel','filter','deleteComment','Injector','syncUpdateMutationToColla','_configService','body','Add','10sPPmUr','listComments','post','Solved','58274FOUwXn','pipe','parse','CollaborationSessionService','UniverThreadCommentUIPlugin','addUser','IConfigService','/universer-api/comment/unit/','/list','ref','UniverLicensePlugin','/universer-api/user/list','UniverCollaborationClientPlugin','/solved','rangeType','Unknown','_config','_commentService','YYYY/MM/DD\x20HH:mm','/reply','reply','get','getComment','ThreadCommentModel','size','UniverThreadCommentUi','object','add','content','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','userId','_sessionService','CustomRangeType','2395bXnbuJ','/edit','defineProperty','UserManagerService','replies','@univerjs-pro/collaboration-client','length','434640osFCnB','_init','customRanges','4707549yxvdIp','merge','6251iudBiM','updateComment','Inject','format','code','stringify','Delete','unitId','commentUpdate$','1824777DFXsQw','personId','parentId','1912zGYjYY','disposeWithMe','solved','OpenOrReOpen','root','map','payload','COMMENT','1073293SDIWGE','getCurrentUser','requireSession','rxjs','resolveComment','@univerjs/core','UniverInstanceType','exports','addComment','getUser','_injector','Reply','getMemberID','toStringTag','user','/add','HTTPService','_threadCommentDataSourceService','comment','threadId','dataSource','error','rangeId','8LUoDsI','slice','1986NZSfrq','@univerjs/network','_userService','createTimestamp','UNRECOGNIZED','bufferTime','DependentOn','UniverThreadCommentDataSourcePlugin','symbol','15AHhEXM','_initUserSync','/delete','subscribe','_httpService','resolved','getOwnPropertyDescriptor','UNIVER_UNKNOWN','@univerjs/thread-comment-ui','replyId','Disposable','forEach','Module','userID','dayjs','_initDataSource','amd','type','UniverProCollaborationClient'];_0x4a3b=function(){return _0x3f0f7f;};return _0x4a3b();}
|
|
1
|
+
function _0x8b84(){const _0x298c69=['commentUpdate$','OpenOrReOpen','find','31Szpksn','requireSession','UniverInstanceType','subscribe','Plugin','pipe','customRanges','Module','@univerjs-pro/collaboration-client','UniverThreadCommentUi','UniverCore','map','DependentOn','@univerjs/network','_injector','5761LJsIKb','_initDataSource','function','Reply','_threadCommentModel','UniverProThreadCommentDatasource','format','UniverLicensePlugin','UNIVER_UNKNOWN','comments','forEach','getCurrentUser','replies','_httpService','reply','@univerjs/core','52400jFqWyp','rangeType','toStringTag','personId','6142662pUAaTX','defineProperty','CollaborationSessionService','users','syncUpdateMutationToColla','@univerjs/thread-comment-ui','dayjs','_userService','Solved','threadId','error','UserManagerService','UniverCollaborationClientPlugin','4rcomAV','_threadCommentDataSourceService','/reply','UniverProLicense','Edit','_config','_commentService','/universer-api/user/list','getUser','1392666oiJRAF','IConfigService','root','exports','addUser','resolved','Add','@univerjs-pro/license','UNRECOGNIZED','content','replyId','CustomRangeType','bufferTime','unitId','8935iDeLOr','IThreadCommentDataSourceService','onStarting','Solve','HTTPService','size','14126ioUcoY','Disposable','parentId','post','Injector','_configService','ThreadCommentModel','get','_threadCommentDataSource','/add','user','/solved','userID','4215897WiQZXr','UniverThreadComment','/universer-api/comment/unit/','getMemberID','disposeWithMe','pluginName','deleteComment','parse','Inject','onReady','symbol','_init','body','UniverThreadCommentDataSourcePlugin','_initUserSync','3608NeBgdP','listComments','filter','_sessionService','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','code','rangeId','UniverThreadCommentUIPlugin','@univerjs/thread-comment','slice','Delete','getUnit','userId','updateComment','/list','stringify','getOwnPropertyDescriptor','dataSource','type','solved','comment','resolveComment','createTimestamp','UniverNetwork','length','ref','rxjs','3152lnbxoY','addComment'];_0x8b84=function(){return _0x298c69;};return _0x8b84();}function _0x4d79(_0x4dea38,_0x25ee01){const _0x8b84bb=_0x8b84();return _0x4d79=function(_0x4d79e0,_0x391fdf){_0x4d79e0=_0x4d79e0-0x1b1;let _0x394475=_0x8b84bb[_0x4d79e0];return _0x394475;},_0x4d79(_0x4dea38,_0x25ee01);}(function(_0x16c868,_0x3bb3dc){const _0x3d4f0b=_0x4d79,_0x25d0b1=_0x16c868();while(!![]){try{const _0x8c6424=-parseInt(_0x3d4f0b(0x223))/0x1*(-parseInt(_0x3d4f0b(0x1e5))/0x2)+-parseInt(_0x3d4f0b(0x1d1))/0x3*(parseInt(_0x3d4f0b(0x1c8))/0x4)+-parseInt(_0x3d4f0b(0x1df))/0x5+-parseInt(_0x3d4f0b(0x1bb))/0x6+-parseInt(_0x3d4f0b(0x232))/0x7*(parseInt(_0x3d4f0b(0x21e))/0x8)+parseInt(_0x3d4f0b(0x1f2))/0x9+-parseInt(_0x3d4f0b(0x1b7))/0xa*(-parseInt(_0x3d4f0b(0x201))/0xb);if(_0x8c6424===_0x3bb3dc)break;else _0x25d0b1['push'](_0x25d0b1['shift']());}catch(_0x22030c){_0x25d0b1['push'](_0x25d0b1['shift']());}}}(_0x8b84,0x908ba),function(_0x42bffa,_0x2c7277){const _0x4aa845=_0x4d79;typeof exports=='object'&&typeof module<'u'?_0x2c7277(exports,require('@univerjs-pro/collaboration-client'),require(_0x4aa845(0x1d8)),require(_0x4aa845(0x1b6)),require(_0x4aa845(0x1c0)),require(_0x4aa845(0x20b)),require(_0x4aa845(0x21d)),require('@univerjs/network')):typeof define==_0x4aa845(0x234)&&define['amd']?define([_0x4aa845(0x1d4),_0x4aa845(0x22b),_0x4aa845(0x1d8),_0x4aa845(0x1b6),'@univerjs/thread-comment-ui',_0x4aa845(0x20b),_0x4aa845(0x21d),_0x4aa845(0x230)],_0x2c7277):(_0x42bffa=typeof globalThis<'u'?globalThis:_0x42bffa||self,_0x2c7277(_0x42bffa[_0x4aa845(0x237)]={},_0x42bffa['UniverProCollaborationClient'],_0x42bffa[_0x4aa845(0x1cb)],_0x42bffa[_0x4aa845(0x22d)],_0x42bffa[_0x4aa845(0x22c)],_0x42bffa[_0x4aa845(0x1f3)],_0x42bffa[_0x4aa845(0x21d)],_0x42bffa[_0x4aa845(0x21a)]));}(this,function(_0x2a8590,_0x47eae7,_0x514dac,_0x4ff2e3,_0x5f01b1,_0xc6ab35,_0x503832,_0x574a01){'use strict';const _0x5c1b77=_0x4d79;const _0xe30060=_0x5c1b77(0x206);var _0xb5ace3=(_0x1582f0=>(_0x1582f0[_0x1582f0['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x1582f0[_0x1582f0[_0x5c1b77(0x1c3)]=0x1]=_0x5c1b77(0x1c3),_0x1582f0[_0x1582f0[_0x5c1b77(0x1d9)]=-0x1]=_0x5c1b77(0x1d9),_0x1582f0))(_0xb5ace3||{}),_0x5a32bb=(_0x280976=>(_0x280976[_0x280976['Unknown']=0x0]='Unknown',_0x280976[_0x280976[_0x5c1b77(0x1d7)]=0x1]='Add',_0x280976[_0x280976[_0x5c1b77(0x235)]=0x2]='Reply',_0x280976[_0x280976[_0x5c1b77(0x1cc)]=0x3]=_0x5c1b77(0x1cc),_0x280976[_0x280976[_0x5c1b77(0x20d)]=0x4]=_0x5c1b77(0x20d),_0x280976[_0x280976[_0x5c1b77(0x1e2)]=0x5]=_0x5c1b77(0x1e2),_0x280976[_0x280976[_0x5c1b77(0x1d9)]=-0x1]=_0x5c1b77(0x1d9),_0x280976))(_0x5a32bb||{});const _0xb80f4=_0x2269c3=>_0x4ff2e3[_0x5c1b77(0x1c1)](new Date(+_0x2269c3))[_0x5c1b77(0x238)]('YYYY/MM/DD\x20HH:mm'),_0x456c83=async(_0x1d4fa4,_0x24aded)=>{const _0x198c71=_0x5c1b77,_0x21bb5=_0x1d4fa4[_0x198c71(0x1ec)](_0x4ff2e3[_0x198c71(0x1c6)]),_0x1bde2c=_0x1d4fa4[_0x198c71(0x1ec)](_0x574a01[_0x198c71(0x1e3)]);_0x24aded[_0x198c71(0x1b1)](_0x210428=>{const _0x3b7801=_0x198c71;_0x21bb5[_0x3b7801(0x1d0)](_0x210428)&&_0x24aded['delete'](_0x210428);}),_0x24aded[_0x198c71(0x1e4)]&&(await _0x1bde2c[_0x198c71(0x1ec)](_0x198c71(0x1cf),{'params':{'userIDs':[..._0x24aded]}}))[_0x198c71(0x1fe)][_0x198c71(0x1be)][_0x198c71(0x1b1)](_0x3ecda0=>{const _0xdd52b1=_0x198c71;_0x3ecda0&&_0x21bb5[_0xdd52b1(0x1d5)](_0x3ecda0);});};var _0xe45a03=Object['getOwnPropertyDescriptor'],_0x3eadd6=(_0x4925c5,_0x5a3e1d,_0x4037e7,_0x2cc367)=>{for(var _0x167065=_0x2cc367>0x1?void 0x0:_0x2cc367?_0xe45a03(_0x5a3e1d,_0x4037e7):_0x5a3e1d,_0x10c5f4=_0x4925c5['length']-0x1,_0x4c2485;_0x10c5f4>=0x0;_0x10c5f4--)(_0x4c2485=_0x4925c5[_0x10c5f4])&&(_0x167065=_0x4c2485(_0x167065)||_0x167065);return _0x167065;},_0x2b496c=(_0x540410,_0x159e82)=>(_0x3eeb30,_0x30746b)=>_0x159e82(_0x3eeb30,_0x30746b,_0x540410);let _0xee36ac=class extends _0x4ff2e3[_0x5c1b77(0x1e6)]{constructor(_0x43377c,_0x16739b,_0x57d749,_0x4b9c7b){const _0x2a1d53=_0x5c1b77;super(),this['_commentService']=_0x43377c,this[_0x2a1d53(0x236)]=_0x16739b,this['_userService']=_0x57d749,this[_0x2a1d53(0x231)]=_0x4b9c7b,this[_0x2a1d53(0x1fd)](),this[_0x2a1d53(0x200)]();}[_0x5c1b77(0x200)](){const _0x52f8f8=_0x5c1b77;this['disposeWithMe'](this[_0x52f8f8(0x236)][_0x52f8f8(0x220)][_0x52f8f8(0x228)](_0x503832[_0x52f8f8(0x1dd)](0x10))[_0x52f8f8(0x226)](_0x46a7b6=>{const _0x51a7df=_0x52f8f8,_0x2e4a07=new Set();_0x46a7b6[_0x51a7df(0x1b1)](_0x2bfde3=>{const _0x2aa547=_0x51a7df;switch(_0x2bfde3['type']){case _0x2aa547(0x207):{const _0x226a95=_0x2bfde3['payload'][_0x2aa547(0x1ba)];_0x2e4a07[_0x2aa547(0x207)](_0x226a95);break;}}}),_0x456c83(this[_0x51a7df(0x231)],_0x2e4a07);}));}[_0x5c1b77(0x1fd)](){const _0x5290e6=_0x5c1b77;this[_0x5290e6(0x1f6)](this[_0x5290e6(0x1ce)][_0x5290e6(0x220)][_0x5290e6(0x226)](async _0x41a784=>{const _0x5e350f=_0x5290e6;var _0x4844c7,_0x2c6c08,_0x275633,_0x58fbba;const _0x550c1d=(_0x4844c7=this[_0x5e350f(0x236)]['getUnit'](_0x41a784[_0x5e350f(0x1de)])[_0x5e350f(0x222)](_0x872b9b=>_0x872b9b[_0x5e350f(0x1c4)]===_0x41a784[_0x5e350f(0x1c4)]))==null?void 0x0:_0x4844c7[_0x5e350f(0x1d3)];if(!_0x550c1d)return;const {unitId:_0x15e317,subUnitId:_0x14adb3}=_0x550c1d;switch(_0x41a784['user']&&this[_0x5e350f(0x1c2)]['addUser'](_0x41a784[_0x5e350f(0x1ef)]),_0x41a784[_0x5e350f(0x215)]){case _0x5a32bb['Add']:break;case _0x5a32bb[_0x5e350f(0x235)]:{this[_0x5e350f(0x236)][_0x5e350f(0x21f)](_0x15e317,_0x14adb3,{'unitId':_0x15e317,'subUnitId':_0x14adb3,'ref':'','id':_0x41a784[_0x5e350f(0x1db)],'dT':_0xb80f4(+_0x41a784[_0x5e350f(0x219)]),'threadId':_0x41a784['threadId'],'personId':(_0x275633=(_0x2c6c08=_0x41a784[_0x5e350f(0x1ef)])==null?void 0x0:_0x2c6c08[_0x5e350f(0x1f1)])!=null?_0x275633:_0x41a784[_0x5e350f(0x20f)],'text':JSON[_0x5e350f(0x1f9)](_0x41a784['content']),'parentId':_0x550c1d['id']});break;}case _0x5a32bb[_0x5e350f(0x20d)]:{const _0x34ad47=this[_0x5e350f(0x236)]['getComment'](_0x15e317,_0x14adb3,_0x41a784[_0x5e350f(0x1db)]);_0x34ad47&&_0x34ad47[_0x5e350f(0x1e7)]&&this['_threadCommentModel'][_0x5e350f(0x1f8)](_0x15e317,_0x14adb3,_0x41a784[_0x5e350f(0x1db)]);break;}case _0x5a32bb['Edit']:{this[_0x5e350f(0x236)][_0x5e350f(0x210)](_0x15e317,_0x14adb3,{'commentId':_0x41a784['replyId'],'text':JSON[_0x5e350f(0x1f9)](_0x41a784[_0x5e350f(0x1da)])});break;}case _0x5a32bb[_0x5e350f(0x1e2)]:{const _0x25cc15=(_0x58fbba=this[_0x5e350f(0x236)][_0x5e350f(0x20e)](_0x41a784[_0x5e350f(0x1de)])[_0x5e350f(0x222)](_0x328aa6=>_0x328aa6[_0x5e350f(0x1c4)]===_0x41a784['threadId']))==null?void 0x0:_0x58fbba[_0x5e350f(0x1d3)];_0x25cc15&&this[_0x5e350f(0x236)][_0x5e350f(0x218)](_0x15e317,_0x14adb3,_0x25cc15['id'],_0x41a784[_0x5e350f(0x216)]===_0xb5ace3[_0x5e350f(0x1c3)]);break;}}}));}};_0xee36ac=_0x3eadd6([_0x2b496c(0x0,_0x4ff2e3[_0x5c1b77(0x1fa)](_0x47eae7['CommentService'])),_0x2b496c(0x1,_0x4ff2e3[_0x5c1b77(0x1fa)](_0xc6ab35[_0x5c1b77(0x1eb)])),_0x2b496c(0x2,_0x4ff2e3[_0x5c1b77(0x1fa)](_0x4ff2e3[_0x5c1b77(0x1c6)])),_0x2b496c(0x3,_0x4ff2e3['Inject'](_0x4ff2e3['Injector']))],_0xee36ac);const _0x43ec37='thread-comment-data-source.config',_0x3390ad={};var _0x58780a=Object['getOwnPropertyDescriptor'],_0xa5c71b=(_0x2917db,_0xb2b8ab,_0x288bd8,_0x10e44f)=>{const _0x126d43=_0x5c1b77;for(var _0x42559c=_0x10e44f>0x1?void 0x0:_0x10e44f?_0x58780a(_0xb2b8ab,_0x288bd8):_0xb2b8ab,_0x2c39b5=_0x2917db[_0x126d43(0x21b)]-0x1,_0x1c55a9;_0x2c39b5>=0x0;_0x2c39b5--)(_0x1c55a9=_0x2917db[_0x2c39b5])&&(_0x42559c=_0x1c55a9(_0x42559c)||_0x42559c);return _0x42559c;},_0x286d5e=(_0x59e261,_0x119dea)=>(_0x157919,_0x39f1c5)=>_0x119dea(_0x157919,_0x39f1c5,_0x59e261);function _0x4a9485(_0x3c48a9,_0x5b05a8){const _0x10a62d=_0x5c1b77,_0x1d4aa1=_0x3c48a9[_0x10a62d(0x1b3)][0x0];return{..._0x5b05a8,'id':_0x1d4aa1['replyId'],'resolved':_0x3c48a9['solved']===0x1,'dT':_0xb80f4(_0x1d4aa1[_0x10a62d(0x219)]),'personId':_0x1d4aa1[_0x10a62d(0x20f)],'threadId':_0x1d4aa1[_0x10a62d(0x1c4)]};}function _0x96fd86(_0x42b9d3,_0x554b28,_0x1cb948){const _0xa3520c=_0x5c1b77;var _0x1c7a8b,_0x1d9268;if(((_0x1d9268=(_0x1c7a8b=_0x42b9d3==null?void 0x0:_0x42b9d3['replies'])==null?void 0x0:_0x1c7a8b[_0xa3520c(0x21b)])!=null?_0x1d9268:0x0)>0x0){const _0x593a38=(_0x51afda,_0x45fb1e)=>({'id':_0x51afda[_0xa3520c(0x1db)],'threadId':_0x51afda['threadId'],'dT':_0xb80f4(_0x51afda[_0xa3520c(0x219)]),'personId':_0x51afda[_0xa3520c(0x20f)],'resolved':_0x42b9d3[_0xa3520c(0x216)]===_0xb5ace3[_0xa3520c(0x1c3)],'unitId':_0x554b28,'subUnitId':_0x1cb948,'text':JSON[_0xa3520c(0x1f9)](_0x51afda[_0xa3520c(0x1da)]),'parentId':_0x45fb1e}),_0x4bffd1=_0x593a38(_0x42b9d3[_0xa3520c(0x1b3)][0x0]);return{..._0x4bffd1,'children':_0x42b9d3['replies'][_0xa3520c(0x20c)](0x1)[_0xa3520c(0x22e)](_0x29110d=>_0x593a38(_0x29110d,_0x4bffd1['id']))};}return null;}let _0x21d670=class{constructor(_0x4e20e9,_0xa063c2,_0x2071dc,_0x30bb61){const _0x233688=_0x5c1b77;this['_httpService']=_0x4e20e9,this[_0x233688(0x1c2)]=_0xa063c2,this['_sessionService']=_0x2071dc,this[_0x233688(0x231)]=_0x30bb61;}async['addComment'](_0x4db8da){const _0x3f8429=_0x5c1b77;var _0x529f35,_0x37f49d;const {parentId:_0x193ac0,unitId:_0x42cd6b,text:_0x2b9806,threadId:_0x596ae3}=_0x4db8da,_0x4d8aab=(_0x37f49d=(_0x529f35=_0x2b9806['customRanges'])==null?void 0x0:_0x529f35[_0x3f8429(0x203)](_0x556d92=>_0x556d92[_0x3f8429(0x1b8)]===_0x4ff2e3[_0x3f8429(0x1dc)][_0x3f8429(0x205)])['map'](_0x2e49f6=>_0x2e49f6[_0x3f8429(0x209)]))!=null?_0x37f49d:[],_0x3fe49c=JSON[_0x3f8429(0x212)](_0x2b9806),_0x5aa9d1=(await this['_sessionService'][_0x3f8429(0x224)](_0x42cd6b))[_0x3f8429(0x1f5)]();if(_0x193ac0){const _0x377b00={'memberId':_0x5aa9d1,'unitId':_0x42cd6b,'content':_0x3fe49c,'mention':_0x4d8aab,'threadId':_0x596ae3},_0x347f91=(await this['_httpService'][_0x3f8429(0x1e8)](_0x3f8429(0x1f4)+_0x42cd6b+_0x3f8429(0x1ca),{'body':_0x377b00}))[_0x3f8429(0x1fe)][_0x3f8429(0x1b5)];return{..._0x4db8da,'id':_0x347f91['replyId'],'dT':_0x4ff2e3[_0x3f8429(0x1c1)](+_0x347f91[_0x3f8429(0x219)])[_0x3f8429(0x238)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x347f91['userId']};}else{const _0x161c6a={'memberId':_0x5aa9d1,'unitId':_0x42cd6b,'content':_0x3fe49c,'mention':_0x4d8aab},_0xcd1c02=await this['_httpService']['post'](_0x3f8429(0x1f4)+_0x42cd6b+_0x3f8429(0x1ee),{'body':_0x161c6a});return _0x4a9485(_0xcd1c02['body'][_0x3f8429(0x217)],_0x4db8da);}}async[_0x5c1b77(0x210)](_0x2373f2){const _0x250cd4=_0x5c1b77;var _0x24c8b5,_0x20afef;const {text:_0x5a27b5,unitId:_0x2a9a5f}=_0x2373f2,_0x238f04=(_0x20afef=(_0x24c8b5=_0x5a27b5[_0x250cd4(0x229)])==null?void 0x0:_0x24c8b5[_0x250cd4(0x203)](_0xe6f8a2=>_0xe6f8a2['rangeType']===_0x4ff2e3['CustomRangeType'][_0x250cd4(0x205)])[_0x250cd4(0x22e)](_0x5f2663=>_0x5f2663[_0x250cd4(0x209)]))!=null?_0x20afef:[],_0x1e81f5=JSON[_0x250cd4(0x212)](_0x5a27b5),_0x199a03=_0x2373f2[_0x250cd4(0x1c4)],_0x1f22e2=_0x2373f2['id'],_0x4e10a1={'memberId':(await this[_0x250cd4(0x204)]['requireSession'](_0x2a9a5f))['getMemberID'](),'unitId':_0x2a9a5f,'threadId':_0x199a03,'mention':_0x238f04,'content':_0x1e81f5,'replyId':_0x1f22e2},_0x1f0bee=await this[_0x250cd4(0x1b4)][_0x250cd4(0x1e8)]('/universer-api/comment/unit/'+_0x2a9a5f+'/edit',{'body':_0x4e10a1});return!_0x1f0bee[_0x250cd4(0x1fe)]['error']||_0x1f0bee[_0x250cd4(0x1fe)]['error'][_0x250cd4(0x208)]===0x1;}async[_0x5c1b77(0x218)](_0x3a61f0){const _0x9b0162=_0x5c1b77,{unitId:_0x4e89a3}=_0x3a61f0,_0x4cb8ff=_0x3a61f0[_0x9b0162(0x1c4)],_0xf81e02={'memberId':this['_userService'][_0x9b0162(0x1b2)]()['userID'],'unitId':_0x4e89a3,'threadId':_0x4cb8ff,'solved':_0x3a61f0[_0x9b0162(0x1d6)]?_0xb5ace3['Solved']:_0xb5ace3[_0x9b0162(0x221)]},_0x5f2d1a=await this['_httpService'][_0x9b0162(0x1e8)](_0x9b0162(0x1f4)+_0x4e89a3+_0x9b0162(0x1f0),{'body':_0xf81e02});return!_0x5f2d1a[_0x9b0162(0x1fe)]['error']||_0x5f2d1a['body'][_0x9b0162(0x1c5)][_0x9b0162(0x208)]===0x1;}async[_0x5c1b77(0x1f8)](_0x409025,_0x2ee334,_0x34b42a,_0x2e18cc){const _0x366c33=_0x5c1b77,_0x50d32b={'memberId':(await this[_0x366c33(0x204)][_0x366c33(0x224)](_0x409025))[_0x366c33(0x1f5)](),'threadId':_0x34b42a,'replyId':_0x2e18cc,'unitId':_0x409025},_0x51eed6=await this['_httpService']['post'](_0x366c33(0x1f4)+_0x409025+'/delete',{'body':_0x50d32b});return!_0x51eed6['body'][_0x366c33(0x1c5)]||_0x51eed6[_0x366c33(0x1fe)][_0x366c33(0x1c5)][_0x366c33(0x208)]===0x1;}async[_0x5c1b77(0x202)](_0x92850c,_0x3a1539,_0x334619){const _0x472011=_0x5c1b77,_0x2aba58={'unitId':_0x92850c,'threadId':_0x334619},_0x5864d0=await this[_0x472011(0x1b4)][_0x472011(0x1e8)](_0x472011(0x1f4)+_0x92850c+_0x472011(0x211),{'body':_0x2aba58}),_0x8a6ab1=_0x334619[_0x472011(0x22e)](_0x37e957=>_0x96fd86(_0x5864d0[_0x472011(0x1fe)][_0x472011(0x23b)][_0x37e957],_0x92850c,_0x3a1539))['filter'](Boolean);return Object['values'](_0x5864d0[_0x472011(0x1fe)][_0x472011(0x1be)])['forEach'](_0x4c250f=>{const _0x57b93c=_0x472011;this[_0x57b93c(0x1c2)][_0x57b93c(0x1d5)](_0x4c250f);}),_0x8a6ab1;}['saveCommentToSnapshot'](_0x361706){const _0x1d1fa8=_0x5c1b77;return{'id':_0x361706['id'],'threadId':_0x361706[_0x1d1fa8(0x1c4)],'ref':_0x361706[_0x1d1fa8(0x21c)]};}};_0x21d670=_0xa5c71b([_0x286d5e(0x0,_0x4ff2e3[_0x5c1b77(0x1fa)](_0x574a01[_0x5c1b77(0x1e3)])),_0x286d5e(0x1,_0x4ff2e3[_0x5c1b77(0x1fa)](_0x4ff2e3[_0x5c1b77(0x1c6)])),_0x286d5e(0x2,_0x4ff2e3['Inject'](_0x47eae7[_0x5c1b77(0x1bd)])),_0x286d5e(0x3,_0x4ff2e3[_0x5c1b77(0x1fa)](_0x4ff2e3[_0x5c1b77(0x1e9)]))],_0x21d670);var _0x115e3e=Object[_0x5c1b77(0x213)],_0x5e28c7=(_0xf7a04b,_0x53bef2,_0x2396ff,_0x4b5f7e)=>{const _0x5a82e4=_0x5c1b77;for(var _0x3c27ad=_0x4b5f7e>0x1?void 0x0:_0x4b5f7e?_0x115e3e(_0x53bef2,_0x2396ff):_0x53bef2,_0x8238f3=_0xf7a04b[_0x5a82e4(0x21b)]-0x1,_0x319669;_0x8238f3>=0x0;_0x8238f3--)(_0x319669=_0xf7a04b[_0x8238f3])&&(_0x3c27ad=_0x319669(_0x3c27ad)||_0x3c27ad);return _0x3c27ad;},_0x224a16=(_0x1496f3,_0x1122ff)=>(_0x28bda8,_0x32ee11)=>_0x1122ff(_0x28bda8,_0x32ee11,_0x1496f3);let _0x5cf0e6=class extends _0x4ff2e3[_0x5c1b77(0x1e6)]{constructor(_0x2a90c7,_0x7818ac){const _0x21cdb4=_0x5c1b77;super(),this[_0x21cdb4(0x1c9)]=_0x2a90c7,this[_0x21cdb4(0x1ed)]=_0x7818ac,this['_initDataSource']();}[_0x5c1b77(0x233)](){const _0x37ccba=_0x5c1b77;this[_0x37ccba(0x1c9)][_0x37ccba(0x214)]=this[_0x37ccba(0x1ed)],this[_0x37ccba(0x1c9)][_0x37ccba(0x1bf)]=!0x1;}};_0x5cf0e6=_0x5e28c7([_0x224a16(0x0,_0xc6ab35[_0x5c1b77(0x1e0)]),_0x224a16(0x1,_0x4ff2e3[_0x5c1b77(0x1fa)](_0x21d670))],_0x5cf0e6);var _0x2ddc3d=Object[_0x5c1b77(0x1bc)],_0x5d8e4d=Object[_0x5c1b77(0x213)],_0x4495f2=(_0x3a6b39,_0x5870b3,_0x325164)=>_0x5870b3 in _0x3a6b39?_0x2ddc3d(_0x3a6b39,_0x5870b3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x325164}):_0x3a6b39[_0x5870b3]=_0x325164,_0x471317=(_0x3c6b3d,_0x5027ed,_0x1a1765,_0x5e18f8)=>{const _0x5ef386=_0x5c1b77;for(var _0x31870b=_0x5e18f8>0x1?void 0x0:_0x5e18f8?_0x5d8e4d(_0x5027ed,_0x1a1765):_0x5027ed,_0x28fa0e=_0x3c6b3d[_0x5ef386(0x21b)]-0x1,_0x58ae0e;_0x28fa0e>=0x0;_0x28fa0e--)(_0x58ae0e=_0x3c6b3d[_0x28fa0e])&&(_0x31870b=_0x58ae0e(_0x31870b)||_0x31870b);return _0x31870b;},_0x5d4695=(_0x146dde,_0x3d5e8d)=>(_0x1c1ede,_0x231da3)=>_0x3d5e8d(_0x1c1ede,_0x231da3,_0x146dde),_0x3c77bd=(_0x1dbcb8,_0x5a1b09,_0x3a2151)=>_0x4495f2(_0x1dbcb8,typeof _0x5a1b09!=_0x5c1b77(0x1fc)?_0x5a1b09+'':_0x5a1b09,_0x3a2151);_0x2a8590[_0x5c1b77(0x1ff)]=class extends _0x4ff2e3[_0x5c1b77(0x227)]{constructor(_0x4d533c=_0x3390ad,_0x98693d,_0x46b1ee){const _0x563191=_0x5c1b77;super(),this[_0x563191(0x1cd)]=_0x4d533c,this[_0x563191(0x231)]=_0x98693d,this[_0x563191(0x1ea)]=_0x46b1ee;const {..._0x34f53e}=_0x4ff2e3['merge']({},_0x3390ad,this[_0x563191(0x1cd)]);this[_0x563191(0x1ea)]['setConfig'](_0x43ec37,_0x34f53e);}[_0x5c1b77(0x1e1)](){const _0x5266d4=_0x5c1b77;[[_0x21d670],[_0x5cf0e6],[_0xee36ac]][_0x5266d4(0x1b1)](_0x1018fd=>{const _0x595d6c=_0x5266d4;this['_injector'][_0x595d6c(0x207)](_0x1018fd);});}[_0x5c1b77(0x1fb)](){const _0x5cf1c9=_0x5c1b77;this['_injector'][_0x5cf1c9(0x1ec)](_0x5cf0e6),this[_0x5cf1c9(0x231)][_0x5cf1c9(0x1ec)](_0xee36ac);}},_0x3c77bd(_0x2a8590['UniverThreadCommentDataSourcePlugin'],_0x5c1b77(0x1f7),_0xe30060),_0x3c77bd(_0x2a8590[_0x5c1b77(0x1ff)],_0x5c1b77(0x215),_0x4ff2e3[_0x5c1b77(0x225)][_0x5c1b77(0x23a)]),_0x2a8590[_0x5c1b77(0x1ff)]=_0x471317([_0x4ff2e3[_0x5c1b77(0x22f)](_0x5f01b1[_0x5c1b77(0x20a)],_0x47eae7[_0x5c1b77(0x1c7)],_0x514dac[_0x5c1b77(0x239)]),_0x5d4695(0x1,_0x4ff2e3[_0x5c1b77(0x1fa)](_0x4ff2e3[_0x5c1b77(0x1e9)])),_0x5d4695(0x2,_0x4ff2e3[_0x5c1b77(0x1d2)])],_0x2a8590[_0x5c1b77(0x1ff)]),Object[_0x5c1b77(0x1bc)](_0x2a8590,Symbol[_0x5c1b77(0x1b9)],{'value':_0x5c1b77(0x22a)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2-nightly.202503031606",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs
|
|
52
|
-
"@univerjs/thread-comment": "0.6.
|
|
53
|
-
"@univerjs/thread-comment-ui": "0.6.
|
|
48
|
+
"@univerjs-pro/license": "0.6.2-nightly.202503031606",
|
|
49
|
+
"@univerjs-pro/collaboration-client": "0.6.2-nightly.202503031606",
|
|
50
|
+
"@univerjs/core": "0.6.2-nightly.202503031606",
|
|
51
|
+
"@univerjs/network": "0.6.2-nightly.202503031606",
|
|
52
|
+
"@univerjs/thread-comment": "0.6.2-nightly.202503031606",
|
|
53
|
+
"@univerjs/thread-comment-ui": "0.6.2-nightly.202503031606",
|
|
54
54
|
"@univerjs/protocol": "0.1.44-alpha.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "^7.8.1",
|
|
58
|
-
"typescript": "^5.
|
|
59
|
-
"vite": "^6.
|
|
60
|
-
"vitest": "^3.0.
|
|
61
|
-
"@univerjs-infra/shared": "0.6.
|
|
58
|
+
"typescript": "^5.8.2",
|
|
59
|
+
"vite": "^6.2.0",
|
|
60
|
+
"vitest": "^3.0.7",
|
|
61
|
+
"@univerjs-infra/shared": "0.6.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|