@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506031608 → 0.8.0-nightly.202506051607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x3eec7a=_0x2670;(function(_0x2554a9,_0x3df4bd){const _0x3f4ca0=_0x2670,_0x43df14=_0x2554a9();while(!![]){try{const _0x179cea=-parseInt(_0x3f4ca0(0xe3))/0x1+parseInt(_0x3f4ca0(0xd9))/0x2*(-parseInt(_0x3f4ca0(0xc2))/0x3)+-parseInt(_0x3f4ca0(0xe2))/0x4*(-parseInt(_0x3f4ca0(0xb8))/0x5)+-parseInt(_0x3f4ca0(0xd7))/0x6+parseInt(_0x3f4ca0(0xe0))/0x7*(-parseInt(_0x3f4ca0(0xea))/0x8)+parseInt(_0x3f4ca0(0x11a))/0x9+parseInt(_0x3f4ca0(0xce))/0xa;if(_0x179cea===_0x3df4bd)break;else _0x43df14['push'](_0x43df14['shift']());}catch(_0x5f23bf){_0x43df14['push'](_0x43df14['shift']());}}}(_0x322b,0xc382e));function _0x2670(_0x5870b0,_0x4dedb6){const _0x322b46=_0x322b();return _0x2670=function(_0x26707f,_0xfd4d1e){_0x26707f=_0x26707f-0xb3;let _0x467165=_0x322b46[_0x26707f];return _0x467165;},_0x2670(_0x5870b0,_0x4dedb6);}Object[_0x3eec7a(0xd3)](exports,Symbol['toStringTag'],{'value':_0x3eec7a(0xff)});const b=require(_0x3eec7a(0xdb)),T=require(_0x3eec7a(0xfa)),c=require(_0x3eec7a(0xcb)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require(_0x3eec7a(0x104)),P=require(_0x3eec7a(0x100)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x20303a=>(_0x20303a[_0x20303a['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x20303a[_0x20303a[_0x3eec7a(0xf5)]=0x1]='Solved',_0x20303a[_0x20303a['UNRECOGNIZED']=-0x1]=_0x3eec7a(0xd8),_0x20303a))(I||{}),v=(_0x540752=>(_0x540752[_0x540752[_0x3eec7a(0xca)]=0x0]='Unknown',_0x540752[_0x540752[_0x3eec7a(0x127)]=0x1]=_0x3eec7a(0x127),_0x540752[_0x540752[_0x3eec7a(0xd1)]=0x2]='Reply',_0x540752[_0x540752['Edit']=0x3]=_0x3eec7a(0x115),_0x540752[_0x540752[_0x3eec7a(0xf9)]=0x4]=_0x3eec7a(0xf9),_0x540752[_0x540752[_0x3eec7a(0x120)]=0x5]=_0x3eec7a(0x120),_0x540752[_0x540752[_0x3eec7a(0xd8)]=-0x1]=_0x3eec7a(0xd8),_0x540752))(v||{});const f=_0x1a5102=>c[_0x3eec7a(0x110)](new Date(+_0x1a5102))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x4dced7,_0x514335)=>{const _0x352c5b=_0x3eec7a,_0x42e975=_0x4dced7[_0x352c5b(0xbd)](c[_0x352c5b(0xe6)]),_0x45a9cd=_0x4dced7[_0x352c5b(0xbd)](P['HTTPService']);_0x514335[_0x352c5b(0xba)](_0x183689=>{const _0x3abb0f=_0x352c5b;_0x42e975[_0x3abb0f(0x112)](_0x183689)&&_0x514335[_0x3abb0f(0xe4)](_0x183689);}),_0x514335['size']&&(await _0x45a9cd['get'](_0x352c5b(0xf0),{'params':{'userIDs':[..._0x514335]}}))[_0x352c5b(0xf1)][_0x352c5b(0x105)][_0x352c5b(0xba)](_0x3f9f38=>{const _0x45b637=_0x352c5b;_0x3f9f38&&_0x42e975[_0x45b637(0x117)](_0x3f9f38);});};var $=Object[_0x3eec7a(0xe9)],E=(_0x25d1fe,_0x483d5c,_0x662f9,_0x343a3b)=>{const _0x530171=_0x3eec7a;for(var _0x1f32c9=_0x343a3b>0x1?void 0x0:_0x343a3b?$(_0x483d5c,_0x662f9):_0x483d5c,_0x3044d9=_0x25d1fe[_0x530171(0x122)]-0x1,_0x5d1423;_0x3044d9>=0x0;_0x3044d9--)(_0x5d1423=_0x25d1fe[_0x3044d9])&&(_0x1f32c9=_0x5d1423(_0x1f32c9)||_0x1f32c9);return _0x1f32c9;},S=(_0x1885a6,_0x42dae6)=>(_0x1a9e84,_0x41e8e0)=>_0x42dae6(_0x1a9e84,_0x41e8e0,_0x1885a6);let p=class extends c[_0x3eec7a(0x106)]{constructor(_0x3096f3,_0x3faf44,_0x457f53,_0x2cb59a){const _0x38a1b2=_0x3eec7a;super(),this['_commentService']=_0x3096f3,this[_0x38a1b2(0xe8)]=_0x3faf44,this[_0x38a1b2(0xc6)]=_0x457f53,this[_0x38a1b2(0x10f)]=_0x2cb59a,this[_0x38a1b2(0x109)](),this['_initUserSync']();}[_0x3eec7a(0x114)](){const _0x4249f6=_0x3eec7a;this[_0x4249f6(0x123)](this[_0x4249f6(0xe8)][_0x4249f6(0x102)]['pipe'](w[_0x4249f6(0xde)](0x10))[_0x4249f6(0xfe)](_0x3e27fb=>{const _0x3bc98e=_0x4249f6,_0x3745f5=new Set();_0x3e27fb[_0x3bc98e(0xba)](_0x42413f=>{const _0x2e8aa9=_0x3bc98e;switch(_0x42413f[_0x2e8aa9(0x12d)]){case _0x2e8aa9(0xd5):{const _0x4cbf6f=_0x42413f['payload']['personId'];_0x3745f5['add'](_0x4cbf6f);break;}}}),R(this['_injector'],_0x3745f5);}));}[_0x3eec7a(0x109)](){const _0x367ef3=_0x3eec7a;this[_0x367ef3(0x123)](this[_0x367ef3(0xed)][_0x367ef3(0x102)][_0x367ef3(0xfe)](async _0x5548db=>{const _0x5b87e5=_0x367ef3;var _0x2c92e9,_0x54d865,_0x2cc99d,_0x29e520;const _0xcfc334=(_0x2c92e9=this[_0x5b87e5(0xe8)][_0x5b87e5(0xbc)](_0x5548db[_0x5b87e5(0x10d)])['find'](_0x32ffa1=>_0x32ffa1[_0x5b87e5(0x118)]===_0x5548db['threadId']))==null?void 0x0:_0x2c92e9[_0x5b87e5(0x12a)];if(!_0xcfc334)return;const {unitId:_0x33fe80,subUnitId:_0x49a5b6}=_0xcfc334;switch(_0x5548db[_0x5b87e5(0x11f)]&&this[_0x5b87e5(0xc6)][_0x5b87e5(0x117)](_0x5548db[_0x5b87e5(0x11f)]),_0x5548db[_0x5b87e5(0x12d)]){case v[_0x5b87e5(0x127)]:break;case v[_0x5b87e5(0xd1)]:{this['_threadCommentModel'][_0x5b87e5(0xef)](_0x33fe80,_0x49a5b6,{'unitId':_0x33fe80,'subUnitId':_0x49a5b6,'ref':'','id':_0x5548db['replyId'],'dT':f(+_0x5548db[_0x5b87e5(0xbf)]),'threadId':_0x5548db[_0x5b87e5(0x118)],'personId':(_0x2cc99d=(_0x54d865=_0x5548db[_0x5b87e5(0x11f)])==null?void 0x0:_0x54d865[_0x5b87e5(0x12b)])!=null?_0x2cc99d:_0x5548db['userId'],'text':JSON[_0x5b87e5(0xbe)](_0x5548db[_0x5b87e5(0xbb)]),'parentId':_0xcfc334['id']});break;}case v['Delete']:{const _0x5deac2=this[_0x5b87e5(0xe8)][_0x5b87e5(0xf3)](_0x33fe80,_0x49a5b6,_0x5548db[_0x5b87e5(0x124)]);_0x5deac2&&_0x5deac2[_0x5b87e5(0x126)]&&this[_0x5b87e5(0xe8)]['deleteComment'](_0x33fe80,_0x49a5b6,_0x5548db[_0x5b87e5(0x124)]);break;}case v[_0x5b87e5(0x115)]:{this[_0x5b87e5(0xe8)][_0x5b87e5(0xcd)](_0x33fe80,_0x49a5b6,{'commentId':_0x5548db[_0x5b87e5(0x124)],'text':JSON[_0x5b87e5(0xbe)](_0x5548db['content'])});break;}case v[_0x5b87e5(0x120)]:{const _0xb8ac8b=(_0x29e520=this[_0x5b87e5(0xe8)][_0x5b87e5(0xbc)](_0x5548db[_0x5b87e5(0x10d)])[_0x5b87e5(0xb4)](_0x1e046a=>_0x1e046a[_0x5b87e5(0x118)]===_0x5548db[_0x5b87e5(0x118)]))==null?void 0x0:_0x29e520['root'];_0xb8ac8b&&this[_0x5b87e5(0xe8)][_0x5b87e5(0xc7)](_0x33fe80,_0x49a5b6,_0xb8ac8b['id'],_0x5548db['solved']===I[_0x5b87e5(0xf5)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3eec7a(0xd4)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x3eec7a(0x119)](c['UserManagerService'])),S(0x3,c[_0x3eec7a(0x119)](c[_0x3eec7a(0x129)]))],p);const q=_0x3eec7a(0xf4),D={};function _0x322b(){const _0x47aff1=['COMMENT','updateComment','13657390cbhxll','map','onStarting','Reply','userId','defineProperty','CommentService','add','UniverThreadCommentUIPlugin','2326992RUCcZt','UNRECOGNIZED','6kNdJAq','requireSession','@univerjs-pro/collaboration-client','stringify','ref','bufferTime','/universer-api/comment/unit/','3946621JkUxTF','comments','5580604kwchdd','221082gIodxj','delete','IConfigService','UserManagerService','UniverCollaborationClientPlugin','_threadCommentModel','getOwnPropertyDescriptor','8HsGntO','IThreadCommentDataSourceService','getCurrentUser','_commentService','CollaborationSessionService','addComment','/universer-api/user/list','body','_httpService','getComment','thread-comment-data-source.config','Solved','/add','UNIVER_UNKNOWN','_threadCommentDataSourceService','Delete','@univerjs-pro/license','/edit','_sessionService','UniverThreadCommentDataSourcePlugin','subscribe','Module','@univerjs/network','solved','commentUpdate$','dataSource','rxjs','users','Disposable','post','UniverLicensePlugin','_init','error','_config','merge','unitId','getMemberID','_injector','dayjs','filter','getUser','customRanges','_initUserSync','Edit','reply','addUser','threadId','Inject','2296080iUHpQm','deleteComment','replies','_initDataSource','/list','user','Solve','_configService','length','disposeWithMe','replyId','YYYY/MM/DD\x20HH:mm','parentId','Add','rangeId','Injector','root','userID','rangeType','type','slice','_threadCommentDataSource','find','CustomRangeType','UniverInstanceType','/reply','5EnqUMV','setConfig','forEach','content','getUnit','get','parse','createTimestamp','saveCommentToSnapshot','code','1042479ToGqOL','HTTPService','format','OpenOrReOpen','_userService','resolveComment','pluginName','Plugin','Unknown','@univerjs/core'];_0x322b=function(){return _0x47aff1;};return _0x322b();}var A=Object[_0x3eec7a(0xe9)],x=(_0xb2ad9c,_0x219b9f,_0x34c487,_0x2df574)=>{const _0x5dabb2=_0x3eec7a;for(var _0xbe4127=_0x2df574>0x1?void 0x0:_0x2df574?A(_0x219b9f,_0x34c487):_0x219b9f,_0x46e808=_0xb2ad9c[_0x5dabb2(0x122)]-0x1,_0x3e6dc9;_0x46e808>=0x0;_0x46e808--)(_0x3e6dc9=_0xb2ad9c[_0x46e808])&&(_0xbe4127=_0x3e6dc9(_0xbe4127)||_0xbe4127);return _0xbe4127;},_=(_0x870a75,_0x4a34be)=>(_0x4bb84d,_0x2a532d)=>_0x4a34be(_0x4bb84d,_0x2a532d,_0x870a75);function Y(_0x7ef542,_0x2aff9d){const _0x28b102=_0x3eec7a,_0x5e9597=_0x7ef542['replies'][0x0];return{..._0x2aff9d,'id':_0x5e9597['replyId'],'resolved':_0x7ef542['solved']===0x1,'dT':f(_0x5e9597[_0x28b102(0xbf)]),'personId':_0x5e9597[_0x28b102(0xd2)],'threadId':_0x5e9597['threadId']};}function G(_0x5b8797,_0x1db650,_0x505810){const _0x547c96=_0x3eec7a;var _0x5d9a3c,_0x307131;if(((_0x307131=(_0x5d9a3c=_0x5b8797==null?void 0x0:_0x5b8797[_0x547c96(0x11c)])==null?void 0x0:_0x5d9a3c[_0x547c96(0x122)])!=null?_0x307131:0x0)>0x0){const _0x437ccf=(_0x40635f,_0x866ef6)=>({'id':_0x40635f[_0x547c96(0x124)],'threadId':_0x40635f['threadId'],'dT':f(_0x40635f['createTimestamp']),'personId':_0x40635f[_0x547c96(0xd2)],'resolved':_0x5b8797[_0x547c96(0x101)]===I['Solved'],'unitId':_0x1db650,'subUnitId':_0x505810,'text':JSON[_0x547c96(0xbe)](_0x40635f['content']),'parentId':_0x866ef6}),_0x2e13d1=_0x437ccf(_0x5b8797[_0x547c96(0x11c)][0x0]);return{..._0x2e13d1,'children':_0x5b8797[_0x547c96(0x11c)][_0x547c96(0x12e)](0x1)[_0x547c96(0xcf)](_0x565530=>_0x437ccf(_0x565530,_0x2e13d1['id']))};}return null;}let g=class{constructor(_0x29c485,_0x15b50c,_0x4bae94,_0x1feee2){const _0x1e325a=_0x3eec7a;this[_0x1e325a(0xf2)]=_0x29c485,this['_userService']=_0x15b50c,this[_0x1e325a(0xfc)]=_0x4bae94,this[_0x1e325a(0x10f)]=_0x1feee2;}async[_0x3eec7a(0xef)](_0x154e21){const _0x4cfa2d=_0x3eec7a;var _0x3f4349,_0xb713b0;const {parentId:_0x4c14c6,unitId:_0x5aeec3,text:_0x3dbe94,threadId:_0x34d71e}=_0x154e21,_0x4a78c9=(_0xb713b0=(_0x3f4349=_0x3dbe94[_0x4cfa2d(0x113)])==null?void 0x0:_0x3f4349[_0x4cfa2d(0x111)](_0xd91b7b=>_0xd91b7b[_0x4cfa2d(0x12c)]===c[_0x4cfa2d(0xb5)][_0x4cfa2d(0xcc)])['map'](_0x3535e8=>_0x3535e8[_0x4cfa2d(0x128)]))!=null?_0xb713b0:[],_0x4445a6=JSON['stringify'](_0x3dbe94),_0x460d2a=(await this[_0x4cfa2d(0xfc)]['requireSession'](_0x5aeec3))['getMemberID']();if(_0x4c14c6){const _0x273f6a={'memberId':_0x460d2a,'unitId':_0x5aeec3,'content':_0x4445a6,'mention':_0x4a78c9,'threadId':_0x34d71e},_0x29a76e=(await this['_httpService']['post'](_0x4cfa2d(0xdf)+_0x5aeec3+_0x4cfa2d(0xb7),{'body':_0x273f6a}))[_0x4cfa2d(0xf1)][_0x4cfa2d(0x116)];return{..._0x154e21,'id':_0x29a76e['replyId'],'dT':c[_0x4cfa2d(0x110)](+_0x29a76e[_0x4cfa2d(0xbf)])[_0x4cfa2d(0xc4)](_0x4cfa2d(0x125)),'personId':_0x29a76e[_0x4cfa2d(0xd2)]};}else{const _0x446dc1={'memberId':_0x460d2a,'unitId':_0x5aeec3,'content':_0x4445a6,'mention':_0x4a78c9},_0x5f42e4=await this[_0x4cfa2d(0xf2)][_0x4cfa2d(0x107)]('/universer-api/comment/unit/'+_0x5aeec3+_0x4cfa2d(0xf6),{'body':_0x446dc1});return Y(_0x5f42e4[_0x4cfa2d(0xf1)]['comment'],_0x154e21);}}async[_0x3eec7a(0xcd)](_0x35b2da){const _0x194f85=_0x3eec7a;var _0x505a11,_0x50beee;const {text:_0x9a5d14,unitId:_0x7684d5}=_0x35b2da,_0x3784a4=(_0x50beee=(_0x505a11=_0x9a5d14[_0x194f85(0x113)])==null?void 0x0:_0x505a11['filter'](_0x3e63cf=>_0x3e63cf['rangeType']===c[_0x194f85(0xb5)]['COMMENT'])[_0x194f85(0xcf)](_0x5660f7=>_0x5660f7[_0x194f85(0x128)]))!=null?_0x50beee:[],_0x3b9858=JSON[_0x194f85(0xdc)](_0x9a5d14),_0x17947d=_0x35b2da['threadId'],_0x328831=_0x35b2da['id'],_0xa923d0={'memberId':(await this[_0x194f85(0xfc)][_0x194f85(0xda)](_0x7684d5))[_0x194f85(0x10e)](),'unitId':_0x7684d5,'threadId':_0x17947d,'mention':_0x3784a4,'content':_0x3b9858,'replyId':_0x328831},_0x356db7=await this[_0x194f85(0xf2)][_0x194f85(0x107)](_0x194f85(0xdf)+_0x7684d5+_0x194f85(0xfb),{'body':_0xa923d0});return!_0x356db7[_0x194f85(0xf1)][_0x194f85(0x10a)]||_0x356db7['body']['error'][_0x194f85(0xc1)]===0x1;}async[_0x3eec7a(0xc7)](_0x4c0602){const _0x3400a7=_0x3eec7a,{unitId:_0x1188db}=_0x4c0602,_0x39d753=_0x4c0602['threadId'],_0x87e2e6={'memberId':this[_0x3400a7(0xc6)][_0x3400a7(0xec)]()[_0x3400a7(0x12b)],'unitId':_0x1188db,'threadId':_0x39d753,'solved':_0x4c0602['resolved']?I[_0x3400a7(0xf5)]:I[_0x3400a7(0xc5)]},_0x2db844=await this[_0x3400a7(0xf2)][_0x3400a7(0x107)](_0x3400a7(0xdf)+_0x1188db+'/solved',{'body':_0x87e2e6});return!_0x2db844[_0x3400a7(0xf1)][_0x3400a7(0x10a)]||_0x2db844['body'][_0x3400a7(0x10a)][_0x3400a7(0xc1)]===0x1;}async[_0x3eec7a(0x11b)](_0x52865b,_0x247fce,_0xab1a7c,_0x53baec){const _0x56a5ef=_0x3eec7a,_0x5f5d5b={'memberId':(await this[_0x56a5ef(0xfc)][_0x56a5ef(0xda)](_0x52865b))[_0x56a5ef(0x10e)](),'threadId':_0xab1a7c,'replyId':_0x53baec,'unitId':_0x52865b},_0x1f6c84=await this[_0x56a5ef(0xf2)][_0x56a5ef(0x107)](_0x56a5ef(0xdf)+_0x52865b+'/delete',{'body':_0x5f5d5b});return!_0x1f6c84[_0x56a5ef(0xf1)][_0x56a5ef(0x10a)]||_0x1f6c84[_0x56a5ef(0xf1)][_0x56a5ef(0x10a)][_0x56a5ef(0xc1)]===0x1;}async['listComments'](_0x5d0483,_0xfab2dd,_0x4febd1){const _0x3d247f=_0x3eec7a,_0x5e4a3b={'unitId':_0x5d0483,'threadId':_0x4febd1},_0x428c9f=await this[_0x3d247f(0xf2)][_0x3d247f(0x107)](_0x3d247f(0xdf)+_0x5d0483+_0x3d247f(0x11e),{'body':_0x5e4a3b}),_0x2ccb34=_0x4febd1['map'](_0x29d512=>G(_0x428c9f['body'][_0x3d247f(0xe1)][_0x29d512],_0x5d0483,_0xfab2dd))[_0x3d247f(0x111)](Boolean);return Object['values'](_0x428c9f[_0x3d247f(0xf1)][_0x3d247f(0x105)])[_0x3d247f(0xba)](_0x4ba197=>{const _0x1bd2aa=_0x3d247f;this[_0x1bd2aa(0xc6)][_0x1bd2aa(0x117)](_0x4ba197);}),_0x2ccb34;}[_0x3eec7a(0xc0)](_0x194ec7){const _0x3419c4=_0x3eec7a;return{'id':_0x194ec7['id'],'threadId':_0x194ec7['threadId'],'ref':_0x194ec7[_0x3419c4(0xdd)]};}};g=x([_(0x0,c['Inject'](P[_0x3eec7a(0xc3)])),_(0x1,c[_0x3eec7a(0x119)](c['UserManagerService'])),_(0x2,c[_0x3eec7a(0x119)](b[_0x3eec7a(0xee)])),_(0x3,c[_0x3eec7a(0x119)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x1c50de,_0x2251f4,_0x2bb659,_0x38470f)=>{const _0x305867=_0x3eec7a;for(var _0x3b2df1=_0x38470f>0x1?void 0x0:_0x38470f?H(_0x2251f4,_0x2bb659):_0x2251f4,_0x15c171=_0x1c50de[_0x305867(0x122)]-0x1,_0x368bbe;_0x15c171>=0x0;_0x15c171--)(_0x368bbe=_0x1c50de[_0x15c171])&&(_0x3b2df1=_0x368bbe(_0x3b2df1)||_0x3b2df1);return _0x3b2df1;},y=(_0x505716,_0x22a847)=>(_0x523bba,_0x4338cf)=>_0x22a847(_0x523bba,_0x4338cf,_0x505716);let C=class extends c['Disposable']{constructor(_0x2bd6fe,_0x22daaf){const _0xf57cf9=_0x3eec7a;super(),this['_threadCommentDataSourceService']=_0x2bd6fe,this[_0xf57cf9(0xb3)]=_0x22daaf,this[_0xf57cf9(0x11d)]();}['_initDataSource'](){const _0x5a442b=_0x3eec7a;this[_0x5a442b(0xf8)][_0x5a442b(0x103)]=this[_0x5a442b(0xb3)],this[_0x5a442b(0xf8)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x3eec7a(0xeb)]),y(0x1,c[_0x3eec7a(0x119)](g))],C);var F=Object[_0x3eec7a(0xd3)],L=Object[_0x3eec7a(0xe9)],Z=(_0x3cb6c3,_0x21ef48,_0x398433)=>_0x21ef48 in _0x3cb6c3?F(_0x3cb6c3,_0x21ef48,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x398433}):_0x3cb6c3[_0x21ef48]=_0x398433,W=(_0x363556,_0x833b6,_0x59c955,_0x1d94cd)=>{const _0x1928bd=_0x3eec7a;for(var _0x13fc6d=_0x1d94cd>0x1?void 0x0:_0x1d94cd?L(_0x833b6,_0x59c955):_0x833b6,_0x4e7d2b=_0x363556[_0x1928bd(0x122)]-0x1,_0x1d3643;_0x4e7d2b>=0x0;_0x4e7d2b--)(_0x1d3643=_0x363556[_0x4e7d2b])&&(_0x13fc6d=_0x1d3643(_0x13fc6d)||_0x13fc6d);return _0x13fc6d;},O=(_0x215c65,_0x13208c)=>(_0x4abdfe,_0x1634d5)=>_0x13208c(_0x4abdfe,_0x1634d5,_0x215c65),N=(_0x2a738e,_0xf3d7de,_0x13be81)=>Z(_0x2a738e,typeof _0xf3d7de!='symbol'?_0xf3d7de+'':_0xf3d7de,_0x13be81);exports[_0x3eec7a(0xfd)]=class extends c[_0x3eec7a(0xc9)]{constructor(_0x14ddf0=D,_0x327490,_0x22532f){const _0x42a7ee=_0x3eec7a;super(),this[_0x42a7ee(0x10b)]=_0x14ddf0,this[_0x42a7ee(0x10f)]=_0x327490,this[_0x42a7ee(0x121)]=_0x22532f;const {..._0x5eeb75}=c[_0x42a7ee(0x10c)]({},D,this[_0x42a7ee(0x10b)]);this[_0x42a7ee(0x121)][_0x42a7ee(0xb9)](q,_0x5eeb75);}[_0x3eec7a(0xd0)](){const _0x55283d=_0x3eec7a;[[g],[C],[p]][_0x55283d(0xba)](_0x5b1034=>{const _0x4af117=_0x55283d;this[_0x4af117(0x10f)][_0x4af117(0xd5)](_0x5b1034);});}['onReady'](){const _0x156dd4=_0x3eec7a;this['_injector'][_0x156dd4(0xbd)](C),this['_injector'][_0x156dd4(0xbd)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x3eec7a(0xc8),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3eec7a(0x12d),c[_0x3eec7a(0xb6)][_0x3eec7a(0xf7)]),exports[_0x3eec7a(0xfd)]=W([c['DependentOn'](j[_0x3eec7a(0xd6)],b[_0x3eec7a(0xe7)],T[_0x3eec7a(0x108)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x3eec7a(0xe5)])],exports[_0x3eec7a(0xfd)]);
|
|
1
|
+
'use strict';const _0x49bf79=_0x5489;(function(_0x6c18d3,_0x29b2e2){const _0x449b9d=_0x5489,_0x342e7e=_0x6c18d3();while(!![]){try{const _0x1dc4bf=-parseInt(_0x449b9d(0x15e))/0x1*(parseInt(_0x449b9d(0x1c1))/0x2)+parseInt(_0x449b9d(0x17c))/0x3*(-parseInt(_0x449b9d(0x1ab))/0x4)+parseInt(_0x449b9d(0x1ae))/0x5+-parseInt(_0x449b9d(0x16a))/0x6*(parseInt(_0x449b9d(0x187))/0x7)+-parseInt(_0x449b9d(0x19b))/0x8+-parseInt(_0x449b9d(0x174))/0x9+parseInt(_0x449b9d(0x182))/0xa*(parseInt(_0x449b9d(0x166))/0xb);if(_0x1dc4bf===_0x29b2e2)break;else _0x342e7e['push'](_0x342e7e['shift']());}catch(_0x5e6b5f){_0x342e7e['push'](_0x342e7e['shift']());}}}(_0xa642,0x7edf2));Object[_0x49bf79(0x167)](exports,Symbol[_0x49bf79(0x176)],{'value':_0x49bf79(0x15f)});const b=require(_0x49bf79(0x1a5)),T=require(_0x49bf79(0x1bd)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0x49bf79(0x18e)),w=require(_0x49bf79(0x1a8)),P=require('@univerjs/network'),U=_0x49bf79(0x1b0);var I=(_0x38e964=>(_0x38e964[_0x38e964['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x38e964[_0x38e964[_0x49bf79(0x19d)]=0x1]=_0x49bf79(0x19d),_0x38e964[_0x38e964['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x38e964))(I||{}),v=(_0xe4ba6=>(_0xe4ba6[_0xe4ba6['Unknown']=0x0]=_0x49bf79(0x1a7),_0xe4ba6[_0xe4ba6[_0x49bf79(0x158)]=0x1]=_0x49bf79(0x158),_0xe4ba6[_0xe4ba6['Reply']=0x2]=_0x49bf79(0x177),_0xe4ba6[_0xe4ba6[_0x49bf79(0x179)]=0x3]=_0x49bf79(0x179),_0xe4ba6[_0xe4ba6[_0x49bf79(0x19e)]=0x4]=_0x49bf79(0x19e),_0xe4ba6[_0xe4ba6[_0x49bf79(0x1d1)]=0x5]=_0x49bf79(0x1d1),_0xe4ba6[_0xe4ba6[_0x49bf79(0x184)]=-0x1]=_0x49bf79(0x184),_0xe4ba6))(v||{});const f=_0x4ed036=>c[_0x49bf79(0x1c9)](new Date(+_0x4ed036))[_0x49bf79(0x1c7)](_0x49bf79(0x178)),R=async(_0x4f5c5b,_0x5a88de)=>{const _0x572cff=_0x49bf79,_0x4edbd1=_0x4f5c5b[_0x572cff(0x175)](c['UserManagerService']),_0x10d2a3=_0x4f5c5b[_0x572cff(0x175)](P[_0x572cff(0x1bf)]);_0x5a88de['forEach'](_0x313809=>{const _0x48e5e8=_0x572cff;_0x4edbd1[_0x48e5e8(0x1a4)](_0x313809)&&_0x5a88de[_0x48e5e8(0x1a6)](_0x313809);}),_0x5a88de[_0x572cff(0x15b)]&&(await _0x10d2a3['get'](_0x572cff(0x18c),{'params':{'userIDs':[..._0x5a88de]}}))['body'][_0x572cff(0x1c2)][_0x572cff(0x19f)](_0x4c971a=>{const _0x2a93e3=_0x572cff;_0x4c971a&&_0x4edbd1[_0x2a93e3(0x1be)](_0x4c971a);});};var $=Object[_0x49bf79(0x1b8)],E=(_0x7a6f7a,_0x2d5116,_0x141701,_0x5d6f66)=>{for(var _0x4bf9b9=_0x5d6f66>0x1?void 0x0:_0x5d6f66?$(_0x2d5116,_0x141701):_0x2d5116,_0x25fddb=_0x7a6f7a['length']-0x1,_0x5aca6c;_0x25fddb>=0x0;_0x25fddb--)(_0x5aca6c=_0x7a6f7a[_0x25fddb])&&(_0x4bf9b9=_0x5aca6c(_0x4bf9b9)||_0x4bf9b9);return _0x4bf9b9;},S=(_0x2c38ee,_0x57a98e)=>(_0x49388c,_0x467204)=>_0x57a98e(_0x49388c,_0x467204,_0x2c38ee);let p=class extends c[_0x49bf79(0x15c)]{constructor(_0x324b42,_0xd93f0,_0x17e19c,_0x58698c){const _0x3d7b9b=_0x49bf79;super(),this[_0x3d7b9b(0x193)]=_0x324b42,this[_0x3d7b9b(0x1aa)]=_0xd93f0,this[_0x3d7b9b(0x1c4)]=_0x17e19c,this[_0x3d7b9b(0x15d)]=_0x58698c,this[_0x3d7b9b(0x1b3)](),this[_0x3d7b9b(0x188)]();}['_initUserSync'](){const _0x1c2782=_0x49bf79;this[_0x1c2782(0x17e)](this[_0x1c2782(0x1aa)][_0x1c2782(0x197)][_0x1c2782(0x1ba)](w[_0x1c2782(0x168)](0x10))[_0x1c2782(0x1ca)](_0x5e685a=>{const _0x28c71c=_0x1c2782,_0x3c5662=new Set();_0x5e685a['forEach'](_0x3b2651=>{const _0x2eee86=_0x5489;switch(_0x3b2651[_0x2eee86(0x1d0)]){case _0x2eee86(0x1a2):{const _0x148e02=_0x3b2651[_0x2eee86(0x1bc)][_0x2eee86(0x19c)];_0x3c5662[_0x2eee86(0x1a2)](_0x148e02);break;}}}),R(this[_0x28c71c(0x15d)],_0x3c5662);}));}[_0x49bf79(0x1b3)](){const _0x103b3c=_0x49bf79;this[_0x103b3c(0x17e)](this[_0x103b3c(0x193)]['commentUpdate$'][_0x103b3c(0x1ca)](async _0x38082b=>{const _0x2ca6c6=_0x103b3c;var _0x35e6cf,_0x37ce1d,_0x1ec242,_0x23aee1;const _0x11f7c2=(_0x35e6cf=this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1a1)](_0x38082b['unitId'])[_0x2ca6c6(0x163)](_0x4aa590=>_0x4aa590[_0x2ca6c6(0x153)]===_0x38082b[_0x2ca6c6(0x153)]))==null?void 0x0:_0x35e6cf[_0x2ca6c6(0x190)];if(!_0x11f7c2)return;const {unitId:_0x49a31f,subUnitId:_0x16ec4c}=_0x11f7c2;switch(_0x38082b[_0x2ca6c6(0x186)]&&this[_0x2ca6c6(0x1c4)][_0x2ca6c6(0x1be)](_0x38082b[_0x2ca6c6(0x186)]),_0x38082b[_0x2ca6c6(0x1d0)]){case v[_0x2ca6c6(0x158)]:break;case v[_0x2ca6c6(0x177)]:{this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1c8)](_0x49a31f,_0x16ec4c,{'unitId':_0x49a31f,'subUnitId':_0x16ec4c,'ref':'','id':_0x38082b['replyId'],'dT':f(+_0x38082b['createTimestamp']),'threadId':_0x38082b[_0x2ca6c6(0x153)],'personId':(_0x1ec242=(_0x37ce1d=_0x38082b['user'])==null?void 0x0:_0x37ce1d[_0x2ca6c6(0x196)])!=null?_0x1ec242:_0x38082b[_0x2ca6c6(0x1cf)],'text':JSON['parse'](_0x38082b['content']),'parentId':_0x11f7c2['id']});break;}case v['Delete']:{const _0x51d9b7=this[_0x2ca6c6(0x1aa)]['getComment'](_0x49a31f,_0x16ec4c,_0x38082b[_0x2ca6c6(0x1cc)]);_0x51d9b7&&_0x51d9b7[_0x2ca6c6(0x18f)]&&this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1b7)](_0x49a31f,_0x16ec4c,_0x38082b[_0x2ca6c6(0x1cc)]);break;}case v['Edit']:{this[_0x2ca6c6(0x1aa)]['updateComment'](_0x49a31f,_0x16ec4c,{'commentId':_0x38082b[_0x2ca6c6(0x1cc)],'text':JSON[_0x2ca6c6(0x152)](_0x38082b[_0x2ca6c6(0x1bb)])});break;}case v['Solve']:{const _0x21c236=(_0x23aee1=this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1a1)](_0x38082b[_0x2ca6c6(0x1ce)])['find'](_0x44d1d6=>_0x44d1d6[_0x2ca6c6(0x153)]===_0x38082b[_0x2ca6c6(0x153)]))==null?void 0x0:_0x23aee1[_0x2ca6c6(0x190)];_0x21c236&&this[_0x2ca6c6(0x1aa)]['resolveComment'](_0x49a31f,_0x16ec4c,_0x21c236['id'],_0x38082b[_0x2ca6c6(0x17b)]===I[_0x2ca6c6(0x19d)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x49bf79(0x156)])),S(0x1,c[_0x49bf79(0x171)](M[_0x49bf79(0x191)])),S(0x2,c['Inject'](c[_0x49bf79(0x1af)])),S(0x3,c['Inject'](c[_0x49bf79(0x16f)]))],p);function _0xa642(){const _0x3539db=['solved','2880534DgCNvE','body','disposeWithMe','setConfig','updateComment','listComments','35720340fpPZxv','createTimestamp','UNRECOGNIZED','/reply','user','91azMjdc','_initUserSync','map','UNIVER_UNKNOWN','/add','/universer-api/user/list','/edit','@univerjs/thread-comment','parentId','root','ThreadCommentModel','OpenOrReOpen','_commentService','code','filter','userID','commentUpdate$','getMemberID','merge','rangeType','7403256VeQTCU','personId','Solved','Delete','forEach','customRanges','getUnit','add','post','getUser','@univerjs-pro/collaboration-client','delete','Unknown','rxjs','Plugin','_threadCommentModel','4BafgKz','DependentOn','_config','1645445UuAGlH','UserManagerService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','replies','_init','saveCommentToSnapshot','_initDataSource','_httpService','deleteComment','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','pipe','content','payload','@univerjs-pro/license','addUser','HTTPService','resolveComment','2174ETQCgG','users','dataSource','_userService','thread-comment-data-source.config','COMMENT','format','addComment','dayjs','subscribe','requireSession','replyId','stringify','unitId','userId','type','Solve','comment','parse','threadId','/list','values','CommentService','_configService','Add','_threadCommentDataSourceService','comments','size','Disposable','_injector','11KrVmlt','Module','/solved','resolved','error','find','onStarting','/universer-api/comment/unit/','11PrtQlT','defineProperty','bufferTime','IConfigService','320964oCKYkG','CollaborationSessionService','length','_threadCommentDataSource','syncUpdateMutationToColla','Injector','_sessionService','Inject','rangeId','UniverThreadCommentDataSourcePlugin','7096437qBfpBa','get','toStringTag','Reply','YYYY/MM/DD\x20HH:mm','Edit','CustomRangeType'];_0xa642=function(){return _0x3539db;};return _0xa642();}const q=_0x49bf79(0x1c5),D={};var A=Object[_0x49bf79(0x1b8)],x=(_0x16c6db,_0x36ef4b,_0xd3ce05,_0x4c472d)=>{const _0x3be883=_0x49bf79;for(var _0x39b0ce=_0x4c472d>0x1?void 0x0:_0x4c472d?A(_0x36ef4b,_0xd3ce05):_0x36ef4b,_0x3d956e=_0x16c6db[_0x3be883(0x16c)]-0x1,_0x2acffe;_0x3d956e>=0x0;_0x3d956e--)(_0x2acffe=_0x16c6db[_0x3d956e])&&(_0x39b0ce=_0x2acffe(_0x39b0ce)||_0x39b0ce);return _0x39b0ce;},_=(_0x3b69ca,_0xbd5201)=>(_0x2af689,_0x22b10b)=>_0xbd5201(_0x2af689,_0x22b10b,_0x3b69ca);function Y(_0x23e02d,_0x3c343d){const _0x42047f=_0x49bf79,_0x595a74=_0x23e02d['replies'][0x0];return{..._0x3c343d,'id':_0x595a74[_0x42047f(0x1cc)],'resolved':_0x23e02d[_0x42047f(0x17b)]===0x1,'dT':f(_0x595a74[_0x42047f(0x183)]),'personId':_0x595a74[_0x42047f(0x1cf)],'threadId':_0x595a74[_0x42047f(0x153)]};}function _0x5489(_0x312ba7,_0x38f43a){const _0xa642c0=_0xa642();return _0x5489=function(_0x548909,_0x3aafe4){_0x548909=_0x548909-0x152;let _0x42cc36=_0xa642c0[_0x548909];return _0x42cc36;},_0x5489(_0x312ba7,_0x38f43a);}function G(_0x15ad7b,_0x4fbb54,_0x52a905){const _0xb143f3=_0x49bf79;var _0x2107a1,_0x37f167;if(((_0x37f167=(_0x2107a1=_0x15ad7b==null?void 0x0:_0x15ad7b[_0xb143f3(0x1b2)])==null?void 0x0:_0x2107a1[_0xb143f3(0x16c)])!=null?_0x37f167:0x0)>0x0){const _0x5ddac2=(_0x289d93,_0xdb74c9)=>({'id':_0x289d93['replyId'],'threadId':_0x289d93[_0xb143f3(0x153)],'dT':f(_0x289d93['createTimestamp']),'personId':_0x289d93[_0xb143f3(0x1cf)],'resolved':_0x15ad7b[_0xb143f3(0x17b)]===I[_0xb143f3(0x19d)],'unitId':_0x4fbb54,'subUnitId':_0x52a905,'text':JSON['parse'](_0x289d93[_0xb143f3(0x1bb)]),'parentId':_0xdb74c9}),_0x308f2d=_0x5ddac2(_0x15ad7b[_0xb143f3(0x1b2)][0x0]);return{..._0x308f2d,'children':_0x15ad7b[_0xb143f3(0x1b2)]['slice'](0x1)[_0xb143f3(0x189)](_0x5e7fee=>_0x5ddac2(_0x5e7fee,_0x308f2d['id']))};}return null;}let g=class{constructor(_0x17e694,_0x3f28d2,_0x41240c,_0x2489e8){const _0x48548b=_0x49bf79;this[_0x48548b(0x1b6)]=_0x17e694,this[_0x48548b(0x1c4)]=_0x3f28d2,this['_sessionService']=_0x41240c,this[_0x48548b(0x15d)]=_0x2489e8;}async[_0x49bf79(0x1c8)](_0x467af6){const _0x42bc4b=_0x49bf79;var _0x35c88d,_0xe90a92;const {parentId:_0x5ae672,unitId:_0x190e9d,text:_0x1be383,threadId:_0x2e8c7f}=_0x467af6,_0xfb6cc8=(_0xe90a92=(_0x35c88d=_0x1be383['customRanges'])==null?void 0x0:_0x35c88d[_0x42bc4b(0x195)](_0x5c2dc0=>_0x5c2dc0[_0x42bc4b(0x19a)]===c['CustomRangeType']['COMMENT'])['map'](_0x2a8146=>_0x2a8146[_0x42bc4b(0x172)]))!=null?_0xe90a92:[],_0x2b7689=JSON[_0x42bc4b(0x1cd)](_0x1be383),_0x5cfd29=(await this[_0x42bc4b(0x170)]['requireSession'](_0x190e9d))[_0x42bc4b(0x198)]();if(_0x5ae672){const _0x608079={'memberId':_0x5cfd29,'unitId':_0x190e9d,'content':_0x2b7689,'mention':_0xfb6cc8,'threadId':_0x2e8c7f},_0x2bb2ec=(await this[_0x42bc4b(0x1b6)][_0x42bc4b(0x1a3)]('/universer-api/comment/unit/'+_0x190e9d+_0x42bc4b(0x185),{'body':_0x608079}))[_0x42bc4b(0x17d)]['reply'];return{..._0x467af6,'id':_0x2bb2ec[_0x42bc4b(0x1cc)],'dT':c['dayjs'](+_0x2bb2ec[_0x42bc4b(0x183)])['format'](_0x42bc4b(0x178)),'personId':_0x2bb2ec[_0x42bc4b(0x1cf)]};}else{const _0x49339a={'memberId':_0x5cfd29,'unitId':_0x190e9d,'content':_0x2b7689,'mention':_0xfb6cc8},_0x4bb5a1=await this[_0x42bc4b(0x1b6)][_0x42bc4b(0x1a3)](_0x42bc4b(0x165)+_0x190e9d+_0x42bc4b(0x18b),{'body':_0x49339a});return Y(_0x4bb5a1[_0x42bc4b(0x17d)][_0x42bc4b(0x1d2)],_0x467af6);}}async[_0x49bf79(0x180)](_0x29ae4e){const _0x2b7a51=_0x49bf79;var _0x3282b8,_0x24d1d1;const {text:_0x434528,unitId:_0x19d106}=_0x29ae4e,_0x39d97b=(_0x24d1d1=(_0x3282b8=_0x434528[_0x2b7a51(0x1a0)])==null?void 0x0:_0x3282b8[_0x2b7a51(0x195)](_0x17be82=>_0x17be82[_0x2b7a51(0x19a)]===c[_0x2b7a51(0x17a)][_0x2b7a51(0x1c6)])[_0x2b7a51(0x189)](_0x1d3c95=>_0x1d3c95[_0x2b7a51(0x172)]))!=null?_0x24d1d1:[],_0x25b5bf=JSON[_0x2b7a51(0x1cd)](_0x434528),_0x3898ab=_0x29ae4e[_0x2b7a51(0x153)],_0x599a5f=_0x29ae4e['id'],_0xa9c9e7={'memberId':(await this['_sessionService'][_0x2b7a51(0x1cb)](_0x19d106))[_0x2b7a51(0x198)](),'unitId':_0x19d106,'threadId':_0x3898ab,'mention':_0x39d97b,'content':_0x25b5bf,'replyId':_0x599a5f},_0x3e1797=await this[_0x2b7a51(0x1b6)][_0x2b7a51(0x1a3)](_0x2b7a51(0x165)+_0x19d106+_0x2b7a51(0x18d),{'body':_0xa9c9e7});return!_0x3e1797[_0x2b7a51(0x17d)][_0x2b7a51(0x162)]||_0x3e1797['body'][_0x2b7a51(0x162)][_0x2b7a51(0x194)]===0x1;}async[_0x49bf79(0x1c0)](_0x32a0ec){const _0x557f2f=_0x49bf79,{unitId:_0x15df81}=_0x32a0ec,_0x44296e=_0x32a0ec[_0x557f2f(0x153)],_0x35475b={'memberId':this['_userService']['getCurrentUser']()[_0x557f2f(0x196)],'unitId':_0x15df81,'threadId':_0x44296e,'solved':_0x32a0ec[_0x557f2f(0x161)]?I[_0x557f2f(0x19d)]:I[_0x557f2f(0x192)]},_0x34fdb8=await this[_0x557f2f(0x1b6)][_0x557f2f(0x1a3)](_0x557f2f(0x165)+_0x15df81+_0x557f2f(0x160),{'body':_0x35475b});return!_0x34fdb8[_0x557f2f(0x17d)][_0x557f2f(0x162)]||_0x34fdb8[_0x557f2f(0x17d)][_0x557f2f(0x162)][_0x557f2f(0x194)]===0x1;}async['deleteComment'](_0x56761c,_0x1c7a30,_0x2031cd,_0x46b83d){const _0x8af501=_0x49bf79,_0x2f04f6={'memberId':(await this[_0x8af501(0x170)]['requireSession'](_0x56761c))[_0x8af501(0x198)](),'threadId':_0x2031cd,'replyId':_0x46b83d,'unitId':_0x56761c},_0x28ced5=await this[_0x8af501(0x1b6)][_0x8af501(0x1a3)](_0x8af501(0x165)+_0x56761c+'/delete',{'body':_0x2f04f6});return!_0x28ced5[_0x8af501(0x17d)][_0x8af501(0x162)]||_0x28ced5[_0x8af501(0x17d)][_0x8af501(0x162)][_0x8af501(0x194)]===0x1;}async[_0x49bf79(0x181)](_0x48dd50,_0x24b38c,_0x5265df){const _0x2a9f12=_0x49bf79,_0x3cd3ae={'unitId':_0x48dd50,'threadId':_0x5265df},_0x593deb=await this[_0x2a9f12(0x1b6)]['post'](_0x2a9f12(0x165)+_0x48dd50+_0x2a9f12(0x154),{'body':_0x3cd3ae}),_0x3b29d6=_0x5265df[_0x2a9f12(0x189)](_0x210e7c=>G(_0x593deb[_0x2a9f12(0x17d)][_0x2a9f12(0x15a)][_0x210e7c],_0x48dd50,_0x24b38c))[_0x2a9f12(0x195)](Boolean);return Object[_0x2a9f12(0x155)](_0x593deb[_0x2a9f12(0x17d)][_0x2a9f12(0x1c2)])['forEach'](_0x86ba8a=>{const _0x46188c=_0x2a9f12;this['_userService'][_0x46188c(0x1be)](_0x86ba8a);}),_0x3b29d6;}[_0x49bf79(0x1b4)](_0x108c28){const _0x165461=_0x49bf79;return{'id':_0x108c28['id'],'threadId':_0x108c28[_0x165461(0x153)],'ref':_0x108c28['ref']};}};g=x([_(0x0,c['Inject'](P[_0x49bf79(0x1bf)])),_(0x1,c[_0x49bf79(0x171)](c[_0x49bf79(0x1af)])),_(0x2,c['Inject'](b[_0x49bf79(0x16b)])),_(0x3,c[_0x49bf79(0x171)](c[_0x49bf79(0x16f)]))],g);var H=Object[_0x49bf79(0x1b8)],J=(_0x2365e9,_0x534419,_0x38a1ea,_0x5eef0e)=>{const _0x559e6a=_0x49bf79;for(var _0x8ab899=_0x5eef0e>0x1?void 0x0:_0x5eef0e?H(_0x534419,_0x38a1ea):_0x534419,_0x22492f=_0x2365e9[_0x559e6a(0x16c)]-0x1,_0x10d669;_0x22492f>=0x0;_0x22492f--)(_0x10d669=_0x2365e9[_0x22492f])&&(_0x8ab899=_0x10d669(_0x8ab899)||_0x8ab899);return _0x8ab899;},y=(_0x3801ff,_0x3465f6)=>(_0x4b8de3,_0x11bd5a)=>_0x3465f6(_0x4b8de3,_0x11bd5a,_0x3801ff);let C=class extends c[_0x49bf79(0x15c)]{constructor(_0x3beeea,_0x416d8c){const _0x5cb63c=_0x49bf79;super(),this[_0x5cb63c(0x159)]=_0x3beeea,this[_0x5cb63c(0x16d)]=_0x416d8c,this[_0x5cb63c(0x1b5)]();}[_0x49bf79(0x1b5)](){const _0xc28f4c=_0x49bf79;this['_threadCommentDataSourceService'][_0xc28f4c(0x1c3)]=this[_0xc28f4c(0x16d)],this[_0xc28f4c(0x159)][_0xc28f4c(0x16e)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x49bf79(0x171)](g))],C);var F=Object[_0x49bf79(0x167)],L=Object[_0x49bf79(0x1b8)],Z=(_0x5c8b97,_0x2e74eb,_0x38b8fa)=>_0x2e74eb in _0x5c8b97?F(_0x5c8b97,_0x2e74eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38b8fa}):_0x5c8b97[_0x2e74eb]=_0x38b8fa,W=(_0x5a2e9e,_0x3272a4,_0x17d428,_0x334678)=>{const _0x1df8c1=_0x49bf79;for(var _0x3156db=_0x334678>0x1?void 0x0:_0x334678?L(_0x3272a4,_0x17d428):_0x3272a4,_0x5a4b86=_0x5a2e9e[_0x1df8c1(0x16c)]-0x1,_0x27b9d8;_0x5a4b86>=0x0;_0x5a4b86--)(_0x27b9d8=_0x5a2e9e[_0x5a4b86])&&(_0x3156db=_0x27b9d8(_0x3156db)||_0x3156db);return _0x3156db;},O=(_0x410afd,_0x4dc964)=>(_0x54ab73,_0x561597)=>_0x4dc964(_0x54ab73,_0x561597,_0x410afd),N=(_0x294e27,_0x2b2fd2,_0x4f6104)=>Z(_0x294e27,typeof _0x2b2fd2!=_0x49bf79(0x1b1)?_0x2b2fd2+'':_0x2b2fd2,_0x4f6104);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x49bf79(0x1a9)]{constructor(_0x151a1b=D,_0x53c1a4,_0x437dc2){const _0x16fd4b=_0x49bf79;super(),this[_0x16fd4b(0x1ad)]=_0x151a1b,this[_0x16fd4b(0x15d)]=_0x53c1a4,this[_0x16fd4b(0x157)]=_0x437dc2;const {..._0x4f59ab}=c[_0x16fd4b(0x199)]({},D,this['_config']);this[_0x16fd4b(0x157)][_0x16fd4b(0x17f)](q,_0x4f59ab);}[_0x49bf79(0x164)](){const _0x49bd7b=_0x49bf79;[[g],[C],[p]][_0x49bd7b(0x19f)](_0xcaea74=>{const _0x3e9c73=_0x49bd7b;this[_0x3e9c73(0x15d)][_0x3e9c73(0x1a2)](_0xcaea74);});}['onReady'](){const _0x31e791=_0x49bf79;this[_0x31e791(0x15d)][_0x31e791(0x175)](C),this[_0x31e791(0x15d)]['get'](p);}},N(exports[_0x49bf79(0x173)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x49bf79(0x1d0),c['UniverInstanceType'][_0x49bf79(0x18a)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x49bf79(0x1ac)](j['UniverThreadCommentUIPlugin'],b[_0x49bf79(0x1b9)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x49bf79(0x16f)])),O(0x2,c[_0x49bf79(0x169)])],exports[_0x49bf79(0x173)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x315572=_0x2001;(function(_0x1b0c2d,_0x1cca45){const _0x41fe69=_0x2001,_0x2303b2=_0x1b0c2d();while(!![]){try{const _0x28e32a=parseInt(_0x41fe69(0x10e))/0x1*(parseInt(_0x41fe69(0xe8))/0x2)+-parseInt(_0x41fe69(0x14c))/0x3+-parseInt(_0x41fe69(0x14e))/0x4*(parseInt(_0x41fe69(0xe6))/0x5)+-parseInt(_0x41fe69(0x111))/0x6+parseInt(_0x41fe69(0x129))/0x7*(parseInt(_0x41fe69(0x140))/0x8)+-parseInt(_0x41fe69(0xf0))/0x9*(parseInt(_0x41fe69(0xf3))/0xa)+parseInt(_0x41fe69(0x10b))/0xb*(parseInt(_0x41fe69(0xfc))/0xc);if(_0x28e32a===_0x1cca45)break;else _0x2303b2['push'](_0x2303b2['shift']());}catch(_0xabddd4){_0x2303b2['push'](_0x2303b2['shift']());}}}(_0x4a3d,0x3d129));import{CommentService as _0xf55148,CollaborationSessionService as _0x3367e2,UniverCollaborationClientPlugin as _0xbc1850}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c6876}from'@univerjs-pro/license';import{dayjs as _0x208de3,UserManagerService as _0x4b5ea8,Inject as _0x240b39,Injector as _0x8b9753,Disposable as _0x5145d0,CustomRangeType as _0x5cf3b6,UniverInstanceType as _0x1a1c01,DependentOn as _0x1c769b,IConfigService as _0x9dd781,Plugin as _0x336e2b,merge as _0x1497a9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b820e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43e662,IThreadCommentDataSourceService as _0xba9def}from'@univerjs/thread-comment';import{bufferTime as _0x1ade61}from'rxjs';function _0x2001(_0x4972d1,_0x402487){const _0x4a3de2=_0x4a3d();return _0x2001=function(_0x20011e,_0x5b4cf3){_0x20011e=_0x20011e-0xe6;let _0x40ef97=_0x4a3de2[_0x20011e];return _0x40ef97;},_0x2001(_0x4972d1,_0x402487);}import{HTTPService as _0x56f64f}from'@univerjs/network';const W=_0x315572(0x126);var I=(_0x6c0efa=>(_0x6c0efa[_0x6c0efa[_0x315572(0x10d)]=0x0]=_0x315572(0x10d),_0x6c0efa[_0x6c0efa[_0x315572(0x153)]=0x1]='Solved',_0x6c0efa[_0x6c0efa[_0x315572(0x148)]=-0x1]=_0x315572(0x148),_0x6c0efa))(I||{}),v=(_0x18d274=>(_0x18d274[_0x18d274[_0x315572(0x11b)]=0x0]=_0x315572(0x11b),_0x18d274[_0x18d274['Add']=0x1]=_0x315572(0x11e),_0x18d274[_0x18d274['Reply']=0x2]=_0x315572(0x13c),_0x18d274[_0x18d274[_0x315572(0x105)]=0x3]=_0x315572(0x105),_0x18d274[_0x18d274[_0x315572(0x14f)]=0x4]=_0x315572(0x14f),_0x18d274[_0x18d274[_0x315572(0x14d)]=0x5]=_0x315572(0x14d),_0x18d274[_0x18d274[_0x315572(0x148)]=-0x1]='UNRECOGNIZED',_0x18d274))(v||{});const D=_0x202c35=>_0x208de3(new Date(+_0x202c35))[_0x315572(0x118)](_0x315572(0x12f)),B=async(_0xd9d44b,_0x14a0ba)=>{const _0x988dd=_0x315572,_0x2876b1=_0xd9d44b[_0x988dd(0x10f)](_0x4b5ea8),_0x1b1ebb=_0xd9d44b[_0x988dd(0x10f)](_0x56f64f);_0x14a0ba[_0x988dd(0x13d)](_0x1f84ca=>{const _0x503569=_0x988dd;_0x2876b1['getUser'](_0x1f84ca)&&_0x14a0ba[_0x503569(0xf6)](_0x1f84ca);}),_0x14a0ba[_0x988dd(0xef)]&&(await _0x1b1ebb[_0x988dd(0x10f)](_0x988dd(0x13f),{'params':{'userIDs':[..._0x14a0ba]}}))[_0x988dd(0xf1)][_0x988dd(0x137)][_0x988dd(0x13d)](_0x549f05=>{const _0x572399=_0x988dd;_0x549f05&&_0x2876b1[_0x572399(0x139)](_0x549f05);});};var K=Object[_0x315572(0xf4)],V=(_0x5c598e,_0x573425,_0x13ab72,_0x407e73)=>{const _0x4d022b=_0x315572;for(var _0x59262d=_0x407e73>0x1?void 0x0:_0x407e73?K(_0x573425,_0x13ab72):_0x573425,_0x4cd28f=_0x5c598e[_0x4d022b(0x103)]-0x1,_0x177462;_0x4cd28f>=0x0;_0x4cd28f--)(_0x177462=_0x5c598e[_0x4cd28f])&&(_0x59262d=_0x177462(_0x59262d)||_0x59262d);return _0x59262d;},p=(_0x3e833a,_0x376724)=>(_0x3a19c2,_0x436870)=>_0x376724(_0x3a19c2,_0x436870,_0x3e833a);let S=class extends _0x5145d0{constructor(_0x114727,_0xead3d8,_0x393b55,_0x1fa4f1){const _0x290cda=_0x315572;super(),this[_0x290cda(0x149)]=_0x114727,this[_0x290cda(0x146)]=_0xead3d8,this[_0x290cda(0x128)]=_0x393b55,this[_0x290cda(0x132)]=_0x1fa4f1,this['_init'](),this[_0x290cda(0x114)]();}[_0x315572(0x114)](){const _0x34eeb5=_0x315572;this[_0x34eeb5(0x11c)](this[_0x34eeb5(0x146)]['commentUpdate$'][_0x34eeb5(0x13e)](_0x1ade61(0x10))[_0x34eeb5(0xe7)](_0x3b686b=>{const _0x496125=_0x34eeb5,_0x266165=new Set();_0x3b686b[_0x496125(0x13d)](_0x4a3d59=>{const _0x3a1f57=_0x496125;switch(_0x4a3d59[_0x3a1f57(0x12c)]){case _0x3a1f57(0x131):{const _0x4d88cf=_0x4a3d59['payload'][_0x3a1f57(0x130)];_0x266165[_0x3a1f57(0x131)](_0x4d88cf);break;}}}),B(this[_0x496125(0x132)],_0x266165);}));}[_0x315572(0xe9)](){const _0x90656e=_0x315572;this[_0x90656e(0x11c)](this[_0x90656e(0x149)][_0x90656e(0xec)][_0x90656e(0xe7)](async _0x12d3c1=>{const _0x5ed802=_0x90656e;var _0x3c0728,_0x555bb7,_0x1144a0,_0x364a79;const _0x31ed20=(_0x3c0728=this[_0x5ed802(0x146)]['getUnit'](_0x12d3c1[_0x5ed802(0x13a)])['find'](_0x565297=>_0x565297[_0x5ed802(0x10c)]===_0x12d3c1['threadId']))==null?void 0x0:_0x3c0728['root'];if(!_0x31ed20)return;const {unitId:_0x3ac16f,subUnitId:_0x46b49c}=_0x31ed20;switch(_0x12d3c1['user']&&this['_userService']['addUser'](_0x12d3c1[_0x5ed802(0xf5)]),_0x12d3c1[_0x5ed802(0x12c)]){case v[_0x5ed802(0x11e)]:break;case v['Reply']:{this[_0x5ed802(0x146)][_0x5ed802(0xfa)](_0x3ac16f,_0x46b49c,{'unitId':_0x3ac16f,'subUnitId':_0x46b49c,'ref':'','id':_0x12d3c1[_0x5ed802(0xf7)],'dT':D(+_0x12d3c1[_0x5ed802(0x11d)]),'threadId':_0x12d3c1[_0x5ed802(0x10c)],'personId':(_0x1144a0=(_0x555bb7=_0x12d3c1[_0x5ed802(0xf5)])==null?void 0x0:_0x555bb7[_0x5ed802(0x119)])!=null?_0x1144a0:_0x12d3c1[_0x5ed802(0x110)],'text':JSON[_0x5ed802(0x135)](_0x12d3c1[_0x5ed802(0x152)]),'parentId':_0x31ed20['id']});break;}case v[_0x5ed802(0x14f)]:{const _0x3a9ef0=this[_0x5ed802(0x146)][_0x5ed802(0x100)](_0x3ac16f,_0x46b49c,_0x12d3c1[_0x5ed802(0xf7)]);_0x3a9ef0&&_0x3a9ef0[_0x5ed802(0x122)]&&this[_0x5ed802(0x146)][_0x5ed802(0x142)](_0x3ac16f,_0x46b49c,_0x12d3c1[_0x5ed802(0xf7)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x5ed802(0xee)](_0x3ac16f,_0x46b49c,{'commentId':_0x12d3c1[_0x5ed802(0xf7)],'text':JSON[_0x5ed802(0x135)](_0x12d3c1[_0x5ed802(0x152)])});break;}case v[_0x5ed802(0x14d)]:{const _0xb0d951=(_0x364a79=this[_0x5ed802(0x146)][_0x5ed802(0x107)](_0x12d3c1[_0x5ed802(0x13a)])[_0x5ed802(0x143)](_0xd3f8f=>_0xd3f8f[_0x5ed802(0x10c)]===_0x12d3c1[_0x5ed802(0x10c)]))==null?void 0x0:_0x364a79[_0x5ed802(0x101)];_0xb0d951&&this[_0x5ed802(0x146)][_0x5ed802(0x12a)](_0x3ac16f,_0x46b49c,_0xb0d951['id'],_0x12d3c1[_0x5ed802(0x144)]===I[_0x5ed802(0x153)]);break;}}}));}};S=V([p(0x0,_0x240b39(_0xf55148)),p(0x1,_0x240b39(_0x43e662)),p(0x2,_0x240b39(_0x4b5ea8)),p(0x3,_0x240b39(_0x8b9753))],S);const z=_0x315572(0x141),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5396b9,_0x504daa,_0x656df,_0x148842)=>{const _0x5890de=_0x315572;for(var _0x8abd7a=_0x148842>0x1?void 0x0:_0x148842?k(_0x504daa,_0x656df):_0x504daa,_0x17acd0=_0x5396b9[_0x5890de(0x103)]-0x1,_0x888dd3;_0x17acd0>=0x0;_0x17acd0--)(_0x888dd3=_0x5396b9[_0x17acd0])&&(_0x8abd7a=_0x888dd3(_0x8abd7a)||_0x8abd7a);return _0x8abd7a;},_=(_0x4718b4,_0x332c00)=>(_0x3ac36e,_0x171bb2)=>_0x332c00(_0x3ac36e,_0x171bb2,_0x4718b4);function X(_0x2229ff,_0x45240a){const _0x4c2e08=_0x315572,_0x2cb1b4=_0x2229ff[_0x4c2e08(0x123)][0x0];return{..._0x45240a,'id':_0x2cb1b4[_0x4c2e08(0xf7)],'resolved':_0x2229ff[_0x4c2e08(0x144)]===0x1,'dT':D(_0x2cb1b4['createTimestamp']),'personId':_0x2cb1b4['userId'],'threadId':_0x2cb1b4['threadId']};}function ee(_0x2c0425,_0x224b9b,_0x330826){const _0x387137=_0x315572;var _0x14f0cd,_0x55c62a;if(((_0x55c62a=(_0x14f0cd=_0x2c0425==null?void 0x0:_0x2c0425[_0x387137(0x123)])==null?void 0x0:_0x14f0cd[_0x387137(0x103)])!=null?_0x55c62a:0x0)>0x0){const _0x3c43f2=(_0x34b245,_0x472142)=>({'id':_0x34b245[_0x387137(0xf7)],'threadId':_0x34b245[_0x387137(0x10c)],'dT':D(_0x34b245[_0x387137(0x11d)]),'personId':_0x34b245[_0x387137(0x110)],'resolved':_0x2c0425['solved']===I[_0x387137(0x153)],'unitId':_0x224b9b,'subUnitId':_0x330826,'text':JSON[_0x387137(0x135)](_0x34b245[_0x387137(0x152)]),'parentId':_0x472142}),_0x29b2e3=_0x3c43f2(_0x2c0425[_0x387137(0x123)][0x0]);return{..._0x29b2e3,'children':_0x2c0425[_0x387137(0x123)]['slice'](0x1)[_0x387137(0xeb)](_0x52e60d=>_0x3c43f2(_0x52e60d,_0x29b2e3['id']))};}return null;}let f=class{constructor(_0x1d1cf8,_0x5af46d,_0x38bc1c,_0x182f22){const _0x518529=_0x315572;this[_0x518529(0x109)]=_0x1d1cf8,this[_0x518529(0x128)]=_0x5af46d,this[_0x518529(0x138)]=_0x38bc1c,this[_0x518529(0x132)]=_0x182f22;}async[_0x315572(0xfa)](_0x43d195){const _0x674dca=_0x315572;var _0x44d0b0,_0x222111;const {parentId:_0x1f984a,unitId:_0x184195,text:_0xf7392b,threadId:_0x5ab09d}=_0x43d195,_0x2dfb29=(_0x222111=(_0x44d0b0=_0xf7392b[_0x674dca(0x151)])==null?void 0x0:_0x44d0b0['filter'](_0x4fb584=>_0x4fb584[_0x674dca(0x121)]===_0x5cf3b6[_0x674dca(0x117)])[_0x674dca(0xeb)](_0x22a0bc=>_0x22a0bc['rangeId']))!=null?_0x222111:[],_0x481b44=JSON[_0x674dca(0x147)](_0xf7392b),_0x594a79=(await this[_0x674dca(0x138)][_0x674dca(0xfb)](_0x184195))[_0x674dca(0xff)]();if(_0x1f984a){const _0x449a9f={'memberId':_0x594a79,'unitId':_0x184195,'content':_0x481b44,'mention':_0x2dfb29,'threadId':_0x5ab09d},_0x1012a3=(await this['_httpService']['post'](_0x674dca(0x12e)+_0x184195+_0x674dca(0xed),{'body':_0x449a9f}))['body'][_0x674dca(0xf9)];return{..._0x43d195,'id':_0x1012a3[_0x674dca(0xf7)],'dT':_0x208de3(+_0x1012a3['createTimestamp'])[_0x674dca(0x118)](_0x674dca(0x12f)),'personId':_0x1012a3[_0x674dca(0x110)]};}else{const _0x45b4fd={'memberId':_0x594a79,'unitId':_0x184195,'content':_0x481b44,'mention':_0x2dfb29},_0x512061=await this['_httpService'][_0x674dca(0x104)](_0x674dca(0x12e)+_0x184195+_0x674dca(0x106),{'body':_0x45b4fd});return X(_0x512061['body'][_0x674dca(0x102)],_0x43d195);}}async[_0x315572(0xee)](_0x4c8c54){const _0x49bb2d=_0x315572;var _0x510176,_0x2da60e;const {text:_0x254756,unitId:_0x3ad372}=_0x4c8c54,_0x8d0a48=(_0x2da60e=(_0x510176=_0x254756['customRanges'])==null?void 0x0:_0x510176[_0x49bb2d(0x11a)](_0x1b829a=>_0x1b829a[_0x49bb2d(0x121)]===_0x5cf3b6[_0x49bb2d(0x117)])['map'](_0xf8c20c=>_0xf8c20c[_0x49bb2d(0x116)]))!=null?_0x2da60e:[],_0x83c595=JSON[_0x49bb2d(0x147)](_0x254756),_0x47d378=_0x4c8c54[_0x49bb2d(0x10c)],_0x3443ef=_0x4c8c54['id'],_0x5570fc={'memberId':(await this[_0x49bb2d(0x138)][_0x49bb2d(0xfb)](_0x3ad372))[_0x49bb2d(0xff)](),'unitId':_0x3ad372,'threadId':_0x47d378,'mention':_0x8d0a48,'content':_0x83c595,'replyId':_0x3443ef},_0x2a52a7=await this['_httpService'][_0x49bb2d(0x104)](_0x49bb2d(0x12e)+_0x3ad372+_0x49bb2d(0x136),{'body':_0x5570fc});return!_0x2a52a7['body'][_0x49bb2d(0x112)]||_0x2a52a7[_0x49bb2d(0xf1)][_0x49bb2d(0x112)]['code']===0x1;}async[_0x315572(0x12a)](_0x5d8147){const _0x34c0aa=_0x315572,{unitId:_0x22aab8}=_0x5d8147,_0x4a024c=_0x5d8147[_0x34c0aa(0x10c)],_0x3c3dbc={'memberId':this[_0x34c0aa(0x128)][_0x34c0aa(0xfe)]()[_0x34c0aa(0x119)],'unitId':_0x22aab8,'threadId':_0x4a024c,'solved':_0x5d8147[_0x34c0aa(0x108)]?I[_0x34c0aa(0x153)]:I[_0x34c0aa(0x10d)]},_0x1f7682=await this[_0x34c0aa(0x109)]['post'](_0x34c0aa(0x12e)+_0x22aab8+_0x34c0aa(0x120),{'body':_0x3c3dbc});return!_0x1f7682[_0x34c0aa(0xf1)][_0x34c0aa(0x112)]||_0x1f7682[_0x34c0aa(0xf1)]['error']['code']===0x1;}async[_0x315572(0x142)](_0x132408,_0x372f71,_0x36567c,_0x34461b){const _0xb909fe=_0x315572,_0x4817bd={'memberId':(await this['_sessionService'][_0xb909fe(0xfb)](_0x132408))[_0xb909fe(0xff)](),'threadId':_0x36567c,'replyId':_0x34461b,'unitId':_0x132408},_0x476760=await this[_0xb909fe(0x109)]['post']('/universer-api/comment/unit/'+_0x132408+_0xb909fe(0x124),{'body':_0x4817bd});return!_0x476760[_0xb909fe(0xf1)][_0xb909fe(0x112)]||_0x476760[_0xb909fe(0xf1)]['error'][_0xb909fe(0xf2)]===0x1;}async[_0x315572(0x134)](_0x4b307b,_0x51cb17,_0xcb49a2){const _0x3fbca6=_0x315572,_0x5083d7={'unitId':_0x4b307b,'threadId':_0xcb49a2},_0x171631=await this[_0x3fbca6(0x109)][_0x3fbca6(0x104)]('/universer-api/comment/unit/'+_0x4b307b+_0x3fbca6(0x13b),{'body':_0x5083d7}),_0x1c732f=_0xcb49a2[_0x3fbca6(0xeb)](_0x5d2f16=>ee(_0x171631[_0x3fbca6(0xf1)][_0x3fbca6(0x12b)][_0x5d2f16],_0x4b307b,_0x51cb17))['filter'](Boolean);return Object[_0x3fbca6(0x127)](_0x171631[_0x3fbca6(0xf1)][_0x3fbca6(0x137)])[_0x3fbca6(0x13d)](_0x15c81f=>{const _0x4807ad=_0x3fbca6;this['_userService'][_0x4807ad(0x139)](_0x15c81f);}),_0x1c732f;}[_0x315572(0x133)](_0x12cf1b){const _0x8548f6=_0x315572;return{'id':_0x12cf1b['id'],'threadId':_0x12cf1b[_0x8548f6(0x10c)],'ref':_0x12cf1b[_0x8548f6(0x10a)]};}};f=Q([_(0x0,_0x240b39(_0x56f64f)),_(0x1,_0x240b39(_0x4b5ea8)),_(0x2,_0x240b39(_0x3367e2)),_(0x3,_0x240b39(_0x8b9753))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0xd8dc89,_0x4df77b,_0x5d218f,_0xc54fa2)=>{const _0x18a824=_0x315572;for(var _0x3240fe=_0xc54fa2>0x1?void 0x0:_0xc54fa2?re(_0x4df77b,_0x5d218f):_0x4df77b,_0x238e12=_0xd8dc89[_0x18a824(0x103)]-0x1,_0x140bae;_0x238e12>=0x0;_0x238e12--)(_0x140bae=_0xd8dc89[_0x238e12])&&(_0x3240fe=_0x140bae(_0x3240fe)||_0x3240fe);return _0x3240fe;},N=(_0x5d9db2,_0x2f9fd1)=>(_0xdeadbe,_0x2733c0)=>_0x2f9fd1(_0xdeadbe,_0x2733c0,_0x5d9db2);let g=class extends _0x5145d0{constructor(_0x23724d,_0x481987){const _0x593a73=_0x315572;super(),this[_0x593a73(0x11f)]=_0x23724d,this[_0x593a73(0xf8)]=_0x481987,this['_initDataSource']();}[_0x315572(0x14b)](){const _0x37f685=_0x315572;this[_0x37f685(0x11f)][_0x37f685(0x125)]=this[_0x37f685(0xf8)],this[_0x37f685(0x11f)][_0x37f685(0x113)]=!0x1;}};g=te([N(0x0,_0xba9def),N(0x1,_0x240b39(f))],g);function _0x4a3d(){const _0x22c5db=['_userService','1351qDNqpd','resolveComment','comments','type','defineProperty','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','personId','add','_injector','saveCommentToSnapshot','listComments','parse','/edit','users','_sessionService','addUser','unitId','/list','Reply','forEach','pipe','/universer-api/user/list','12304vFGZSS','thread-comment-data-source.config','deleteComment','find','solved','UNIVER_UNKNOWN','_threadCommentModel','stringify','UNRECOGNIZED','_commentService','symbol','_initDataSource','295461mRBhSn','Solve','8qgJhpM','Delete','_configService','customRanges','content','Solved','141460VyBijZ','subscribe','10JMkxlc','_init','onReady','map','commentUpdate$','/reply','updateComment','size','50454lNjRZW','body','code','260CmuQjn','getOwnPropertyDescriptor','user','delete','replyId','_threadCommentDataSource','reply','addComment','requireSession','84aIOwNi','pluginName','getCurrentUser','getMemberID','getComment','root','comment','length','post','Edit','/add','getUnit','resolved','_httpService','ref','260601umePPe','threadId','OpenOrReOpen','42412cMeuJL','get','userId','742506EWntOi','error','syncUpdateMutationToColla','_initUserSync','_config','rangeId','COMMENT','format','userID','filter','Unknown','disposeWithMe','createTimestamp','Add','_threadCommentDataSourceService','/solved','rangeType','parentId','replies','/delete','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values'];_0x4a3d=function(){return _0x22c5db;};return _0x4a3d();}var se=Object[_0x315572(0x12d)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4f258b,_0x2db574,_0x1f2589)=>_0x2db574 in _0x4f258b?se(_0x4f258b,_0x2db574,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f2589}):_0x4f258b[_0x2db574]=_0x1f2589,ie=(_0x1b3d42,_0x550c18,_0x2fd444,_0x51ac8c)=>{const _0x300c01=_0x315572;for(var _0xb07419=_0x51ac8c>0x1?void 0x0:_0x51ac8c?oe(_0x550c18,_0x2fd444):_0x550c18,_0x159aa9=_0x1b3d42[_0x300c01(0x103)]-0x1,_0x20bd06;_0x159aa9>=0x0;_0x159aa9--)(_0x20bd06=_0x1b3d42[_0x159aa9])&&(_0xb07419=_0x20bd06(_0xb07419)||_0xb07419);return _0xb07419;},w=(_0x317a0e,_0x4ada00)=>(_0x40b202,_0x464d42)=>_0x4ada00(_0x40b202,_0x464d42,_0x317a0e),$=(_0x4d5675,_0x45bc98,_0x4507ef)=>ne(_0x4d5675,typeof _0x45bc98!=_0x315572(0x14a)?_0x45bc98+'':_0x45bc98,_0x4507ef);let b=class extends _0x336e2b{constructor(_0x3c00e5=M,_0x7b54fa,_0x4d6d62){const _0x20dab2=_0x315572;super(),this[_0x20dab2(0x115)]=_0x3c00e5,this[_0x20dab2(0x132)]=_0x7b54fa,this['_configService']=_0x4d6d62;const {..._0x118b97}=_0x1497a9({},M,this[_0x20dab2(0x115)]);this[_0x20dab2(0x150)]['setConfig'](z,_0x118b97);}['onStarting'](){const _0x202919=_0x315572;[[f],[g],[S]][_0x202919(0x13d)](_0x572104=>{const _0x371670=_0x202919;this[_0x371670(0x132)][_0x371670(0x131)](_0x572104);});}[_0x315572(0xea)](){const _0x1f56c7=_0x315572;this['_injector'][_0x1f56c7(0x10f)](g),this['_injector'][_0x1f56c7(0x10f)](S);}};$(b,_0x315572(0xfd),W),$(b,_0x315572(0x12c),_0x1a1c01[_0x315572(0x145)]),b=ie([_0x1c769b(_0x1b820e,_0xbc1850,_0x5c6876),w(0x1,_0x240b39(_0x8b9753)),w(0x2,_0x9dd781)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x15a028=_0x6018;(function(_0x344545,_0x54bf3c){const _0x5091a7=_0x6018,_0x3c2b54=_0x344545();while(!![]){try{const _0x109cc9=-parseInt(_0x5091a7(0x1e8))/0x1*(-parseInt(_0x5091a7(0x203))/0x2)+-parseInt(_0x5091a7(0x24e))/0x3*(-parseInt(_0x5091a7(0x1ed))/0x4)+parseInt(_0x5091a7(0x1ef))/0x5+parseInt(_0x5091a7(0x1ff))/0x6+-parseInt(_0x5091a7(0x234))/0x7+parseInt(_0x5091a7(0x21e))/0x8*(parseInt(_0x5091a7(0x1fd))/0x9)+-parseInt(_0x5091a7(0x1fb))/0xa;if(_0x109cc9===_0x54bf3c)break;else _0x3c2b54['push'](_0x3c2b54['shift']());}catch(_0x3da37d){_0x3c2b54['push'](_0x3c2b54['shift']());}}}(_0x3d91,0xccfa3));import{CommentService as _0x253c4f,CollaborationSessionService as _0x8a85c4,UniverCollaborationClientPlugin as _0x267342}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1782a3}from'@univerjs-pro/license';import{dayjs as _0x35743c,UserManagerService as _0x1f607e,Inject as _0x5cfd2a,Injector as _0x4e2d06,Disposable as _0x4ffcbe,CustomRangeType as _0xe13e7a,UniverInstanceType as _0x4632e5,DependentOn as _0x3b7993,IConfigService as _0x58de89,Plugin as _0x46fc63,merge as _0x5609b0}from'@univerjs/core';function _0x6018(_0x1bc6fa,_0x1311fc){const _0x3d917a=_0x3d91();return _0x6018=function(_0x6018a5,_0x5eff06){_0x6018a5=_0x6018a5-0x1e8;let _0x1b0f32=_0x3d917a[_0x6018a5];return _0x1b0f32;},_0x6018(_0x1bc6fa,_0x1311fc);}import{UniverThreadCommentUIPlugin as _0x3dd618}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48a5cd,IThreadCommentDataSourceService as _0x34f453}from'@univerjs/thread-comment';import{bufferTime as _0x4ff96d}from'rxjs';import{HTTPService as _0xeb8e79}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x532dc6=>(_0x532dc6[_0x532dc6[_0x15a028(0x232)]=0x0]=_0x15a028(0x232),_0x532dc6[_0x532dc6[_0x15a028(0x241)]=0x1]=_0x15a028(0x241),_0x532dc6[_0x532dc6[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x532dc6))(I||{}),v=(_0x50ff93=>(_0x50ff93[_0x50ff93['Unknown']=0x0]=_0x15a028(0x1f7),_0x50ff93[_0x50ff93[_0x15a028(0x247)]=0x1]='Add',_0x50ff93[_0x50ff93[_0x15a028(0x218)]=0x2]=_0x15a028(0x218),_0x50ff93[_0x50ff93[_0x15a028(0x23b)]=0x3]=_0x15a028(0x23b),_0x50ff93[_0x50ff93['Delete']=0x4]='Delete',_0x50ff93[_0x50ff93[_0x15a028(0x204)]=0x5]=_0x15a028(0x204),_0x50ff93[_0x50ff93[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x50ff93))(v||{});const D=_0x122c5b=>_0x35743c(new Date(+_0x122c5b))[_0x15a028(0x1f0)](_0x15a028(0x208)),B=async(_0x37953a,_0x25e775)=>{const _0x139966=_0x15a028,_0x428f4c=_0x37953a[_0x139966(0x222)](_0x1f607e),_0x1dc018=_0x37953a[_0x139966(0x222)](_0xeb8e79);_0x25e775[_0x139966(0x20e)](_0x5b11fe=>{const _0x4a3b7b=_0x139966;_0x428f4c[_0x4a3b7b(0x23d)](_0x5b11fe)&&_0x25e775[_0x4a3b7b(0x242)](_0x5b11fe);}),_0x25e775[_0x139966(0x24d)]&&(await _0x1dc018['get'](_0x139966(0x231),{'params':{'userIDs':[..._0x25e775]}}))[_0x139966(0x220)][_0x139966(0x244)][_0x139966(0x20e)](_0x257f4d=>{const _0x1d2422=_0x139966;_0x257f4d&&_0x428f4c[_0x1d2422(0x239)](_0x257f4d);});};var K=Object[_0x15a028(0x214)],V=(_0x134347,_0x3af775,_0x2bc25b,_0x45798d)=>{for(var _0x47ea62=_0x45798d>0x1?void 0x0:_0x45798d?K(_0x3af775,_0x2bc25b):_0x3af775,_0x1dd33e=_0x134347['length']-0x1,_0x35c777;_0x1dd33e>=0x0;_0x1dd33e--)(_0x35c777=_0x134347[_0x1dd33e])&&(_0x47ea62=_0x35c777(_0x47ea62)||_0x47ea62);return _0x47ea62;},p=(_0x494ebc,_0x526f45)=>(_0x2ac6f2,_0x3c4ff4)=>_0x526f45(_0x2ac6f2,_0x3c4ff4,_0x494ebc);let S=class extends _0x4ffcbe{constructor(_0x452dcd,_0x4e478b,_0x24a489,_0x4f790c){const _0x260497=_0x15a028;super(),this[_0x260497(0x24a)]=_0x452dcd,this[_0x260497(0x205)]=_0x4e478b,this[_0x260497(0x1f6)]=_0x24a489,this[_0x260497(0x206)]=_0x4f790c,this[_0x260497(0x20b)](),this[_0x260497(0x22d)]();}[_0x15a028(0x22d)](){const _0xb98b1f=_0x15a028;this[_0xb98b1f(0x20a)](this['_threadCommentModel'][_0xb98b1f(0x211)]['pipe'](_0x4ff96d(0x10))[_0xb98b1f(0x1e9)](_0x319130=>{const _0x5b53a8=_0xb98b1f,_0x14fbde=new Set();_0x319130['forEach'](_0x4c6202=>{const _0x4a39e3=_0x6018;switch(_0x4c6202[_0x4a39e3(0x229)]){case'add':{const _0x2bf500=_0x4c6202['payload']['personId'];_0x14fbde[_0x4a39e3(0x20c)](_0x2bf500);break;}}}),B(this[_0x5b53a8(0x206)],_0x14fbde);}));}[_0x15a028(0x20b)](){const _0x1db84e=_0x15a028;this[_0x1db84e(0x20a)](this['_commentService'][_0x1db84e(0x211)][_0x1db84e(0x1e9)](async _0x21a53e=>{const _0x4f62eb=_0x1db84e;var _0x4094ea,_0x4359e3,_0x24c7e1,_0x47c369;const _0x558fdc=(_0x4094ea=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])[_0x4f62eb(0x219)](_0xab5002=>_0xab5002[_0x4f62eb(0x236)]===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x4094ea['root'];if(!_0x558fdc)return;const {unitId:_0x3223c3,subUnitId:_0x38affb}=_0x558fdc;switch(_0x21a53e[_0x4f62eb(0x1f4)]&&this[_0x4f62eb(0x1f6)][_0x4f62eb(0x239)](_0x21a53e['user']),_0x21a53e['type']){case v[_0x4f62eb(0x247)]:break;case v[_0x4f62eb(0x218)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x21c)](_0x3223c3,_0x38affb,{'unitId':_0x3223c3,'subUnitId':_0x38affb,'ref':'','id':_0x21a53e[_0x4f62eb(0x1f9)],'dT':D(+_0x21a53e[_0x4f62eb(0x243)]),'threadId':_0x21a53e['threadId'],'personId':(_0x24c7e1=(_0x4359e3=_0x21a53e[_0x4f62eb(0x1f4)])==null?void 0x0:_0x4359e3[_0x4f62eb(0x21d)])!=null?_0x24c7e1:_0x21a53e[_0x4f62eb(0x1fa)],'text':JSON[_0x4f62eb(0x22e)](_0x21a53e[_0x4f62eb(0x215)]),'parentId':_0x558fdc['id']});break;}case v[_0x4f62eb(0x233)]:{const _0x1768b8=this[_0x4f62eb(0x205)][_0x4f62eb(0x207)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);_0x1768b8&&_0x1768b8['parentId']&&this[_0x4f62eb(0x205)][_0x4f62eb(0x23e)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);break;}case v[_0x4f62eb(0x23b)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x23f)](_0x3223c3,_0x38affb,{'commentId':_0x21a53e[_0x4f62eb(0x1f9)],'text':JSON['parse'](_0x21a53e[_0x4f62eb(0x215)])});break;}case v[_0x4f62eb(0x204)]:{const _0x262cca=(_0x47c369=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])['find'](_0x210123=>_0x210123['threadId']===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x47c369[_0x4f62eb(0x210)];_0x262cca&&this[_0x4f62eb(0x205)][_0x4f62eb(0x22f)](_0x3223c3,_0x38affb,_0x262cca['id'],_0x21a53e['solved']===I[_0x4f62eb(0x241)]);break;}}}));}};S=V([p(0x0,_0x5cfd2a(_0x253c4f)),p(0x1,_0x5cfd2a(_0x48a5cd)),p(0x2,_0x5cfd2a(_0x1f607e)),p(0x3,_0x5cfd2a(_0x4e2d06))],S);const z=_0x15a028(0x235),M={};var k=Object[_0x15a028(0x214)],Q=(_0x2dc919,_0x595483,_0x31b92e,_0x39ee5d)=>{const _0xa8dd0b=_0x15a028;for(var _0x37271b=_0x39ee5d>0x1?void 0x0:_0x39ee5d?k(_0x595483,_0x31b92e):_0x595483,_0x5dd6fe=_0x2dc919[_0xa8dd0b(0x227)]-0x1,_0x2623ad;_0x5dd6fe>=0x0;_0x5dd6fe--)(_0x2623ad=_0x2dc919[_0x5dd6fe])&&(_0x37271b=_0x2623ad(_0x37271b)||_0x37271b);return _0x37271b;},_=(_0x1a1b32,_0x45abf3)=>(_0x5d4e69,_0x58729a)=>_0x45abf3(_0x5d4e69,_0x58729a,_0x1a1b32);function X(_0x2471bc,_0xa5d22e){const _0x3cd42b=_0x15a028,_0x571d38=_0x2471bc[_0x3cd42b(0x1f5)][0x0];return{..._0xa5d22e,'id':_0x571d38[_0x3cd42b(0x1f9)],'resolved':_0x2471bc[_0x3cd42b(0x20d)]===0x1,'dT':D(_0x571d38[_0x3cd42b(0x243)]),'personId':_0x571d38[_0x3cd42b(0x1fa)],'threadId':_0x571d38[_0x3cd42b(0x236)]};}function ee(_0x3d672b,_0x29dee3,_0x281431){const _0xfa2551=_0x15a028;var _0x29f862,_0x5a473d;if(((_0x5a473d=(_0x29f862=_0x3d672b==null?void 0x0:_0x3d672b[_0xfa2551(0x1f5)])==null?void 0x0:_0x29f862[_0xfa2551(0x227)])!=null?_0x5a473d:0x0)>0x0){const _0x33acaa=(_0x5f3be4,_0x501372)=>({'id':_0x5f3be4[_0xfa2551(0x1f9)],'threadId':_0x5f3be4[_0xfa2551(0x236)],'dT':D(_0x5f3be4['createTimestamp']),'personId':_0x5f3be4[_0xfa2551(0x1fa)],'resolved':_0x3d672b[_0xfa2551(0x20d)]===I[_0xfa2551(0x241)],'unitId':_0x29dee3,'subUnitId':_0x281431,'text':JSON[_0xfa2551(0x22e)](_0x5f3be4[_0xfa2551(0x215)]),'parentId':_0x501372}),_0x2593e7=_0x33acaa(_0x3d672b[_0xfa2551(0x1f5)][0x0]);return{..._0x2593e7,'children':_0x3d672b[_0xfa2551(0x1f5)]['slice'](0x1)[_0xfa2551(0x230)](_0x15c981=>_0x33acaa(_0x15c981,_0x2593e7['id']))};}return null;}let f=class{constructor(_0x46a7b0,_0x4cf54d,_0x4d1150,_0x3e173f){const _0x1096e3=_0x15a028;this['_httpService']=_0x46a7b0,this[_0x1096e3(0x1f6)]=_0x4cf54d,this[_0x1096e3(0x225)]=_0x4d1150,this['_injector']=_0x3e173f;}async[_0x15a028(0x21c)](_0x1e62d1){const _0x2bc2a2=_0x15a028;var _0x4a6d9c,_0x58cd3f;const {parentId:_0x56762d,unitId:_0x3d17cd,text:_0x32e94d,threadId:_0x1b8ef0}=_0x1e62d1,_0x275e47=(_0x58cd3f=(_0x4a6d9c=_0x32e94d[_0x2bc2a2(0x216)])==null?void 0x0:_0x4a6d9c[_0x2bc2a2(0x202)](_0x142278=>_0x142278[_0x2bc2a2(0x238)]===_0xe13e7a[_0x2bc2a2(0x248)])[_0x2bc2a2(0x230)](_0xbe00bd=>_0xbe00bd[_0x2bc2a2(0x249)]))!=null?_0x58cd3f:[],_0x470e43=JSON[_0x2bc2a2(0x23a)](_0x32e94d),_0x4cdfa5=(await this[_0x2bc2a2(0x225)][_0x2bc2a2(0x228)](_0x3d17cd))['getMemberID']();if(_0x56762d){const _0x5c4a95={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47,'threadId':_0x1b8ef0},_0x162044=(await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)]('/universer-api/comment/unit/'+_0x3d17cd+_0x2bc2a2(0x201),{'body':_0x5c4a95}))[_0x2bc2a2(0x220)][_0x2bc2a2(0x1fe)];return{..._0x1e62d1,'id':_0x162044[_0x2bc2a2(0x1f9)],'dT':_0x35743c(+_0x162044[_0x2bc2a2(0x243)])['format'](_0x2bc2a2(0x208)),'personId':_0x162044[_0x2bc2a2(0x1fa)]};}else{const _0x3e9f6d={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47},_0x40cf21=await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)](_0x2bc2a2(0x246)+_0x3d17cd+'/add',{'body':_0x3e9f6d});return X(_0x40cf21['body'][_0x2bc2a2(0x212)],_0x1e62d1);}}async['updateComment'](_0x1540be){const _0x506d55=_0x15a028;var _0xd41fd8,_0x30ed62;const {text:_0xd55881,unitId:_0x42ed27}=_0x1540be,_0x3c9b3e=(_0x30ed62=(_0xd41fd8=_0xd55881[_0x506d55(0x216)])==null?void 0x0:_0xd41fd8[_0x506d55(0x202)](_0x143cba=>_0x143cba[_0x506d55(0x238)]===_0xe13e7a[_0x506d55(0x248)])[_0x506d55(0x230)](_0x155e31=>_0x155e31['rangeId']))!=null?_0x30ed62:[],_0x5ef6ef=JSON['stringify'](_0xd55881),_0x5b6e85=_0x1540be[_0x506d55(0x236)],_0x247a28=_0x1540be['id'],_0x3ce71c={'memberId':(await this[_0x506d55(0x225)][_0x506d55(0x228)](_0x42ed27))['getMemberID'](),'unitId':_0x42ed27,'threadId':_0x5b6e85,'mention':_0x3c9b3e,'content':_0x5ef6ef,'replyId':_0x247a28},_0x3ee3b1=await this[_0x506d55(0x1ee)][_0x506d55(0x1eb)]('/universer-api/comment/unit/'+_0x42ed27+_0x506d55(0x209),{'body':_0x3ce71c});return!_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)]||_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)][_0x506d55(0x24b)]===0x1;}async[_0x15a028(0x22f)](_0x47e431){const _0x1bac14=_0x15a028,{unitId:_0x349677}=_0x47e431,_0x35a8cd=_0x47e431['threadId'],_0xf401f6={'memberId':this[_0x1bac14(0x1f6)][_0x1bac14(0x20f)]()[_0x1bac14(0x21d)],'unitId':_0x349677,'threadId':_0x35a8cd,'solved':_0x47e431[_0x1bac14(0x22a)]?I[_0x1bac14(0x241)]:I[_0x1bac14(0x232)]},_0x10ede0=await this['_httpService'][_0x1bac14(0x1eb)](_0x1bac14(0x246)+_0x349677+_0x1bac14(0x240),{'body':_0xf401f6});return!_0x10ede0[_0x1bac14(0x220)][_0x1bac14(0x217)]||_0x10ede0['body'][_0x1bac14(0x217)]['code']===0x1;}async[_0x15a028(0x23e)](_0x13b291,_0x547e19,_0x24df7a,_0x505396){const _0x34822c=_0x15a028,_0x2bd46c={'memberId':(await this['_sessionService'][_0x34822c(0x228)](_0x13b291))[_0x34822c(0x24c)](),'threadId':_0x24df7a,'replyId':_0x505396,'unitId':_0x13b291},_0x18983b=await this['_httpService'][_0x34822c(0x1eb)](_0x34822c(0x246)+_0x13b291+_0x34822c(0x1f3),{'body':_0x2bd46c});return!_0x18983b['body'][_0x34822c(0x217)]||_0x18983b['body'][_0x34822c(0x217)][_0x34822c(0x24b)]===0x1;}async[_0x15a028(0x21b)](_0x4fb704,_0x55465e,_0x4e6b7d){const _0x44e10c=_0x15a028,_0x451e1f={'unitId':_0x4fb704,'threadId':_0x4e6b7d},_0xaae836=await this[_0x44e10c(0x1ee)][_0x44e10c(0x1eb)](_0x44e10c(0x246)+_0x4fb704+_0x44e10c(0x213),{'body':_0x451e1f}),_0x599682=_0x4e6b7d[_0x44e10c(0x230)](_0x2f8663=>ee(_0xaae836['body'][_0x44e10c(0x226)][_0x2f8663],_0x4fb704,_0x55465e))[_0x44e10c(0x202)](Boolean);return Object[_0x44e10c(0x245)](_0xaae836[_0x44e10c(0x220)][_0x44e10c(0x244)])[_0x44e10c(0x20e)](_0x39fce7=>{const _0x4a95bf=_0x44e10c;this['_userService'][_0x4a95bf(0x239)](_0x39fce7);}),_0x599682;}[_0x15a028(0x1f1)](_0x136eea){const _0x49a926=_0x15a028;return{'id':_0x136eea['id'],'threadId':_0x136eea[_0x49a926(0x236)],'ref':_0x136eea[_0x49a926(0x22c)]};}};f=Q([_(0x0,_0x5cfd2a(_0xeb8e79)),_(0x1,_0x5cfd2a(_0x1f607e)),_(0x2,_0x5cfd2a(_0x8a85c4)),_(0x3,_0x5cfd2a(_0x4e2d06))],f);var re=Object[_0x15a028(0x214)],te=(_0x297f5a,_0x383edc,_0x21f41f,_0x44bff1)=>{const _0x372a4a=_0x15a028;for(var _0x3d0fe6=_0x44bff1>0x1?void 0x0:_0x44bff1?re(_0x383edc,_0x21f41f):_0x383edc,_0x1deb8a=_0x297f5a[_0x372a4a(0x227)]-0x1,_0x5bfacc;_0x1deb8a>=0x0;_0x1deb8a--)(_0x5bfacc=_0x297f5a[_0x1deb8a])&&(_0x3d0fe6=_0x5bfacc(_0x3d0fe6)||_0x3d0fe6);return _0x3d0fe6;},N=(_0x42a13c,_0x5afb17)=>(_0x5991b9,_0x30b8d6)=>_0x5afb17(_0x5991b9,_0x30b8d6,_0x42a13c);let g=class extends _0x4ffcbe{constructor(_0xac065,_0x2d5f9a){const _0x3fc0d7=_0x15a028;super(),this[_0x3fc0d7(0x22b)]=_0xac065,this[_0x3fc0d7(0x1f2)]=_0x2d5f9a,this[_0x3fc0d7(0x23c)]();}[_0x15a028(0x23c)](){const _0x390636=_0x15a028;this['_threadCommentDataSourceService'][_0x390636(0x221)]=this[_0x390636(0x1f2)],this[_0x390636(0x22b)][_0x390636(0x21f)]=!0x1;}};g=te([N(0x0,_0x34f453),N(0x1,_0x5cfd2a(f))],g);var se=Object[_0x15a028(0x223)],oe=Object[_0x15a028(0x214)],ne=(_0x4caba2,_0xf1668f,_0x50b268)=>_0xf1668f in _0x4caba2?se(_0x4caba2,_0xf1668f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50b268}):_0x4caba2[_0xf1668f]=_0x50b268,ie=(_0x4a9327,_0x231092,_0x203039,_0x210d85)=>{const _0x384c27=_0x15a028;for(var _0x4db634=_0x210d85>0x1?void 0x0:_0x210d85?oe(_0x231092,_0x203039):_0x231092,_0x4c5760=_0x4a9327[_0x384c27(0x227)]-0x1,_0x41b266;_0x4c5760>=0x0;_0x4c5760--)(_0x41b266=_0x4a9327[_0x4c5760])&&(_0x4db634=_0x41b266(_0x4db634)||_0x4db634);return _0x4db634;},w=(_0x51bf6b,_0x359e15)=>(_0x2a48bf,_0x4f82e9)=>_0x359e15(_0x2a48bf,_0x4f82e9,_0x51bf6b),$=(_0x36deb2,_0x4a3c14,_0x54282c)=>ne(_0x36deb2,typeof _0x4a3c14!=_0x15a028(0x1ea)?_0x4a3c14+'':_0x4a3c14,_0x54282c);let b=class extends _0x46fc63{constructor(_0x208264=M,_0x383125,_0x12c1ee){const _0x5e708c=_0x15a028;super(),this[_0x5e708c(0x1ec)]=_0x208264,this[_0x5e708c(0x206)]=_0x383125,this[_0x5e708c(0x237)]=_0x12c1ee;const {..._0x204bc9}=_0x5609b0({},M,this[_0x5e708c(0x1ec)]);this[_0x5e708c(0x237)]['setConfig'](z,_0x204bc9);}[_0x15a028(0x1fc)](){const _0x343e31=_0x15a028;[[f],[g],[S]][_0x343e31(0x20e)](_0x17c3fb=>{const _0x3b3475=_0x343e31;this[_0x3b3475(0x206)]['add'](_0x17c3fb);});}['onReady'](){const _0x555ca7=_0x15a028;this[_0x555ca7(0x206)]['get'](g),this[_0x555ca7(0x206)][_0x555ca7(0x222)](S);}};$(b,'pluginName',W),$(b,_0x15a028(0x229),_0x4632e5[_0x15a028(0x200)]),b=ie([_0x3b7993(_0x3dd618,_0x267342,_0x1782a3),w(0x1,_0x5cfd2a(_0x4e2d06)),w(0x2,_0x58de89)],b);function _0x3d91(){const _0x2a5ca8=['60XKBcEi','_httpService','6312770ThZRQA','format','saveCommentToSnapshot','_threadCommentDataSource','/delete','user','replies','_userService','Unknown','unitId','replyId','userId','30147620cxmuVf','onStarting','6102KmNmPP','reply','6702282XfFiIl','UNIVER_UNKNOWN','/reply','filter','2MqYPUF','Solve','_threadCommentModel','_injector','getComment','YYYY/MM/DD\x20HH:mm','/edit','disposeWithMe','_init','add','solved','forEach','getCurrentUser','root','commentUpdate$','comment','/list','getOwnPropertyDescriptor','content','customRanges','error','Reply','find','getUnit','listComments','addComment','userID','6128nhZOdV','syncUpdateMutationToColla','body','dataSource','get','defineProperty','UNRECOGNIZED','_sessionService','comments','length','requireSession','type','resolved','_threadCommentDataSourceService','ref','_initUserSync','parse','resolveComment','map','/universer-api/user/list','OpenOrReOpen','Delete','1138032zoXGOq','thread-comment-data-source.config','threadId','_configService','rangeType','addUser','stringify','Edit','_initDataSource','getUser','deleteComment','updateComment','/solved','Solved','delete','createTimestamp','users','values','/universer-api/comment/unit/','Add','COMMENT','rangeId','_commentService','code','getMemberID','size','185937OQYARM','188291ezGVyn','subscribe','symbol','post','_config'];_0x3d91=function(){return _0x2a5ca8;};return _0x3d91();}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x315572=_0x2001;(function(_0x1b0c2d,_0x1cca45){const _0x41fe69=_0x2001,_0x2303b2=_0x1b0c2d();while(!![]){try{const _0x28e32a=parseInt(_0x41fe69(0x10e))/0x1*(parseInt(_0x41fe69(0xe8))/0x2)+-parseInt(_0x41fe69(0x14c))/0x3+-parseInt(_0x41fe69(0x14e))/0x4*(parseInt(_0x41fe69(0xe6))/0x5)+-parseInt(_0x41fe69(0x111))/0x6+parseInt(_0x41fe69(0x129))/0x7*(parseInt(_0x41fe69(0x140))/0x8)+-parseInt(_0x41fe69(0xf0))/0x9*(parseInt(_0x41fe69(0xf3))/0xa)+parseInt(_0x41fe69(0x10b))/0xb*(parseInt(_0x41fe69(0xfc))/0xc);if(_0x28e32a===_0x1cca45)break;else _0x2303b2['push'](_0x2303b2['shift']());}catch(_0xabddd4){_0x2303b2['push'](_0x2303b2['shift']());}}}(_0x4a3d,0x3d129));import{CommentService as _0xf55148,CollaborationSessionService as _0x3367e2,UniverCollaborationClientPlugin as _0xbc1850}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5c6876}from'@univerjs-pro/license';import{dayjs as _0x208de3,UserManagerService as _0x4b5ea8,Inject as _0x240b39,Injector as _0x8b9753,Disposable as _0x5145d0,CustomRangeType as _0x5cf3b6,UniverInstanceType as _0x1a1c01,DependentOn as _0x1c769b,IConfigService as _0x9dd781,Plugin as _0x336e2b,merge as _0x1497a9}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1b820e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x43e662,IThreadCommentDataSourceService as _0xba9def}from'@univerjs/thread-comment';import{bufferTime as _0x1ade61}from'rxjs';function _0x2001(_0x4972d1,_0x402487){const _0x4a3de2=_0x4a3d();return _0x2001=function(_0x20011e,_0x5b4cf3){_0x20011e=_0x20011e-0xe6;let _0x40ef97=_0x4a3de2[_0x20011e];return _0x40ef97;},_0x2001(_0x4972d1,_0x402487);}import{HTTPService as _0x56f64f}from'@univerjs/network';const W=_0x315572(0x126);var I=(_0x6c0efa=>(_0x6c0efa[_0x6c0efa[_0x315572(0x10d)]=0x0]=_0x315572(0x10d),_0x6c0efa[_0x6c0efa[_0x315572(0x153)]=0x1]='Solved',_0x6c0efa[_0x6c0efa[_0x315572(0x148)]=-0x1]=_0x315572(0x148),_0x6c0efa))(I||{}),v=(_0x18d274=>(_0x18d274[_0x18d274[_0x315572(0x11b)]=0x0]=_0x315572(0x11b),_0x18d274[_0x18d274['Add']=0x1]=_0x315572(0x11e),_0x18d274[_0x18d274['Reply']=0x2]=_0x315572(0x13c),_0x18d274[_0x18d274[_0x315572(0x105)]=0x3]=_0x315572(0x105),_0x18d274[_0x18d274[_0x315572(0x14f)]=0x4]=_0x315572(0x14f),_0x18d274[_0x18d274[_0x315572(0x14d)]=0x5]=_0x315572(0x14d),_0x18d274[_0x18d274[_0x315572(0x148)]=-0x1]='UNRECOGNIZED',_0x18d274))(v||{});const D=_0x202c35=>_0x208de3(new Date(+_0x202c35))[_0x315572(0x118)](_0x315572(0x12f)),B=async(_0xd9d44b,_0x14a0ba)=>{const _0x988dd=_0x315572,_0x2876b1=_0xd9d44b[_0x988dd(0x10f)](_0x4b5ea8),_0x1b1ebb=_0xd9d44b[_0x988dd(0x10f)](_0x56f64f);_0x14a0ba[_0x988dd(0x13d)](_0x1f84ca=>{const _0x503569=_0x988dd;_0x2876b1['getUser'](_0x1f84ca)&&_0x14a0ba[_0x503569(0xf6)](_0x1f84ca);}),_0x14a0ba[_0x988dd(0xef)]&&(await _0x1b1ebb[_0x988dd(0x10f)](_0x988dd(0x13f),{'params':{'userIDs':[..._0x14a0ba]}}))[_0x988dd(0xf1)][_0x988dd(0x137)][_0x988dd(0x13d)](_0x549f05=>{const _0x572399=_0x988dd;_0x549f05&&_0x2876b1[_0x572399(0x139)](_0x549f05);});};var K=Object[_0x315572(0xf4)],V=(_0x5c598e,_0x573425,_0x13ab72,_0x407e73)=>{const _0x4d022b=_0x315572;for(var _0x59262d=_0x407e73>0x1?void 0x0:_0x407e73?K(_0x573425,_0x13ab72):_0x573425,_0x4cd28f=_0x5c598e[_0x4d022b(0x103)]-0x1,_0x177462;_0x4cd28f>=0x0;_0x4cd28f--)(_0x177462=_0x5c598e[_0x4cd28f])&&(_0x59262d=_0x177462(_0x59262d)||_0x59262d);return _0x59262d;},p=(_0x3e833a,_0x376724)=>(_0x3a19c2,_0x436870)=>_0x376724(_0x3a19c2,_0x436870,_0x3e833a);let S=class extends _0x5145d0{constructor(_0x114727,_0xead3d8,_0x393b55,_0x1fa4f1){const _0x290cda=_0x315572;super(),this[_0x290cda(0x149)]=_0x114727,this[_0x290cda(0x146)]=_0xead3d8,this[_0x290cda(0x128)]=_0x393b55,this[_0x290cda(0x132)]=_0x1fa4f1,this['_init'](),this[_0x290cda(0x114)]();}[_0x315572(0x114)](){const _0x34eeb5=_0x315572;this[_0x34eeb5(0x11c)](this[_0x34eeb5(0x146)]['commentUpdate$'][_0x34eeb5(0x13e)](_0x1ade61(0x10))[_0x34eeb5(0xe7)](_0x3b686b=>{const _0x496125=_0x34eeb5,_0x266165=new Set();_0x3b686b[_0x496125(0x13d)](_0x4a3d59=>{const _0x3a1f57=_0x496125;switch(_0x4a3d59[_0x3a1f57(0x12c)]){case _0x3a1f57(0x131):{const _0x4d88cf=_0x4a3d59['payload'][_0x3a1f57(0x130)];_0x266165[_0x3a1f57(0x131)](_0x4d88cf);break;}}}),B(this[_0x496125(0x132)],_0x266165);}));}[_0x315572(0xe9)](){const _0x90656e=_0x315572;this[_0x90656e(0x11c)](this[_0x90656e(0x149)][_0x90656e(0xec)][_0x90656e(0xe7)](async _0x12d3c1=>{const _0x5ed802=_0x90656e;var _0x3c0728,_0x555bb7,_0x1144a0,_0x364a79;const _0x31ed20=(_0x3c0728=this[_0x5ed802(0x146)]['getUnit'](_0x12d3c1[_0x5ed802(0x13a)])['find'](_0x565297=>_0x565297[_0x5ed802(0x10c)]===_0x12d3c1['threadId']))==null?void 0x0:_0x3c0728['root'];if(!_0x31ed20)return;const {unitId:_0x3ac16f,subUnitId:_0x46b49c}=_0x31ed20;switch(_0x12d3c1['user']&&this['_userService']['addUser'](_0x12d3c1[_0x5ed802(0xf5)]),_0x12d3c1[_0x5ed802(0x12c)]){case v[_0x5ed802(0x11e)]:break;case v['Reply']:{this[_0x5ed802(0x146)][_0x5ed802(0xfa)](_0x3ac16f,_0x46b49c,{'unitId':_0x3ac16f,'subUnitId':_0x46b49c,'ref':'','id':_0x12d3c1[_0x5ed802(0xf7)],'dT':D(+_0x12d3c1[_0x5ed802(0x11d)]),'threadId':_0x12d3c1[_0x5ed802(0x10c)],'personId':(_0x1144a0=(_0x555bb7=_0x12d3c1[_0x5ed802(0xf5)])==null?void 0x0:_0x555bb7[_0x5ed802(0x119)])!=null?_0x1144a0:_0x12d3c1[_0x5ed802(0x110)],'text':JSON[_0x5ed802(0x135)](_0x12d3c1[_0x5ed802(0x152)]),'parentId':_0x31ed20['id']});break;}case v[_0x5ed802(0x14f)]:{const _0x3a9ef0=this[_0x5ed802(0x146)][_0x5ed802(0x100)](_0x3ac16f,_0x46b49c,_0x12d3c1[_0x5ed802(0xf7)]);_0x3a9ef0&&_0x3a9ef0[_0x5ed802(0x122)]&&this[_0x5ed802(0x146)][_0x5ed802(0x142)](_0x3ac16f,_0x46b49c,_0x12d3c1[_0x5ed802(0xf7)]);break;}case v['Edit']:{this['_threadCommentModel'][_0x5ed802(0xee)](_0x3ac16f,_0x46b49c,{'commentId':_0x12d3c1[_0x5ed802(0xf7)],'text':JSON[_0x5ed802(0x135)](_0x12d3c1[_0x5ed802(0x152)])});break;}case v[_0x5ed802(0x14d)]:{const _0xb0d951=(_0x364a79=this[_0x5ed802(0x146)][_0x5ed802(0x107)](_0x12d3c1[_0x5ed802(0x13a)])[_0x5ed802(0x143)](_0xd3f8f=>_0xd3f8f[_0x5ed802(0x10c)]===_0x12d3c1[_0x5ed802(0x10c)]))==null?void 0x0:_0x364a79[_0x5ed802(0x101)];_0xb0d951&&this[_0x5ed802(0x146)][_0x5ed802(0x12a)](_0x3ac16f,_0x46b49c,_0xb0d951['id'],_0x12d3c1[_0x5ed802(0x144)]===I[_0x5ed802(0x153)]);break;}}}));}};S=V([p(0x0,_0x240b39(_0xf55148)),p(0x1,_0x240b39(_0x43e662)),p(0x2,_0x240b39(_0x4b5ea8)),p(0x3,_0x240b39(_0x8b9753))],S);const z=_0x315572(0x141),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x5396b9,_0x504daa,_0x656df,_0x148842)=>{const _0x5890de=_0x315572;for(var _0x8abd7a=_0x148842>0x1?void 0x0:_0x148842?k(_0x504daa,_0x656df):_0x504daa,_0x17acd0=_0x5396b9[_0x5890de(0x103)]-0x1,_0x888dd3;_0x17acd0>=0x0;_0x17acd0--)(_0x888dd3=_0x5396b9[_0x17acd0])&&(_0x8abd7a=_0x888dd3(_0x8abd7a)||_0x8abd7a);return _0x8abd7a;},_=(_0x4718b4,_0x332c00)=>(_0x3ac36e,_0x171bb2)=>_0x332c00(_0x3ac36e,_0x171bb2,_0x4718b4);function X(_0x2229ff,_0x45240a){const _0x4c2e08=_0x315572,_0x2cb1b4=_0x2229ff[_0x4c2e08(0x123)][0x0];return{..._0x45240a,'id':_0x2cb1b4[_0x4c2e08(0xf7)],'resolved':_0x2229ff[_0x4c2e08(0x144)]===0x1,'dT':D(_0x2cb1b4['createTimestamp']),'personId':_0x2cb1b4['userId'],'threadId':_0x2cb1b4['threadId']};}function ee(_0x2c0425,_0x224b9b,_0x330826){const _0x387137=_0x315572;var _0x14f0cd,_0x55c62a;if(((_0x55c62a=(_0x14f0cd=_0x2c0425==null?void 0x0:_0x2c0425[_0x387137(0x123)])==null?void 0x0:_0x14f0cd[_0x387137(0x103)])!=null?_0x55c62a:0x0)>0x0){const _0x3c43f2=(_0x34b245,_0x472142)=>({'id':_0x34b245[_0x387137(0xf7)],'threadId':_0x34b245[_0x387137(0x10c)],'dT':D(_0x34b245[_0x387137(0x11d)]),'personId':_0x34b245[_0x387137(0x110)],'resolved':_0x2c0425['solved']===I[_0x387137(0x153)],'unitId':_0x224b9b,'subUnitId':_0x330826,'text':JSON[_0x387137(0x135)](_0x34b245[_0x387137(0x152)]),'parentId':_0x472142}),_0x29b2e3=_0x3c43f2(_0x2c0425[_0x387137(0x123)][0x0]);return{..._0x29b2e3,'children':_0x2c0425[_0x387137(0x123)]['slice'](0x1)[_0x387137(0xeb)](_0x52e60d=>_0x3c43f2(_0x52e60d,_0x29b2e3['id']))};}return null;}let f=class{constructor(_0x1d1cf8,_0x5af46d,_0x38bc1c,_0x182f22){const _0x518529=_0x315572;this[_0x518529(0x109)]=_0x1d1cf8,this[_0x518529(0x128)]=_0x5af46d,this[_0x518529(0x138)]=_0x38bc1c,this[_0x518529(0x132)]=_0x182f22;}async[_0x315572(0xfa)](_0x43d195){const _0x674dca=_0x315572;var _0x44d0b0,_0x222111;const {parentId:_0x1f984a,unitId:_0x184195,text:_0xf7392b,threadId:_0x5ab09d}=_0x43d195,_0x2dfb29=(_0x222111=(_0x44d0b0=_0xf7392b[_0x674dca(0x151)])==null?void 0x0:_0x44d0b0['filter'](_0x4fb584=>_0x4fb584[_0x674dca(0x121)]===_0x5cf3b6[_0x674dca(0x117)])[_0x674dca(0xeb)](_0x22a0bc=>_0x22a0bc['rangeId']))!=null?_0x222111:[],_0x481b44=JSON[_0x674dca(0x147)](_0xf7392b),_0x594a79=(await this[_0x674dca(0x138)][_0x674dca(0xfb)](_0x184195))[_0x674dca(0xff)]();if(_0x1f984a){const _0x449a9f={'memberId':_0x594a79,'unitId':_0x184195,'content':_0x481b44,'mention':_0x2dfb29,'threadId':_0x5ab09d},_0x1012a3=(await this['_httpService']['post'](_0x674dca(0x12e)+_0x184195+_0x674dca(0xed),{'body':_0x449a9f}))['body'][_0x674dca(0xf9)];return{..._0x43d195,'id':_0x1012a3[_0x674dca(0xf7)],'dT':_0x208de3(+_0x1012a3['createTimestamp'])[_0x674dca(0x118)](_0x674dca(0x12f)),'personId':_0x1012a3[_0x674dca(0x110)]};}else{const _0x45b4fd={'memberId':_0x594a79,'unitId':_0x184195,'content':_0x481b44,'mention':_0x2dfb29},_0x512061=await this['_httpService'][_0x674dca(0x104)](_0x674dca(0x12e)+_0x184195+_0x674dca(0x106),{'body':_0x45b4fd});return X(_0x512061['body'][_0x674dca(0x102)],_0x43d195);}}async[_0x315572(0xee)](_0x4c8c54){const _0x49bb2d=_0x315572;var _0x510176,_0x2da60e;const {text:_0x254756,unitId:_0x3ad372}=_0x4c8c54,_0x8d0a48=(_0x2da60e=(_0x510176=_0x254756['customRanges'])==null?void 0x0:_0x510176[_0x49bb2d(0x11a)](_0x1b829a=>_0x1b829a[_0x49bb2d(0x121)]===_0x5cf3b6[_0x49bb2d(0x117)])['map'](_0xf8c20c=>_0xf8c20c[_0x49bb2d(0x116)]))!=null?_0x2da60e:[],_0x83c595=JSON[_0x49bb2d(0x147)](_0x254756),_0x47d378=_0x4c8c54[_0x49bb2d(0x10c)],_0x3443ef=_0x4c8c54['id'],_0x5570fc={'memberId':(await this[_0x49bb2d(0x138)][_0x49bb2d(0xfb)](_0x3ad372))[_0x49bb2d(0xff)](),'unitId':_0x3ad372,'threadId':_0x47d378,'mention':_0x8d0a48,'content':_0x83c595,'replyId':_0x3443ef},_0x2a52a7=await this['_httpService'][_0x49bb2d(0x104)](_0x49bb2d(0x12e)+_0x3ad372+_0x49bb2d(0x136),{'body':_0x5570fc});return!_0x2a52a7['body'][_0x49bb2d(0x112)]||_0x2a52a7[_0x49bb2d(0xf1)][_0x49bb2d(0x112)]['code']===0x1;}async[_0x315572(0x12a)](_0x5d8147){const _0x34c0aa=_0x315572,{unitId:_0x22aab8}=_0x5d8147,_0x4a024c=_0x5d8147[_0x34c0aa(0x10c)],_0x3c3dbc={'memberId':this[_0x34c0aa(0x128)][_0x34c0aa(0xfe)]()[_0x34c0aa(0x119)],'unitId':_0x22aab8,'threadId':_0x4a024c,'solved':_0x5d8147[_0x34c0aa(0x108)]?I[_0x34c0aa(0x153)]:I[_0x34c0aa(0x10d)]},_0x1f7682=await this[_0x34c0aa(0x109)]['post'](_0x34c0aa(0x12e)+_0x22aab8+_0x34c0aa(0x120),{'body':_0x3c3dbc});return!_0x1f7682[_0x34c0aa(0xf1)][_0x34c0aa(0x112)]||_0x1f7682[_0x34c0aa(0xf1)]['error']['code']===0x1;}async[_0x315572(0x142)](_0x132408,_0x372f71,_0x36567c,_0x34461b){const _0xb909fe=_0x315572,_0x4817bd={'memberId':(await this['_sessionService'][_0xb909fe(0xfb)](_0x132408))[_0xb909fe(0xff)](),'threadId':_0x36567c,'replyId':_0x34461b,'unitId':_0x132408},_0x476760=await this[_0xb909fe(0x109)]['post']('/universer-api/comment/unit/'+_0x132408+_0xb909fe(0x124),{'body':_0x4817bd});return!_0x476760[_0xb909fe(0xf1)][_0xb909fe(0x112)]||_0x476760[_0xb909fe(0xf1)]['error'][_0xb909fe(0xf2)]===0x1;}async[_0x315572(0x134)](_0x4b307b,_0x51cb17,_0xcb49a2){const _0x3fbca6=_0x315572,_0x5083d7={'unitId':_0x4b307b,'threadId':_0xcb49a2},_0x171631=await this[_0x3fbca6(0x109)][_0x3fbca6(0x104)]('/universer-api/comment/unit/'+_0x4b307b+_0x3fbca6(0x13b),{'body':_0x5083d7}),_0x1c732f=_0xcb49a2[_0x3fbca6(0xeb)](_0x5d2f16=>ee(_0x171631[_0x3fbca6(0xf1)][_0x3fbca6(0x12b)][_0x5d2f16],_0x4b307b,_0x51cb17))['filter'](Boolean);return Object[_0x3fbca6(0x127)](_0x171631[_0x3fbca6(0xf1)][_0x3fbca6(0x137)])[_0x3fbca6(0x13d)](_0x15c81f=>{const _0x4807ad=_0x3fbca6;this['_userService'][_0x4807ad(0x139)](_0x15c81f);}),_0x1c732f;}[_0x315572(0x133)](_0x12cf1b){const _0x8548f6=_0x315572;return{'id':_0x12cf1b['id'],'threadId':_0x12cf1b[_0x8548f6(0x10c)],'ref':_0x12cf1b[_0x8548f6(0x10a)]};}};f=Q([_(0x0,_0x240b39(_0x56f64f)),_(0x1,_0x240b39(_0x4b5ea8)),_(0x2,_0x240b39(_0x3367e2)),_(0x3,_0x240b39(_0x8b9753))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0xd8dc89,_0x4df77b,_0x5d218f,_0xc54fa2)=>{const _0x18a824=_0x315572;for(var _0x3240fe=_0xc54fa2>0x1?void 0x0:_0xc54fa2?re(_0x4df77b,_0x5d218f):_0x4df77b,_0x238e12=_0xd8dc89[_0x18a824(0x103)]-0x1,_0x140bae;_0x238e12>=0x0;_0x238e12--)(_0x140bae=_0xd8dc89[_0x238e12])&&(_0x3240fe=_0x140bae(_0x3240fe)||_0x3240fe);return _0x3240fe;},N=(_0x5d9db2,_0x2f9fd1)=>(_0xdeadbe,_0x2733c0)=>_0x2f9fd1(_0xdeadbe,_0x2733c0,_0x5d9db2);let g=class extends _0x5145d0{constructor(_0x23724d,_0x481987){const _0x593a73=_0x315572;super(),this[_0x593a73(0x11f)]=_0x23724d,this[_0x593a73(0xf8)]=_0x481987,this['_initDataSource']();}[_0x315572(0x14b)](){const _0x37f685=_0x315572;this[_0x37f685(0x11f)][_0x37f685(0x125)]=this[_0x37f685(0xf8)],this[_0x37f685(0x11f)][_0x37f685(0x113)]=!0x1;}};g=te([N(0x0,_0xba9def),N(0x1,_0x240b39(f))],g);function _0x4a3d(){const _0x22c5db=['_userService','1351qDNqpd','resolveComment','comments','type','defineProperty','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','personId','add','_injector','saveCommentToSnapshot','listComments','parse','/edit','users','_sessionService','addUser','unitId','/list','Reply','forEach','pipe','/universer-api/user/list','12304vFGZSS','thread-comment-data-source.config','deleteComment','find','solved','UNIVER_UNKNOWN','_threadCommentModel','stringify','UNRECOGNIZED','_commentService','symbol','_initDataSource','295461mRBhSn','Solve','8qgJhpM','Delete','_configService','customRanges','content','Solved','141460VyBijZ','subscribe','10JMkxlc','_init','onReady','map','commentUpdate$','/reply','updateComment','size','50454lNjRZW','body','code','260CmuQjn','getOwnPropertyDescriptor','user','delete','replyId','_threadCommentDataSource','reply','addComment','requireSession','84aIOwNi','pluginName','getCurrentUser','getMemberID','getComment','root','comment','length','post','Edit','/add','getUnit','resolved','_httpService','ref','260601umePPe','threadId','OpenOrReOpen','42412cMeuJL','get','userId','742506EWntOi','error','syncUpdateMutationToColla','_initUserSync','_config','rangeId','COMMENT','format','userID','filter','Unknown','disposeWithMe','createTimestamp','Add','_threadCommentDataSourceService','/solved','rangeType','parentId','replies','/delete','dataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values'];_0x4a3d=function(){return _0x22c5db;};return _0x4a3d();}var se=Object[_0x315572(0x12d)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x4f258b,_0x2db574,_0x1f2589)=>_0x2db574 in _0x4f258b?se(_0x4f258b,_0x2db574,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1f2589}):_0x4f258b[_0x2db574]=_0x1f2589,ie=(_0x1b3d42,_0x550c18,_0x2fd444,_0x51ac8c)=>{const _0x300c01=_0x315572;for(var _0xb07419=_0x51ac8c>0x1?void 0x0:_0x51ac8c?oe(_0x550c18,_0x2fd444):_0x550c18,_0x159aa9=_0x1b3d42[_0x300c01(0x103)]-0x1,_0x20bd06;_0x159aa9>=0x0;_0x159aa9--)(_0x20bd06=_0x1b3d42[_0x159aa9])&&(_0xb07419=_0x20bd06(_0xb07419)||_0xb07419);return _0xb07419;},w=(_0x317a0e,_0x4ada00)=>(_0x40b202,_0x464d42)=>_0x4ada00(_0x40b202,_0x464d42,_0x317a0e),$=(_0x4d5675,_0x45bc98,_0x4507ef)=>ne(_0x4d5675,typeof _0x45bc98!=_0x315572(0x14a)?_0x45bc98+'':_0x45bc98,_0x4507ef);let b=class extends _0x336e2b{constructor(_0x3c00e5=M,_0x7b54fa,_0x4d6d62){const _0x20dab2=_0x315572;super(),this[_0x20dab2(0x115)]=_0x3c00e5,this[_0x20dab2(0x132)]=_0x7b54fa,this['_configService']=_0x4d6d62;const {..._0x118b97}=_0x1497a9({},M,this[_0x20dab2(0x115)]);this[_0x20dab2(0x150)]['setConfig'](z,_0x118b97);}['onStarting'](){const _0x202919=_0x315572;[[f],[g],[S]][_0x202919(0x13d)](_0x572104=>{const _0x371670=_0x202919;this[_0x371670(0x132)][_0x371670(0x131)](_0x572104);});}[_0x315572(0xea)](){const _0x1f56c7=_0x315572;this['_injector'][_0x1f56c7(0x10f)](g),this['_injector'][_0x1f56c7(0x10f)](S);}};$(b,_0x315572(0xfd),W),$(b,_0x315572(0x12c),_0x1a1c01[_0x315572(0x145)]),b=ie([_0x1c769b(_0x1b820e,_0xbc1850,_0x5c6876),w(0x1,_0x240b39(_0x8b9753)),w(0x2,_0x9dd781)],b);export{b as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x15a028=_0x6018;(function(_0x344545,_0x54bf3c){const _0x5091a7=_0x6018,_0x3c2b54=_0x344545();while(!![]){try{const _0x109cc9=-parseInt(_0x5091a7(0x1e8))/0x1*(-parseInt(_0x5091a7(0x203))/0x2)+-parseInt(_0x5091a7(0x24e))/0x3*(-parseInt(_0x5091a7(0x1ed))/0x4)+parseInt(_0x5091a7(0x1ef))/0x5+parseInt(_0x5091a7(0x1ff))/0x6+-parseInt(_0x5091a7(0x234))/0x7+parseInt(_0x5091a7(0x21e))/0x8*(parseInt(_0x5091a7(0x1fd))/0x9)+-parseInt(_0x5091a7(0x1fb))/0xa;if(_0x109cc9===_0x54bf3c)break;else _0x3c2b54['push'](_0x3c2b54['shift']());}catch(_0x3da37d){_0x3c2b54['push'](_0x3c2b54['shift']());}}}(_0x3d91,0xccfa3));import{CommentService as _0x253c4f,CollaborationSessionService as _0x8a85c4,UniverCollaborationClientPlugin as _0x267342}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1782a3}from'@univerjs-pro/license';import{dayjs as _0x35743c,UserManagerService as _0x1f607e,Inject as _0x5cfd2a,Injector as _0x4e2d06,Disposable as _0x4ffcbe,CustomRangeType as _0xe13e7a,UniverInstanceType as _0x4632e5,DependentOn as _0x3b7993,IConfigService as _0x58de89,Plugin as _0x46fc63,merge as _0x5609b0}from'@univerjs/core';function _0x6018(_0x1bc6fa,_0x1311fc){const _0x3d917a=_0x3d91();return _0x6018=function(_0x6018a5,_0x5eff06){_0x6018a5=_0x6018a5-0x1e8;let _0x1b0f32=_0x3d917a[_0x6018a5];return _0x1b0f32;},_0x6018(_0x1bc6fa,_0x1311fc);}import{UniverThreadCommentUIPlugin as _0x3dd618}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48a5cd,IThreadCommentDataSourceService as _0x34f453}from'@univerjs/thread-comment';import{bufferTime as _0x4ff96d}from'rxjs';import{HTTPService as _0xeb8e79}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x532dc6=>(_0x532dc6[_0x532dc6[_0x15a028(0x232)]=0x0]=_0x15a028(0x232),_0x532dc6[_0x532dc6[_0x15a028(0x241)]=0x1]=_0x15a028(0x241),_0x532dc6[_0x532dc6[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x532dc6))(I||{}),v=(_0x50ff93=>(_0x50ff93[_0x50ff93['Unknown']=0x0]=_0x15a028(0x1f7),_0x50ff93[_0x50ff93[_0x15a028(0x247)]=0x1]='Add',_0x50ff93[_0x50ff93[_0x15a028(0x218)]=0x2]=_0x15a028(0x218),_0x50ff93[_0x50ff93[_0x15a028(0x23b)]=0x3]=_0x15a028(0x23b),_0x50ff93[_0x50ff93['Delete']=0x4]='Delete',_0x50ff93[_0x50ff93[_0x15a028(0x204)]=0x5]=_0x15a028(0x204),_0x50ff93[_0x50ff93[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x50ff93))(v||{});const D=_0x122c5b=>_0x35743c(new Date(+_0x122c5b))[_0x15a028(0x1f0)](_0x15a028(0x208)),B=async(_0x37953a,_0x25e775)=>{const _0x139966=_0x15a028,_0x428f4c=_0x37953a[_0x139966(0x222)](_0x1f607e),_0x1dc018=_0x37953a[_0x139966(0x222)](_0xeb8e79);_0x25e775[_0x139966(0x20e)](_0x5b11fe=>{const _0x4a3b7b=_0x139966;_0x428f4c[_0x4a3b7b(0x23d)](_0x5b11fe)&&_0x25e775[_0x4a3b7b(0x242)](_0x5b11fe);}),_0x25e775[_0x139966(0x24d)]&&(await _0x1dc018['get'](_0x139966(0x231),{'params':{'userIDs':[..._0x25e775]}}))[_0x139966(0x220)][_0x139966(0x244)][_0x139966(0x20e)](_0x257f4d=>{const _0x1d2422=_0x139966;_0x257f4d&&_0x428f4c[_0x1d2422(0x239)](_0x257f4d);});};var K=Object[_0x15a028(0x214)],V=(_0x134347,_0x3af775,_0x2bc25b,_0x45798d)=>{for(var _0x47ea62=_0x45798d>0x1?void 0x0:_0x45798d?K(_0x3af775,_0x2bc25b):_0x3af775,_0x1dd33e=_0x134347['length']-0x1,_0x35c777;_0x1dd33e>=0x0;_0x1dd33e--)(_0x35c777=_0x134347[_0x1dd33e])&&(_0x47ea62=_0x35c777(_0x47ea62)||_0x47ea62);return _0x47ea62;},p=(_0x494ebc,_0x526f45)=>(_0x2ac6f2,_0x3c4ff4)=>_0x526f45(_0x2ac6f2,_0x3c4ff4,_0x494ebc);let S=class extends _0x4ffcbe{constructor(_0x452dcd,_0x4e478b,_0x24a489,_0x4f790c){const _0x260497=_0x15a028;super(),this[_0x260497(0x24a)]=_0x452dcd,this[_0x260497(0x205)]=_0x4e478b,this[_0x260497(0x1f6)]=_0x24a489,this[_0x260497(0x206)]=_0x4f790c,this[_0x260497(0x20b)](),this[_0x260497(0x22d)]();}[_0x15a028(0x22d)](){const _0xb98b1f=_0x15a028;this[_0xb98b1f(0x20a)](this['_threadCommentModel'][_0xb98b1f(0x211)]['pipe'](_0x4ff96d(0x10))[_0xb98b1f(0x1e9)](_0x319130=>{const _0x5b53a8=_0xb98b1f,_0x14fbde=new Set();_0x319130['forEach'](_0x4c6202=>{const _0x4a39e3=_0x6018;switch(_0x4c6202[_0x4a39e3(0x229)]){case'add':{const _0x2bf500=_0x4c6202['payload']['personId'];_0x14fbde[_0x4a39e3(0x20c)](_0x2bf500);break;}}}),B(this[_0x5b53a8(0x206)],_0x14fbde);}));}[_0x15a028(0x20b)](){const _0x1db84e=_0x15a028;this[_0x1db84e(0x20a)](this['_commentService'][_0x1db84e(0x211)][_0x1db84e(0x1e9)](async _0x21a53e=>{const _0x4f62eb=_0x1db84e;var _0x4094ea,_0x4359e3,_0x24c7e1,_0x47c369;const _0x558fdc=(_0x4094ea=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])[_0x4f62eb(0x219)](_0xab5002=>_0xab5002[_0x4f62eb(0x236)]===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x4094ea['root'];if(!_0x558fdc)return;const {unitId:_0x3223c3,subUnitId:_0x38affb}=_0x558fdc;switch(_0x21a53e[_0x4f62eb(0x1f4)]&&this[_0x4f62eb(0x1f6)][_0x4f62eb(0x239)](_0x21a53e['user']),_0x21a53e['type']){case v[_0x4f62eb(0x247)]:break;case v[_0x4f62eb(0x218)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x21c)](_0x3223c3,_0x38affb,{'unitId':_0x3223c3,'subUnitId':_0x38affb,'ref':'','id':_0x21a53e[_0x4f62eb(0x1f9)],'dT':D(+_0x21a53e[_0x4f62eb(0x243)]),'threadId':_0x21a53e['threadId'],'personId':(_0x24c7e1=(_0x4359e3=_0x21a53e[_0x4f62eb(0x1f4)])==null?void 0x0:_0x4359e3[_0x4f62eb(0x21d)])!=null?_0x24c7e1:_0x21a53e[_0x4f62eb(0x1fa)],'text':JSON[_0x4f62eb(0x22e)](_0x21a53e[_0x4f62eb(0x215)]),'parentId':_0x558fdc['id']});break;}case v[_0x4f62eb(0x233)]:{const _0x1768b8=this[_0x4f62eb(0x205)][_0x4f62eb(0x207)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);_0x1768b8&&_0x1768b8['parentId']&&this[_0x4f62eb(0x205)][_0x4f62eb(0x23e)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);break;}case v[_0x4f62eb(0x23b)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x23f)](_0x3223c3,_0x38affb,{'commentId':_0x21a53e[_0x4f62eb(0x1f9)],'text':JSON['parse'](_0x21a53e[_0x4f62eb(0x215)])});break;}case v[_0x4f62eb(0x204)]:{const _0x262cca=(_0x47c369=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])['find'](_0x210123=>_0x210123['threadId']===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x47c369[_0x4f62eb(0x210)];_0x262cca&&this[_0x4f62eb(0x205)][_0x4f62eb(0x22f)](_0x3223c3,_0x38affb,_0x262cca['id'],_0x21a53e['solved']===I[_0x4f62eb(0x241)]);break;}}}));}};S=V([p(0x0,_0x5cfd2a(_0x253c4f)),p(0x1,_0x5cfd2a(_0x48a5cd)),p(0x2,_0x5cfd2a(_0x1f607e)),p(0x3,_0x5cfd2a(_0x4e2d06))],S);const z=_0x15a028(0x235),M={};var k=Object[_0x15a028(0x214)],Q=(_0x2dc919,_0x595483,_0x31b92e,_0x39ee5d)=>{const _0xa8dd0b=_0x15a028;for(var _0x37271b=_0x39ee5d>0x1?void 0x0:_0x39ee5d?k(_0x595483,_0x31b92e):_0x595483,_0x5dd6fe=_0x2dc919[_0xa8dd0b(0x227)]-0x1,_0x2623ad;_0x5dd6fe>=0x0;_0x5dd6fe--)(_0x2623ad=_0x2dc919[_0x5dd6fe])&&(_0x37271b=_0x2623ad(_0x37271b)||_0x37271b);return _0x37271b;},_=(_0x1a1b32,_0x45abf3)=>(_0x5d4e69,_0x58729a)=>_0x45abf3(_0x5d4e69,_0x58729a,_0x1a1b32);function X(_0x2471bc,_0xa5d22e){const _0x3cd42b=_0x15a028,_0x571d38=_0x2471bc[_0x3cd42b(0x1f5)][0x0];return{..._0xa5d22e,'id':_0x571d38[_0x3cd42b(0x1f9)],'resolved':_0x2471bc[_0x3cd42b(0x20d)]===0x1,'dT':D(_0x571d38[_0x3cd42b(0x243)]),'personId':_0x571d38[_0x3cd42b(0x1fa)],'threadId':_0x571d38[_0x3cd42b(0x236)]};}function ee(_0x3d672b,_0x29dee3,_0x281431){const _0xfa2551=_0x15a028;var _0x29f862,_0x5a473d;if(((_0x5a473d=(_0x29f862=_0x3d672b==null?void 0x0:_0x3d672b[_0xfa2551(0x1f5)])==null?void 0x0:_0x29f862[_0xfa2551(0x227)])!=null?_0x5a473d:0x0)>0x0){const _0x33acaa=(_0x5f3be4,_0x501372)=>({'id':_0x5f3be4[_0xfa2551(0x1f9)],'threadId':_0x5f3be4[_0xfa2551(0x236)],'dT':D(_0x5f3be4['createTimestamp']),'personId':_0x5f3be4[_0xfa2551(0x1fa)],'resolved':_0x3d672b[_0xfa2551(0x20d)]===I[_0xfa2551(0x241)],'unitId':_0x29dee3,'subUnitId':_0x281431,'text':JSON[_0xfa2551(0x22e)](_0x5f3be4[_0xfa2551(0x215)]),'parentId':_0x501372}),_0x2593e7=_0x33acaa(_0x3d672b[_0xfa2551(0x1f5)][0x0]);return{..._0x2593e7,'children':_0x3d672b[_0xfa2551(0x1f5)]['slice'](0x1)[_0xfa2551(0x230)](_0x15c981=>_0x33acaa(_0x15c981,_0x2593e7['id']))};}return null;}let f=class{constructor(_0x46a7b0,_0x4cf54d,_0x4d1150,_0x3e173f){const _0x1096e3=_0x15a028;this['_httpService']=_0x46a7b0,this[_0x1096e3(0x1f6)]=_0x4cf54d,this[_0x1096e3(0x225)]=_0x4d1150,this['_injector']=_0x3e173f;}async[_0x15a028(0x21c)](_0x1e62d1){const _0x2bc2a2=_0x15a028;var _0x4a6d9c,_0x58cd3f;const {parentId:_0x56762d,unitId:_0x3d17cd,text:_0x32e94d,threadId:_0x1b8ef0}=_0x1e62d1,_0x275e47=(_0x58cd3f=(_0x4a6d9c=_0x32e94d[_0x2bc2a2(0x216)])==null?void 0x0:_0x4a6d9c[_0x2bc2a2(0x202)](_0x142278=>_0x142278[_0x2bc2a2(0x238)]===_0xe13e7a[_0x2bc2a2(0x248)])[_0x2bc2a2(0x230)](_0xbe00bd=>_0xbe00bd[_0x2bc2a2(0x249)]))!=null?_0x58cd3f:[],_0x470e43=JSON[_0x2bc2a2(0x23a)](_0x32e94d),_0x4cdfa5=(await this[_0x2bc2a2(0x225)][_0x2bc2a2(0x228)](_0x3d17cd))['getMemberID']();if(_0x56762d){const _0x5c4a95={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47,'threadId':_0x1b8ef0},_0x162044=(await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)]('/universer-api/comment/unit/'+_0x3d17cd+_0x2bc2a2(0x201),{'body':_0x5c4a95}))[_0x2bc2a2(0x220)][_0x2bc2a2(0x1fe)];return{..._0x1e62d1,'id':_0x162044[_0x2bc2a2(0x1f9)],'dT':_0x35743c(+_0x162044[_0x2bc2a2(0x243)])['format'](_0x2bc2a2(0x208)),'personId':_0x162044[_0x2bc2a2(0x1fa)]};}else{const _0x3e9f6d={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47},_0x40cf21=await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)](_0x2bc2a2(0x246)+_0x3d17cd+'/add',{'body':_0x3e9f6d});return X(_0x40cf21['body'][_0x2bc2a2(0x212)],_0x1e62d1);}}async['updateComment'](_0x1540be){const _0x506d55=_0x15a028;var _0xd41fd8,_0x30ed62;const {text:_0xd55881,unitId:_0x42ed27}=_0x1540be,_0x3c9b3e=(_0x30ed62=(_0xd41fd8=_0xd55881[_0x506d55(0x216)])==null?void 0x0:_0xd41fd8[_0x506d55(0x202)](_0x143cba=>_0x143cba[_0x506d55(0x238)]===_0xe13e7a[_0x506d55(0x248)])[_0x506d55(0x230)](_0x155e31=>_0x155e31['rangeId']))!=null?_0x30ed62:[],_0x5ef6ef=JSON['stringify'](_0xd55881),_0x5b6e85=_0x1540be[_0x506d55(0x236)],_0x247a28=_0x1540be['id'],_0x3ce71c={'memberId':(await this[_0x506d55(0x225)][_0x506d55(0x228)](_0x42ed27))['getMemberID'](),'unitId':_0x42ed27,'threadId':_0x5b6e85,'mention':_0x3c9b3e,'content':_0x5ef6ef,'replyId':_0x247a28},_0x3ee3b1=await this[_0x506d55(0x1ee)][_0x506d55(0x1eb)]('/universer-api/comment/unit/'+_0x42ed27+_0x506d55(0x209),{'body':_0x3ce71c});return!_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)]||_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)][_0x506d55(0x24b)]===0x1;}async[_0x15a028(0x22f)](_0x47e431){const _0x1bac14=_0x15a028,{unitId:_0x349677}=_0x47e431,_0x35a8cd=_0x47e431['threadId'],_0xf401f6={'memberId':this[_0x1bac14(0x1f6)][_0x1bac14(0x20f)]()[_0x1bac14(0x21d)],'unitId':_0x349677,'threadId':_0x35a8cd,'solved':_0x47e431[_0x1bac14(0x22a)]?I[_0x1bac14(0x241)]:I[_0x1bac14(0x232)]},_0x10ede0=await this['_httpService'][_0x1bac14(0x1eb)](_0x1bac14(0x246)+_0x349677+_0x1bac14(0x240),{'body':_0xf401f6});return!_0x10ede0[_0x1bac14(0x220)][_0x1bac14(0x217)]||_0x10ede0['body'][_0x1bac14(0x217)]['code']===0x1;}async[_0x15a028(0x23e)](_0x13b291,_0x547e19,_0x24df7a,_0x505396){const _0x34822c=_0x15a028,_0x2bd46c={'memberId':(await this['_sessionService'][_0x34822c(0x228)](_0x13b291))[_0x34822c(0x24c)](),'threadId':_0x24df7a,'replyId':_0x505396,'unitId':_0x13b291},_0x18983b=await this['_httpService'][_0x34822c(0x1eb)](_0x34822c(0x246)+_0x13b291+_0x34822c(0x1f3),{'body':_0x2bd46c});return!_0x18983b['body'][_0x34822c(0x217)]||_0x18983b['body'][_0x34822c(0x217)][_0x34822c(0x24b)]===0x1;}async[_0x15a028(0x21b)](_0x4fb704,_0x55465e,_0x4e6b7d){const _0x44e10c=_0x15a028,_0x451e1f={'unitId':_0x4fb704,'threadId':_0x4e6b7d},_0xaae836=await this[_0x44e10c(0x1ee)][_0x44e10c(0x1eb)](_0x44e10c(0x246)+_0x4fb704+_0x44e10c(0x213),{'body':_0x451e1f}),_0x599682=_0x4e6b7d[_0x44e10c(0x230)](_0x2f8663=>ee(_0xaae836['body'][_0x44e10c(0x226)][_0x2f8663],_0x4fb704,_0x55465e))[_0x44e10c(0x202)](Boolean);return Object[_0x44e10c(0x245)](_0xaae836[_0x44e10c(0x220)][_0x44e10c(0x244)])[_0x44e10c(0x20e)](_0x39fce7=>{const _0x4a95bf=_0x44e10c;this['_userService'][_0x4a95bf(0x239)](_0x39fce7);}),_0x599682;}[_0x15a028(0x1f1)](_0x136eea){const _0x49a926=_0x15a028;return{'id':_0x136eea['id'],'threadId':_0x136eea[_0x49a926(0x236)],'ref':_0x136eea[_0x49a926(0x22c)]};}};f=Q([_(0x0,_0x5cfd2a(_0xeb8e79)),_(0x1,_0x5cfd2a(_0x1f607e)),_(0x2,_0x5cfd2a(_0x8a85c4)),_(0x3,_0x5cfd2a(_0x4e2d06))],f);var re=Object[_0x15a028(0x214)],te=(_0x297f5a,_0x383edc,_0x21f41f,_0x44bff1)=>{const _0x372a4a=_0x15a028;for(var _0x3d0fe6=_0x44bff1>0x1?void 0x0:_0x44bff1?re(_0x383edc,_0x21f41f):_0x383edc,_0x1deb8a=_0x297f5a[_0x372a4a(0x227)]-0x1,_0x5bfacc;_0x1deb8a>=0x0;_0x1deb8a--)(_0x5bfacc=_0x297f5a[_0x1deb8a])&&(_0x3d0fe6=_0x5bfacc(_0x3d0fe6)||_0x3d0fe6);return _0x3d0fe6;},N=(_0x42a13c,_0x5afb17)=>(_0x5991b9,_0x30b8d6)=>_0x5afb17(_0x5991b9,_0x30b8d6,_0x42a13c);let g=class extends _0x4ffcbe{constructor(_0xac065,_0x2d5f9a){const _0x3fc0d7=_0x15a028;super(),this[_0x3fc0d7(0x22b)]=_0xac065,this[_0x3fc0d7(0x1f2)]=_0x2d5f9a,this[_0x3fc0d7(0x23c)]();}[_0x15a028(0x23c)](){const _0x390636=_0x15a028;this['_threadCommentDataSourceService'][_0x390636(0x221)]=this[_0x390636(0x1f2)],this[_0x390636(0x22b)][_0x390636(0x21f)]=!0x1;}};g=te([N(0x0,_0x34f453),N(0x1,_0x5cfd2a(f))],g);var se=Object[_0x15a028(0x223)],oe=Object[_0x15a028(0x214)],ne=(_0x4caba2,_0xf1668f,_0x50b268)=>_0xf1668f in _0x4caba2?se(_0x4caba2,_0xf1668f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50b268}):_0x4caba2[_0xf1668f]=_0x50b268,ie=(_0x4a9327,_0x231092,_0x203039,_0x210d85)=>{const _0x384c27=_0x15a028;for(var _0x4db634=_0x210d85>0x1?void 0x0:_0x210d85?oe(_0x231092,_0x203039):_0x231092,_0x4c5760=_0x4a9327[_0x384c27(0x227)]-0x1,_0x41b266;_0x4c5760>=0x0;_0x4c5760--)(_0x41b266=_0x4a9327[_0x4c5760])&&(_0x4db634=_0x41b266(_0x4db634)||_0x4db634);return _0x4db634;},w=(_0x51bf6b,_0x359e15)=>(_0x2a48bf,_0x4f82e9)=>_0x359e15(_0x2a48bf,_0x4f82e9,_0x51bf6b),$=(_0x36deb2,_0x4a3c14,_0x54282c)=>ne(_0x36deb2,typeof _0x4a3c14!=_0x15a028(0x1ea)?_0x4a3c14+'':_0x4a3c14,_0x54282c);let b=class extends _0x46fc63{constructor(_0x208264=M,_0x383125,_0x12c1ee){const _0x5e708c=_0x15a028;super(),this[_0x5e708c(0x1ec)]=_0x208264,this[_0x5e708c(0x206)]=_0x383125,this[_0x5e708c(0x237)]=_0x12c1ee;const {..._0x204bc9}=_0x5609b0({},M,this[_0x5e708c(0x1ec)]);this[_0x5e708c(0x237)]['setConfig'](z,_0x204bc9);}[_0x15a028(0x1fc)](){const _0x343e31=_0x15a028;[[f],[g],[S]][_0x343e31(0x20e)](_0x17c3fb=>{const _0x3b3475=_0x343e31;this[_0x3b3475(0x206)]['add'](_0x17c3fb);});}['onReady'](){const _0x555ca7=_0x15a028;this[_0x555ca7(0x206)]['get'](g),this[_0x555ca7(0x206)][_0x555ca7(0x222)](S);}};$(b,'pluginName',W),$(b,_0x15a028(0x229),_0x4632e5[_0x15a028(0x200)]),b=ie([_0x3b7993(_0x3dd618,_0x267342,_0x1782a3),w(0x1,_0x5cfd2a(_0x4e2d06)),w(0x2,_0x58de89)],b);function _0x3d91(){const _0x2a5ca8=['60XKBcEi','_httpService','6312770ThZRQA','format','saveCommentToSnapshot','_threadCommentDataSource','/delete','user','replies','_userService','Unknown','unitId','replyId','userId','30147620cxmuVf','onStarting','6102KmNmPP','reply','6702282XfFiIl','UNIVER_UNKNOWN','/reply','filter','2MqYPUF','Solve','_threadCommentModel','_injector','getComment','YYYY/MM/DD\x20HH:mm','/edit','disposeWithMe','_init','add','solved','forEach','getCurrentUser','root','commentUpdate$','comment','/list','getOwnPropertyDescriptor','content','customRanges','error','Reply','find','getUnit','listComments','addComment','userID','6128nhZOdV','syncUpdateMutationToColla','body','dataSource','get','defineProperty','UNRECOGNIZED','_sessionService','comments','length','requireSession','type','resolved','_threadCommentDataSourceService','ref','_initUserSync','parse','resolveComment','map','/universer-api/user/list','OpenOrReOpen','Delete','1138032zoXGOq','thread-comment-data-source.config','threadId','_configService','rangeType','addUser','stringify','Edit','_initDataSource','getUser','deleteComment','updateComment','/solved','Solved','delete','createTimestamp','users','values','/universer-api/comment/unit/','Add','COMMENT','rangeId','_commentService','code','getMemberID','size','185937OQYARM','188291ezGVyn','subscribe','symbol','post','_config'];_0x3d91=function(){return _0x2a5ca8;};return _0x3d91();}export{b as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0xc2ff(_0x16899c,_0x1bbd44){const _0x1b24d4=_0x1b24();return _0xc2ff=function(_0xc2ffa9,_0x2a3dab){_0xc2ffa9=_0xc2ffa9-0x16b;let _0x515025=_0x1b24d4[_0xc2ffa9];return _0x515025;},_0xc2ff(_0x16899c,_0x1bbd44);}function _0x1b24(){const _0x3c7265=['find','_initUserSync','threadId','IConfigService','syncUpdateMutationToColla','_sessionService','createTimestamp','resolved','_userService','UniverInstanceType','replies','parse','/universer-api/comment/unit/','getUnit','/universer-api/user/list','unitId','@univerjs-pro/license','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','Disposable','_injector','IThreadCommentDataSourceService','reply','Injector','type','/delete','error','Reply','YYYY/MM/DD\x20HH:mm','_commentService','OpenOrReOpen','_configService','parentId','forEach','20VuJXMV','setConfig','2055hWZYxQ','Inject','replyId','UniverThreadComment','customRanges','toStringTag','updateComment','7pHtfLq','add','pipe','2735336JfYONs','CustomRangeType','Unknown','CommentService','Delete','thread-comment-data-source.config','_config','DependentOn','userID','UserManagerService','length','2610568CoBGkf','filter','5004351mlEpWu','delete','Add','_init','dataSource','addUser','11lLZttR','_httpService','body','@univerjs-pro/collaboration-client','personId','Edit','dayjs','deleteComment','getCurrentUser','ref','_threadCommentDataSourceService','code','user','root','@univerjs/thread-comment-ui','10WIyTbI','Plugin','UniverNetwork','Solved','commentUpdate$','CollaborationSessionService','map','function','getUser','1366OkMagU','rangeType','defineProperty','_threadCommentModel','getComment','disposeWithMe','UniverProCollaborationClient','UNIVER_UNKNOWN','446731sRwAaU','listComments','users','content','UniverThreadCommentUIPlugin','pluginName','96504BFhnkO','/reply','UniverProLicense','rangeId','@univerjs/network','/solved','/add','_initDataSource','stringify','HTTPService','solved','payload','UniverLicensePlugin','getMemberID','size','resolveComment','@univerjs/thread-comment','object','subscribe','userId','_threadCommentDataSource','merge','ThreadCommentModel','requireSession','19854612hoYzdj','Solve','Module','slice','UNRECOGNIZED','post','getOwnPropertyDescriptor','COMMENT','format','UniverCollaborationClientPlugin','rxjs'];_0x1b24=function(){return _0x3c7265;};return _0x1b24();}(function(_0xe2560a,_0x468dd3){const _0x51cb3d=_0xc2ff,_0x211f3d=_0xe2560a();while(!![]){try{const _0xa5b970=-parseInt(_0x51cb3d(0x1de))/0x1+-parseInt(_0x51cb3d(0x1d6))/0x2*(parseInt(_0x51cb3d(0x1a1))/0x3)+-parseInt(_0x51cb3d(0x1b6))/0x4+parseInt(_0x51cb3d(0x19f))/0x5*(parseInt(_0x51cb3d(0x1e4))/0x6)+-parseInt(_0x51cb3d(0x1a8))/0x7*(parseInt(_0x51cb3d(0x1ab))/0x8)+-parseInt(_0x51cb3d(0x1b8))/0x9*(-parseInt(_0x51cb3d(0x1cd))/0xa)+-parseInt(_0x51cb3d(0x1be))/0xb*(-parseInt(_0x51cb3d(0x171))/0xc);if(_0xa5b970===_0x468dd3)break;else _0x211f3d['push'](_0x211f3d['shift']());}catch(_0x531a8b){_0x211f3d['push'](_0x211f3d['shift']());}}}(_0x1b24,0x594d5),function(_0x4d7980,_0x22947a){const _0x31b9f8=_0xc2ff;typeof exports==_0x31b9f8(0x1f5)&&typeof module<'u'?_0x22947a(exports,require(_0x31b9f8(0x1c1)),require('@univerjs-pro/license'),require('@univerjs/core'),require(_0x31b9f8(0x1cc)),require('@univerjs/thread-comment'),require('rxjs'),require(_0x31b9f8(0x1e8))):typeof define==_0x31b9f8(0x1d4)&&define['amd']?define(['exports','@univerjs-pro/collaboration-client',_0x31b9f8(0x18c),'@univerjs/core','@univerjs/thread-comment-ui',_0x31b9f8(0x1f4),_0x31b9f8(0x17b),_0x31b9f8(0x1e8)],_0x22947a):(_0x4d7980=typeof globalThis<'u'?globalThis:_0x4d7980||self,_0x22947a(_0x4d7980['UniverProThreadCommentDatasource']={},_0x4d7980[_0x31b9f8(0x1dc)],_0x4d7980[_0x31b9f8(0x1e6)],_0x4d7980['UniverCore'],_0x4d7980['UniverThreadCommentUi'],_0x4d7980[_0x31b9f8(0x1a4)],_0x4d7980['rxjs'],_0x4d7980[_0x31b9f8(0x1cf)]));}(this,function(_0x2cda17,_0x3c2b6e,_0x1ac677,_0x4bc811,_0x4ed381,_0x42ca36,_0x170452,_0x42baaf){'use strict';const _0x23e466=_0xc2ff;const _0x56b436=_0x23e466(0x18e);var _0x49f957=(_0x2473d9=>(_0x2473d9[_0x2473d9[_0x23e466(0x19b)]=0x0]=_0x23e466(0x19b),_0x2473d9[_0x2473d9[_0x23e466(0x1d0)]=0x1]='Solved',_0x2473d9[_0x2473d9[_0x23e466(0x175)]=-0x1]=_0x23e466(0x175),_0x2473d9))(_0x49f957||{}),_0x7579c7=(_0x586baa=>(_0x586baa[_0x586baa[_0x23e466(0x1ad)]=0x0]=_0x23e466(0x1ad),_0x586baa[_0x586baa[_0x23e466(0x1ba)]=0x1]='Add',_0x586baa[_0x586baa['Reply']=0x2]=_0x23e466(0x198),_0x586baa[_0x586baa['Edit']=0x3]=_0x23e466(0x1c3),_0x586baa[_0x586baa['Delete']=0x4]=_0x23e466(0x1af),_0x586baa[_0x586baa['Solve']=0x5]=_0x23e466(0x172),_0x586baa[_0x586baa[_0x23e466(0x175)]=-0x1]=_0x23e466(0x175),_0x586baa))(_0x7579c7||{});const _0x4f2d44=_0x85da16=>_0x4bc811[_0x23e466(0x1c4)](new Date(+_0x85da16))[_0x23e466(0x179)](_0x23e466(0x199)),_0x46866=async(_0x33019e,_0x3eeb97)=>{const _0x4be074=_0x23e466,_0x5cb744=_0x33019e['get'](_0x4bc811[_0x4be074(0x1b4)]),_0xb7d288=_0x33019e[_0x4be074(0x18d)](_0x42baaf[_0x4be074(0x1ed)]);_0x3eeb97[_0x4be074(0x19e)](_0x58cd7d=>{const _0x121ee0=_0x4be074;_0x5cb744[_0x121ee0(0x1d5)](_0x58cd7d)&&_0x3eeb97[_0x121ee0(0x1b9)](_0x58cd7d);}),_0x3eeb97[_0x4be074(0x1f2)]&&(await _0xb7d288[_0x4be074(0x18d)](_0x4be074(0x18a),{'params':{'userIDs':[..._0x3eeb97]}}))[_0x4be074(0x1c0)][_0x4be074(0x1e0)]['forEach'](_0x4bcaca=>{_0x4bcaca&&_0x5cb744['addUser'](_0x4bcaca);});};var _0x4e06a0=Object['getOwnPropertyDescriptor'],_0x3186b9=(_0xff3477,_0x49c24b,_0x276b77,_0xa00e75)=>{const _0x319fc5=_0x23e466;for(var _0x224c74=_0xa00e75>0x1?void 0x0:_0xa00e75?_0x4e06a0(_0x49c24b,_0x276b77):_0x49c24b,_0x98f7ed=_0xff3477[_0x319fc5(0x1b5)]-0x1,_0x3deb52;_0x98f7ed>=0x0;_0x98f7ed--)(_0x3deb52=_0xff3477[_0x98f7ed])&&(_0x224c74=_0x3deb52(_0x224c74)||_0x224c74);return _0x224c74;},_0x241010=(_0x2ac172,_0x3e4885)=>(_0xf3abec,_0x4725f6)=>_0x3e4885(_0xf3abec,_0x4725f6,_0x2ac172);let _0xe17943=class extends _0x4bc811[_0x23e466(0x190)]{constructor(_0x548534,_0x303197,_0x1825b1,_0x3e45b9){const _0x10616e=_0x23e466;super(),this[_0x10616e(0x19a)]=_0x548534,this['_threadCommentModel']=_0x303197,this[_0x10616e(0x184)]=_0x1825b1,this['_injector']=_0x3e45b9,this[_0x10616e(0x1bb)](),this[_0x10616e(0x17d)]();}['_initUserSync'](){const _0x3e4c77=_0x23e466;this[_0x3e4c77(0x1db)](this['_threadCommentModel'][_0x3e4c77(0x1d1)][_0x3e4c77(0x1aa)](_0x170452['bufferTime'](0x10))[_0x3e4c77(0x16b)](_0x48c0a7=>{const _0x31b493=_0x3e4c77,_0x6ab289=new Set();_0x48c0a7[_0x31b493(0x19e)](_0x3ad9a0=>{const _0x4c0514=_0x31b493;switch(_0x3ad9a0[_0x4c0514(0x195)]){case _0x4c0514(0x1a9):{const _0x4243d0=_0x3ad9a0[_0x4c0514(0x1ef)][_0x4c0514(0x1c2)];_0x6ab289[_0x4c0514(0x1a9)](_0x4243d0);break;}}}),_0x46866(this[_0x31b493(0x191)],_0x6ab289);}));}['_init'](){const _0x31cd63=_0x23e466;this['disposeWithMe'](this['_commentService'][_0x31cd63(0x1d1)][_0x31cd63(0x16b)](async _0x53af56=>{const _0x114e67=_0x31cd63;var _0x2c81a3,_0x161ede,_0xc6b7a7,_0x4a7d28;const _0x2c4f11=(_0x2c81a3=this[_0x114e67(0x1d9)]['getUnit'](_0x53af56[_0x114e67(0x18b)])[_0x114e67(0x17c)](_0x23c731=>_0x23c731['threadId']===_0x53af56['threadId']))==null?void 0x0:_0x2c81a3[_0x114e67(0x1cb)];if(!_0x2c4f11)return;const {unitId:_0x169ba0,subUnitId:_0x8d67ff}=_0x2c4f11;switch(_0x53af56['user']&&this[_0x114e67(0x184)][_0x114e67(0x1bd)](_0x53af56[_0x114e67(0x1ca)]),_0x53af56[_0x114e67(0x195)]){case _0x7579c7[_0x114e67(0x1ba)]:break;case _0x7579c7[_0x114e67(0x198)]:{this[_0x114e67(0x1d9)]['addComment'](_0x169ba0,_0x8d67ff,{'unitId':_0x169ba0,'subUnitId':_0x8d67ff,'ref':'','id':_0x53af56['replyId'],'dT':_0x4f2d44(+_0x53af56['createTimestamp']),'threadId':_0x53af56[_0x114e67(0x17e)],'personId':(_0xc6b7a7=(_0x161ede=_0x53af56[_0x114e67(0x1ca)])==null?void 0x0:_0x161ede['userID'])!=null?_0xc6b7a7:_0x53af56[_0x114e67(0x16c)],'text':JSON[_0x114e67(0x187)](_0x53af56[_0x114e67(0x1e1)]),'parentId':_0x2c4f11['id']});break;}case _0x7579c7[_0x114e67(0x1af)]:{const _0xf958fc=this['_threadCommentModel'][_0x114e67(0x1da)](_0x169ba0,_0x8d67ff,_0x53af56[_0x114e67(0x1a3)]);_0xf958fc&&_0xf958fc[_0x114e67(0x19d)]&&this[_0x114e67(0x1d9)][_0x114e67(0x1c5)](_0x169ba0,_0x8d67ff,_0x53af56['replyId']);break;}case _0x7579c7[_0x114e67(0x1c3)]:{this['_threadCommentModel'][_0x114e67(0x1a7)](_0x169ba0,_0x8d67ff,{'commentId':_0x53af56[_0x114e67(0x1a3)],'text':JSON['parse'](_0x53af56['content'])});break;}case _0x7579c7['Solve']:{const _0x15e217=(_0x4a7d28=this[_0x114e67(0x1d9)][_0x114e67(0x189)](_0x53af56['unitId'])[_0x114e67(0x17c)](_0x2c9bbc=>_0x2c9bbc['threadId']===_0x53af56['threadId']))==null?void 0x0:_0x4a7d28[_0x114e67(0x1cb)];_0x15e217&&this[_0x114e67(0x1d9)][_0x114e67(0x1f3)](_0x169ba0,_0x8d67ff,_0x15e217['id'],_0x53af56[_0x114e67(0x1ee)]===_0x49f957['Solved']);break;}}}));}};_0xe17943=_0x3186b9([_0x241010(0x0,_0x4bc811[_0x23e466(0x1a2)](_0x3c2b6e[_0x23e466(0x1ae)])),_0x241010(0x1,_0x4bc811[_0x23e466(0x1a2)](_0x42ca36[_0x23e466(0x16f)])),_0x241010(0x2,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x1b4)])),_0x241010(0x3,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x194)]))],_0xe17943);const _0x7861ed=_0x23e466(0x1b0),_0x39d5f6={};var _0x25a751=Object[_0x23e466(0x177)],_0x2f8b90=(_0x50f348,_0x1ca39f,_0x1ac508,_0x1e33e8)=>{for(var _0x3a70f3=_0x1e33e8>0x1?void 0x0:_0x1e33e8?_0x25a751(_0x1ca39f,_0x1ac508):_0x1ca39f,_0x57e19f=_0x50f348['length']-0x1,_0x103748;_0x57e19f>=0x0;_0x57e19f--)(_0x103748=_0x50f348[_0x57e19f])&&(_0x3a70f3=_0x103748(_0x3a70f3)||_0x3a70f3);return _0x3a70f3;},_0x38d554=(_0x20630b,_0x295db8)=>(_0x35b36f,_0x14de0e)=>_0x295db8(_0x35b36f,_0x14de0e,_0x20630b);function _0x53cd5b(_0x8ec7a9,_0x55adc6){const _0x9d5bcf=_0x23e466,_0x3d5ac4=_0x8ec7a9[_0x9d5bcf(0x186)][0x0];return{..._0x55adc6,'id':_0x3d5ac4[_0x9d5bcf(0x1a3)],'resolved':_0x8ec7a9[_0x9d5bcf(0x1ee)]===0x1,'dT':_0x4f2d44(_0x3d5ac4[_0x9d5bcf(0x182)]),'personId':_0x3d5ac4[_0x9d5bcf(0x16c)],'threadId':_0x3d5ac4[_0x9d5bcf(0x17e)]};}function _0x1d3cca(_0x39af52,_0xd4c7dd,_0x5e3054){const _0x53f62e=_0x23e466;var _0xb0d6e3,_0x14d533;if(((_0x14d533=(_0xb0d6e3=_0x39af52==null?void 0x0:_0x39af52[_0x53f62e(0x186)])==null?void 0x0:_0xb0d6e3[_0x53f62e(0x1b5)])!=null?_0x14d533:0x0)>0x0){const _0x5077d5=(_0x46dffb,_0x386a99)=>({'id':_0x46dffb[_0x53f62e(0x1a3)],'threadId':_0x46dffb[_0x53f62e(0x17e)],'dT':_0x4f2d44(_0x46dffb[_0x53f62e(0x182)]),'personId':_0x46dffb[_0x53f62e(0x16c)],'resolved':_0x39af52[_0x53f62e(0x1ee)]===_0x49f957[_0x53f62e(0x1d0)],'unitId':_0xd4c7dd,'subUnitId':_0x5e3054,'text':JSON[_0x53f62e(0x187)](_0x46dffb['content']),'parentId':_0x386a99}),_0x598b1a=_0x5077d5(_0x39af52[_0x53f62e(0x186)][0x0]);return{..._0x598b1a,'children':_0x39af52[_0x53f62e(0x186)][_0x53f62e(0x174)](0x1)[_0x53f62e(0x1d3)](_0x346412=>_0x5077d5(_0x346412,_0x598b1a['id']))};}return null;}let _0x2ee8f8=class{constructor(_0x53f2b9,_0x5216a4,_0x35339d,_0x1d70e1){const _0x43ef8b=_0x23e466;this['_httpService']=_0x53f2b9,this[_0x43ef8b(0x184)]=_0x5216a4,this[_0x43ef8b(0x181)]=_0x35339d,this['_injector']=_0x1d70e1;}async['addComment'](_0x2a75cd){const _0xba2df6=_0x23e466;var _0x340114,_0x3f6b55;const {parentId:_0x5f414f,unitId:_0x15230e,text:_0x2136a7,threadId:_0x3788f3}=_0x2a75cd,_0x50eaf0=(_0x3f6b55=(_0x340114=_0x2136a7[_0xba2df6(0x1a5)])==null?void 0x0:_0x340114[_0xba2df6(0x1b7)](_0x217dbf=>_0x217dbf[_0xba2df6(0x1d7)]===_0x4bc811[_0xba2df6(0x1ac)][_0xba2df6(0x178)])[_0xba2df6(0x1d3)](_0x55f5e3=>_0x55f5e3[_0xba2df6(0x1e7)]))!=null?_0x3f6b55:[],_0x492b9e=JSON[_0xba2df6(0x1ec)](_0x2136a7),_0x5ac3fd=(await this[_0xba2df6(0x181)]['requireSession'](_0x15230e))['getMemberID']();if(_0x5f414f){const _0x45f975={'memberId':_0x5ac3fd,'unitId':_0x15230e,'content':_0x492b9e,'mention':_0x50eaf0,'threadId':_0x3788f3},_0x6d3835=(await this[_0xba2df6(0x1bf)][_0xba2df6(0x176)]('/universer-api/comment/unit/'+_0x15230e+_0xba2df6(0x1e5),{'body':_0x45f975}))[_0xba2df6(0x1c0)][_0xba2df6(0x193)];return{..._0x2a75cd,'id':_0x6d3835[_0xba2df6(0x1a3)],'dT':_0x4bc811[_0xba2df6(0x1c4)](+_0x6d3835[_0xba2df6(0x182)])[_0xba2df6(0x179)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x6d3835['userId']};}else{const _0x40ec2f={'memberId':_0x5ac3fd,'unitId':_0x15230e,'content':_0x492b9e,'mention':_0x50eaf0},_0x323aa2=await this['_httpService'][_0xba2df6(0x176)](_0xba2df6(0x188)+_0x15230e+_0xba2df6(0x1ea),{'body':_0x40ec2f});return _0x53cd5b(_0x323aa2[_0xba2df6(0x1c0)]['comment'],_0x2a75cd);}}async[_0x23e466(0x1a7)](_0x458f5f){const _0x1e2561=_0x23e466;var _0x240afc,_0x45df47;const {text:_0x32a327,unitId:_0xdfddc3}=_0x458f5f,_0x50aada=(_0x45df47=(_0x240afc=_0x32a327[_0x1e2561(0x1a5)])==null?void 0x0:_0x240afc['filter'](_0x25eccd=>_0x25eccd[_0x1e2561(0x1d7)]===_0x4bc811[_0x1e2561(0x1ac)][_0x1e2561(0x178)])[_0x1e2561(0x1d3)](_0x3c4c4f=>_0x3c4c4f[_0x1e2561(0x1e7)]))!=null?_0x45df47:[],_0x22ffd8=JSON['stringify'](_0x32a327),_0x5e3818=_0x458f5f[_0x1e2561(0x17e)],_0x42e500=_0x458f5f['id'],_0x33e4fa={'memberId':(await this[_0x1e2561(0x181)][_0x1e2561(0x170)](_0xdfddc3))[_0x1e2561(0x1f1)](),'unitId':_0xdfddc3,'threadId':_0x5e3818,'mention':_0x50aada,'content':_0x22ffd8,'replyId':_0x42e500},_0xb6edc6=await this['_httpService'][_0x1e2561(0x176)](_0x1e2561(0x188)+_0xdfddc3+'/edit',{'body':_0x33e4fa});return!_0xb6edc6[_0x1e2561(0x1c0)]['error']||_0xb6edc6[_0x1e2561(0x1c0)][_0x1e2561(0x197)][_0x1e2561(0x1c9)]===0x1;}async[_0x23e466(0x1f3)](_0x13e5eb){const _0x1aae61=_0x23e466,{unitId:_0x38bb11}=_0x13e5eb,_0x4bbd87=_0x13e5eb['threadId'],_0x297a24={'memberId':this[_0x1aae61(0x184)][_0x1aae61(0x1c6)]()[_0x1aae61(0x1b3)],'unitId':_0x38bb11,'threadId':_0x4bbd87,'solved':_0x13e5eb[_0x1aae61(0x183)]?_0x49f957['Solved']:_0x49f957[_0x1aae61(0x19b)]},_0x53ab18=await this['_httpService'][_0x1aae61(0x176)]('/universer-api/comment/unit/'+_0x38bb11+_0x1aae61(0x1e9),{'body':_0x297a24});return!_0x53ab18[_0x1aae61(0x1c0)]['error']||_0x53ab18[_0x1aae61(0x1c0)][_0x1aae61(0x197)][_0x1aae61(0x1c9)]===0x1;}async[_0x23e466(0x1c5)](_0x572478,_0x344320,_0xfc5f95,_0x57e45d){const _0x27568d=_0x23e466,_0x2e66f2={'memberId':(await this['_sessionService']['requireSession'](_0x572478))[_0x27568d(0x1f1)](),'threadId':_0xfc5f95,'replyId':_0x57e45d,'unitId':_0x572478},_0x1131ef=await this[_0x27568d(0x1bf)]['post'](_0x27568d(0x188)+_0x572478+_0x27568d(0x196),{'body':_0x2e66f2});return!_0x1131ef[_0x27568d(0x1c0)][_0x27568d(0x197)]||_0x1131ef[_0x27568d(0x1c0)][_0x27568d(0x197)][_0x27568d(0x1c9)]===0x1;}async[_0x23e466(0x1df)](_0x2e3641,_0x465f49,_0x2870df){const _0x2e8672=_0x23e466,_0xe181fb={'unitId':_0x2e3641,'threadId':_0x2870df},_0x62c341=await this[_0x2e8672(0x1bf)]['post']('/universer-api/comment/unit/'+_0x2e3641+'/list',{'body':_0xe181fb}),_0x324299=_0x2870df[_0x2e8672(0x1d3)](_0x14ffe0=>_0x1d3cca(_0x62c341[_0x2e8672(0x1c0)]['comments'][_0x14ffe0],_0x2e3641,_0x465f49))[_0x2e8672(0x1b7)](Boolean);return Object['values'](_0x62c341[_0x2e8672(0x1c0)][_0x2e8672(0x1e0)])[_0x2e8672(0x19e)](_0xd58492=>{const _0x3185f7=_0x2e8672;this[_0x3185f7(0x184)][_0x3185f7(0x1bd)](_0xd58492);}),_0x324299;}['saveCommentToSnapshot'](_0xce70b5){const _0x5712ae=_0x23e466;return{'id':_0xce70b5['id'],'threadId':_0xce70b5[_0x5712ae(0x17e)],'ref':_0xce70b5[_0x5712ae(0x1c7)]};}};_0x2ee8f8=_0x2f8b90([_0x38d554(0x0,_0x4bc811['Inject'](_0x42baaf[_0x23e466(0x1ed)])),_0x38d554(0x1,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x1b4)])),_0x38d554(0x2,_0x4bc811[_0x23e466(0x1a2)](_0x3c2b6e[_0x23e466(0x1d2)])),_0x38d554(0x3,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x194)]))],_0x2ee8f8);var _0x180394=Object[_0x23e466(0x177)],_0x279014=(_0x138799,_0x421191,_0x467a4b,_0x451df5)=>{const _0x4184ca=_0x23e466;for(var _0xd55d96=_0x451df5>0x1?void 0x0:_0x451df5?_0x180394(_0x421191,_0x467a4b):_0x421191,_0xf74ad6=_0x138799[_0x4184ca(0x1b5)]-0x1,_0x49fdd8;_0xf74ad6>=0x0;_0xf74ad6--)(_0x49fdd8=_0x138799[_0xf74ad6])&&(_0xd55d96=_0x49fdd8(_0xd55d96)||_0xd55d96);return _0xd55d96;},_0x1ad2ed=(_0x24137,_0x164f62)=>(_0x38c177,_0x9add8a)=>_0x164f62(_0x38c177,_0x9add8a,_0x24137);let _0x25a678=class extends _0x4bc811[_0x23e466(0x190)]{constructor(_0x42b183,_0x4466d9){const _0x3e1af3=_0x23e466;super(),this[_0x3e1af3(0x1c8)]=_0x42b183,this[_0x3e1af3(0x16d)]=_0x4466d9,this[_0x3e1af3(0x1eb)]();}[_0x23e466(0x1eb)](){const _0x1170fd=_0x23e466;this['_threadCommentDataSourceService'][_0x1170fd(0x1bc)]=this[_0x1170fd(0x16d)],this[_0x1170fd(0x1c8)][_0x1170fd(0x180)]=!0x1;}};_0x25a678=_0x279014([_0x1ad2ed(0x0,_0x42ca36[_0x23e466(0x192)]),_0x1ad2ed(0x1,_0x4bc811[_0x23e466(0x1a2)](_0x2ee8f8))],_0x25a678);var _0x1dee9a=Object[_0x23e466(0x1d8)],_0x3b80a1=Object[_0x23e466(0x177)],_0x2b77a5=(_0x4e1a8c,_0x1c7f84,_0x45b947)=>_0x1c7f84 in _0x4e1a8c?_0x1dee9a(_0x4e1a8c,_0x1c7f84,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x45b947}):_0x4e1a8c[_0x1c7f84]=_0x45b947,_0x2c8e6c=(_0x4dc19b,_0x4c95f3,_0x4c3085,_0x23aac6)=>{const _0x442661=_0x23e466;for(var _0x400b01=_0x23aac6>0x1?void 0x0:_0x23aac6?_0x3b80a1(_0x4c95f3,_0x4c3085):_0x4c95f3,_0x40d89c=_0x4dc19b[_0x442661(0x1b5)]-0x1,_0x361d9a;_0x40d89c>=0x0;_0x40d89c--)(_0x361d9a=_0x4dc19b[_0x40d89c])&&(_0x400b01=_0x361d9a(_0x400b01)||_0x400b01);return _0x400b01;},_0xc8ef01=(_0x1f12c0,_0x52b3ba)=>(_0x21823a,_0x5ba8af)=>_0x52b3ba(_0x21823a,_0x5ba8af,_0x1f12c0),_0x327592=(_0x10ddf6,_0x4bfa5e,_0x5bd94b)=>_0x2b77a5(_0x10ddf6,typeof _0x4bfa5e!='symbol'?_0x4bfa5e+'':_0x4bfa5e,_0x5bd94b);_0x2cda17[_0x23e466(0x18f)]=class extends _0x4bc811[_0x23e466(0x1ce)]{constructor(_0x30ef12=_0x39d5f6,_0x43a07a,_0x56c497){const _0x4ab8c3=_0x23e466;super(),this[_0x4ab8c3(0x1b1)]=_0x30ef12,this['_injector']=_0x43a07a,this[_0x4ab8c3(0x19c)]=_0x56c497;const {..._0x2a5292}=_0x4bc811[_0x4ab8c3(0x16e)]({},_0x39d5f6,this[_0x4ab8c3(0x1b1)]);this['_configService'][_0x4ab8c3(0x1a0)](_0x7861ed,_0x2a5292);}['onStarting'](){[[_0x2ee8f8],[_0x25a678],[_0xe17943]]['forEach'](_0x3790df=>{const _0x2180d1=_0xc2ff;this[_0x2180d1(0x191)][_0x2180d1(0x1a9)](_0x3790df);});}['onReady'](){const _0x426b84=_0x23e466;this[_0x426b84(0x191)][_0x426b84(0x18d)](_0x25a678),this[_0x426b84(0x191)]['get'](_0xe17943);}},_0x327592(_0x2cda17['UniverThreadCommentDataSourcePlugin'],_0x23e466(0x1e3),_0x56b436),_0x327592(_0x2cda17['UniverThreadCommentDataSourcePlugin'],'type',_0x4bc811[_0x23e466(0x185)][_0x23e466(0x1dd)]),_0x2cda17[_0x23e466(0x18f)]=_0x2c8e6c([_0x4bc811[_0x23e466(0x1b2)](_0x4ed381[_0x23e466(0x1e2)],_0x3c2b6e[_0x23e466(0x17a)],_0x1ac677[_0x23e466(0x1f0)]),_0xc8ef01(0x1,_0x4bc811[_0x23e466(0x1a2)](_0x4bc811[_0x23e466(0x194)])),_0xc8ef01(0x2,_0x4bc811[_0x23e466(0x17f)])],_0x2cda17[_0x23e466(0x18f)]),Object[_0x23e466(0x1d8)](_0x2cda17,Symbol[_0x23e466(0x1a6)],{'value':_0x23e466(0x173)});}));
|
|
1
|
+
(function(_0x19dcb5,_0x5003c7){const _0x4f641a=_0xd8b8,_0x29b86c=_0x19dcb5();while(!![]){try{const _0x5b989c=parseInt(_0x4f641a(0x15d))/0x1+parseInt(_0x4f641a(0x104))/0x2*(-parseInt(_0x4f641a(0x10b))/0x3)+parseInt(_0x4f641a(0x135))/0x4+parseInt(_0x4f641a(0x169))/0x5+parseInt(_0x4f641a(0x16d))/0x6*(parseInt(_0x4f641a(0x122))/0x7)+parseInt(_0x4f641a(0x129))/0x8+-parseInt(_0x4f641a(0x109))/0x9;if(_0x5b989c===_0x5003c7)break;else _0x29b86c['push'](_0x29b86c['shift']());}catch(_0x24ad45){_0x29b86c['push'](_0x29b86c['shift']());}}}(_0x5cfd,0x1afba),function(_0x12f55c,_0x43c4f8){const _0x13f89a=_0xd8b8;typeof exports==_0x13f89a(0x147)&&typeof module<'u'?_0x43c4f8(exports,require(_0x13f89a(0x113)),require(_0x13f89a(0x11e)),require(_0x13f89a(0x138)),require(_0x13f89a(0x126)),require(_0x13f89a(0x178)),require(_0x13f89a(0x12b)),require(_0x13f89a(0x127))):typeof define==_0x13f89a(0x10c)&&define['amd']?define(['exports',_0x13f89a(0x113),'@univerjs-pro/license',_0x13f89a(0x138),_0x13f89a(0x126),'@univerjs/thread-comment',_0x13f89a(0x12b),'@univerjs/network'],_0x43c4f8):(_0x12f55c=typeof globalThis<'u'?globalThis:_0x12f55c||self,_0x43c4f8(_0x12f55c['UniverProThreadCommentDatasource']={},_0x12f55c[_0x13f89a(0xfa)],_0x12f55c['UniverProLicense'],_0x12f55c[_0x13f89a(0x118)],_0x12f55c[_0x13f89a(0x106)],_0x12f55c[_0x13f89a(0xfb)],_0x12f55c[_0x13f89a(0x12b)],_0x12f55c[_0x13f89a(0x157)]));}(this,function(_0x5c21b9,_0x1a8adc,_0x4ce85d,_0x383e05,_0x2ba6e9,_0x3587e2,_0x3d9b0e,_0x1cf243){'use strict';const _0x161f25=_0xd8b8;const _0x5bcb87=_0x161f25(0x11a);var _0x5a7e30=(_0x11939d=>(_0x11939d[_0x11939d[_0x161f25(0x168)]=0x0]=_0x161f25(0x168),_0x11939d[_0x11939d['Solved']=0x1]=_0x161f25(0x12f),_0x11939d[_0x11939d[_0x161f25(0x10d)]=-0x1]=_0x161f25(0x10d),_0x11939d))(_0x5a7e30||{}),_0x4df7a0=(_0x27d005=>(_0x27d005[_0x27d005['Unknown']=0x0]='Unknown',_0x27d005[_0x27d005[_0x161f25(0x15e)]=0x1]=_0x161f25(0x15e),_0x27d005[_0x27d005['Reply']=0x2]=_0x161f25(0x155),_0x27d005[_0x27d005['Edit']=0x3]=_0x161f25(0x16b),_0x27d005[_0x27d005[_0x161f25(0x16f)]=0x4]='Delete',_0x27d005[_0x27d005[_0x161f25(0x179)]=0x5]='Solve',_0x27d005[_0x27d005[_0x161f25(0x10d)]=-0x1]='UNRECOGNIZED',_0x27d005))(_0x4df7a0||{});const _0x40085c=_0x18871d=>_0x383e05[_0x161f25(0x144)](new Date(+_0x18871d))[_0x161f25(0x145)](_0x161f25(0x14c)),_0x12bed1=async(_0x492122,_0x40ff47)=>{const _0x1d5b2f=_0x161f25,_0x330f1f=_0x492122['get'](_0x383e05[_0x1d5b2f(0x100)]),_0x21beda=_0x492122[_0x1d5b2f(0x165)](_0x1cf243[_0x1d5b2f(0x177)]);_0x40ff47['forEach'](_0x5105b0=>{const _0x526268=_0x1d5b2f;_0x330f1f[_0x526268(0x153)](_0x5105b0)&&_0x40ff47[_0x526268(0x173)](_0x5105b0);}),_0x40ff47['size']&&(await _0x21beda[_0x1d5b2f(0x165)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40ff47]}}))[_0x1d5b2f(0x137)][_0x1d5b2f(0x151)][_0x1d5b2f(0x132)](_0x7cc756=>{const _0x3300e8=_0x1d5b2f;_0x7cc756&&_0x330f1f[_0x3300e8(0x12d)](_0x7cc756);});};var _0x2bf5c5=Object[_0x161f25(0x11d)],_0x75b723=(_0x458d03,_0x4c9d82,_0x43a57e,_0x44911b)=>{for(var _0xe1fe61=_0x44911b>0x1?void 0x0:_0x44911b?_0x2bf5c5(_0x4c9d82,_0x43a57e):_0x4c9d82,_0x1a0ea8=_0x458d03['length']-0x1,_0x529559;_0x1a0ea8>=0x0;_0x1a0ea8--)(_0x529559=_0x458d03[_0x1a0ea8])&&(_0xe1fe61=_0x529559(_0xe1fe61)||_0xe1fe61);return _0xe1fe61;},_0xf6834f=(_0xf3474,_0x3dacb3)=>(_0x493086,_0x5520bb)=>_0x3dacb3(_0x493086,_0x5520bb,_0xf3474);let _0x19f978=class extends _0x383e05[_0x161f25(0x14a)]{constructor(_0x166168,_0x323c41,_0x3d1f13,_0x3565b1){const _0x2be80c=_0x161f25;super(),this[_0x2be80c(0x111)]=_0x166168,this['_threadCommentModel']=_0x323c41,this[_0x2be80c(0x13c)]=_0x3d1f13,this[_0x2be80c(0x152)]=_0x3565b1,this[_0x2be80c(0x164)](),this['_initUserSync']();}[_0x161f25(0x176)](){const _0x56d4a0=_0x161f25;this[_0x56d4a0(0x123)](this[_0x56d4a0(0x16a)][_0x56d4a0(0x13b)]['pipe'](_0x3d9b0e['bufferTime'](0x10))[_0x56d4a0(0x136)](_0xa2430b=>{const _0x1af93c=_0x56d4a0,_0x1eb58e=new Set();_0xa2430b[_0x1af93c(0x132)](_0x1ea280=>{const _0x1edc0f=_0x1af93c;switch(_0x1ea280[_0x1edc0f(0x128)]){case _0x1edc0f(0xff):{const _0x5ee0e1=_0x1ea280[_0x1edc0f(0x10f)][_0x1edc0f(0x10e)];_0x1eb58e[_0x1edc0f(0xff)](_0x5ee0e1);break;}}}),_0x12bed1(this[_0x1af93c(0x152)],_0x1eb58e);}));}[_0x161f25(0x164)](){const _0x2a16ef=_0x161f25;this[_0x2a16ef(0x123)](this[_0x2a16ef(0x111)][_0x2a16ef(0x13b)][_0x2a16ef(0x136)](async _0x23bf23=>{const _0x184f43=_0x2a16ef;var _0x17668d,_0x31884a,_0x29f10a,_0x55dcad;const _0x88996e=(_0x17668d=this[_0x184f43(0x16a)][_0x184f43(0x120)](_0x23bf23[_0x184f43(0x146)])[_0x184f43(0x163)](_0x24517a=>_0x24517a[_0x184f43(0x13d)]===_0x23bf23[_0x184f43(0x13d)]))==null?void 0x0:_0x17668d['root'];if(!_0x88996e)return;const {unitId:_0x14f308,subUnitId:_0x431d3d}=_0x88996e;switch(_0x23bf23[_0x184f43(0x130)]&&this['_userService'][_0x184f43(0x12d)](_0x23bf23['user']),_0x23bf23['type']){case _0x4df7a0['Add']:break;case _0x4df7a0['Reply']:{this[_0x184f43(0x16a)][_0x184f43(0xfe)](_0x14f308,_0x431d3d,{'unitId':_0x14f308,'subUnitId':_0x431d3d,'ref':'','id':_0x23bf23[_0x184f43(0x116)],'dT':_0x40085c(+_0x23bf23[_0x184f43(0x108)]),'threadId':_0x23bf23[_0x184f43(0x13d)],'personId':(_0x29f10a=(_0x31884a=_0x23bf23[_0x184f43(0x130)])==null?void 0x0:_0x31884a['userID'])!=null?_0x29f10a:_0x23bf23[_0x184f43(0x103)],'text':JSON[_0x184f43(0x10a)](_0x23bf23[_0x184f43(0x13a)]),'parentId':_0x88996e['id']});break;}case _0x4df7a0[_0x184f43(0x16f)]:{const _0x5322c2=this[_0x184f43(0x16a)]['getComment'](_0x14f308,_0x431d3d,_0x23bf23[_0x184f43(0x116)]);_0x5322c2&&_0x5322c2['parentId']&&this[_0x184f43(0x16a)][_0x184f43(0x172)](_0x14f308,_0x431d3d,_0x23bf23[_0x184f43(0x116)]);break;}case _0x4df7a0[_0x184f43(0x16b)]:{this[_0x184f43(0x16a)]['updateComment'](_0x14f308,_0x431d3d,{'commentId':_0x23bf23['replyId'],'text':JSON[_0x184f43(0x10a)](_0x23bf23[_0x184f43(0x13a)])});break;}case _0x4df7a0[_0x184f43(0x179)]:{const _0x7f02b1=(_0x55dcad=this[_0x184f43(0x16a)][_0x184f43(0x120)](_0x23bf23[_0x184f43(0x146)])['find'](_0xf06458=>_0xf06458[_0x184f43(0x13d)]===_0x23bf23['threadId']))==null?void 0x0:_0x55dcad['root'];_0x7f02b1&&this['_threadCommentModel'][_0x184f43(0x12e)](_0x14f308,_0x431d3d,_0x7f02b1['id'],_0x23bf23[_0x184f43(0x142)]===_0x5a7e30['Solved']);break;}}}));}};_0x19f978=_0x75b723([_0xf6834f(0x0,_0x383e05[_0x161f25(0x102)](_0x1a8adc[_0x161f25(0x161)])),_0xf6834f(0x1,_0x383e05[_0x161f25(0x102)](_0x3587e2['ThreadCommentModel'])),_0xf6834f(0x2,_0x383e05['Inject'](_0x383e05['UserManagerService'])),_0xf6834f(0x3,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)]))],_0x19f978);const _0xb78c8e='thread-comment-data-source.config',_0x1be899={};var _0x1a92e3=Object['getOwnPropertyDescriptor'],_0x4657c8=(_0x189540,_0x3167d4,_0x283627,_0x46a4be)=>{const _0xa6992a=_0x161f25;for(var _0x193640=_0x46a4be>0x1?void 0x0:_0x46a4be?_0x1a92e3(_0x3167d4,_0x283627):_0x3167d4,_0x4dd968=_0x189540[_0xa6992a(0x162)]-0x1,_0x4832e2;_0x4dd968>=0x0;_0x4dd968--)(_0x4832e2=_0x189540[_0x4dd968])&&(_0x193640=_0x4832e2(_0x193640)||_0x193640);return _0x193640;},_0x1d05fe=(_0x34e74f,_0x594343)=>(_0x4f5397,_0xba05b3)=>_0x594343(_0x4f5397,_0xba05b3,_0x34e74f);function _0x483b39(_0x4ec857,_0x4f616a){const _0x420c75=_0x161f25,_0x25fd10=_0x4ec857[_0x420c75(0x131)][0x0];return{..._0x4f616a,'id':_0x25fd10[_0x420c75(0x116)],'resolved':_0x4ec857[_0x420c75(0x142)]===0x1,'dT':_0x40085c(_0x25fd10['createTimestamp']),'personId':_0x25fd10[_0x420c75(0x103)],'threadId':_0x25fd10[_0x420c75(0x13d)]};}function _0x11e7e9(_0xce931d,_0x43772e,_0x1a23b8){const _0xbeab23=_0x161f25;var _0x154852,_0x1e4b75;if(((_0x1e4b75=(_0x154852=_0xce931d==null?void 0x0:_0xce931d['replies'])==null?void 0x0:_0x154852[_0xbeab23(0x162)])!=null?_0x1e4b75:0x0)>0x0){const _0x5be567=(_0x512f60,_0x21fb42)=>({'id':_0x512f60['replyId'],'threadId':_0x512f60['threadId'],'dT':_0x40085c(_0x512f60[_0xbeab23(0x108)]),'personId':_0x512f60[_0xbeab23(0x103)],'resolved':_0xce931d[_0xbeab23(0x142)]===_0x5a7e30[_0xbeab23(0x12f)],'unitId':_0x43772e,'subUnitId':_0x1a23b8,'text':JSON[_0xbeab23(0x10a)](_0x512f60[_0xbeab23(0x13a)]),'parentId':_0x21fb42}),_0x2e381e=_0x5be567(_0xce931d[_0xbeab23(0x131)][0x0]);return{..._0x2e381e,'children':_0xce931d['replies'][_0xbeab23(0x159)](0x1)['map'](_0x4372cd=>_0x5be567(_0x4372cd,_0x2e381e['id']))};}return null;}let _0x1a6ec0=class{constructor(_0x30553e,_0x138299,_0x6e20a6,_0x60ced8){const _0x2bce5c=_0x161f25;this[_0x2bce5c(0x13f)]=_0x30553e,this[_0x2bce5c(0x13c)]=_0x138299,this[_0x2bce5c(0x115)]=_0x6e20a6,this[_0x2bce5c(0x152)]=_0x60ced8;}async[_0x161f25(0xfe)](_0x5da4a1){const _0x55afee=_0x161f25;var _0x56e4c0,_0x276f3b;const {parentId:_0x16f94e,unitId:_0x2f602f,text:_0x21aca8,threadId:_0x453526}=_0x5da4a1,_0x5f4468=(_0x276f3b=(_0x56e4c0=_0x21aca8[_0x55afee(0xfd)])==null?void 0x0:_0x56e4c0[_0x55afee(0x174)](_0x10f5d8=>_0x10f5d8[_0x55afee(0x166)]===_0x383e05[_0x55afee(0x156)][_0x55afee(0x119)])[_0x55afee(0x12c)](_0x1e4378=>_0x1e4378[_0x55afee(0x15b)]))!=null?_0x276f3b:[],_0x3557c8=JSON[_0x55afee(0x158)](_0x21aca8),_0x365a82=(await this['_sessionService'][_0x55afee(0x15a)](_0x2f602f))[_0x55afee(0x139)]();if(_0x16f94e){const _0x36aca4={'memberId':_0x365a82,'unitId':_0x2f602f,'content':_0x3557c8,'mention':_0x5f4468,'threadId':_0x453526},_0x3ffa56=(await this['_httpService'][_0x55afee(0x15f)](_0x55afee(0x14e)+_0x2f602f+'/reply',{'body':_0x36aca4}))[_0x55afee(0x137)][_0x55afee(0x141)];return{..._0x5da4a1,'id':_0x3ffa56[_0x55afee(0x116)],'dT':_0x383e05[_0x55afee(0x144)](+_0x3ffa56['createTimestamp'])[_0x55afee(0x145)](_0x55afee(0x14c)),'personId':_0x3ffa56['userId']};}else{const _0x1d17a8={'memberId':_0x365a82,'unitId':_0x2f602f,'content':_0x3557c8,'mention':_0x5f4468},_0x3a4691=await this['_httpService'][_0x55afee(0x15f)](_0x55afee(0x14e)+_0x2f602f+_0x55afee(0x13e),{'body':_0x1d17a8});return _0x483b39(_0x3a4691['body'][_0x55afee(0x14f)],_0x5da4a1);}}async['updateComment'](_0x5c0097){const _0xa847ad=_0x161f25;var _0x4b2fc4,_0x45c551;const {text:_0xff7475,unitId:_0x4d3436}=_0x5c0097,_0x4bc1e4=(_0x45c551=(_0x4b2fc4=_0xff7475[_0xa847ad(0xfd)])==null?void 0x0:_0x4b2fc4[_0xa847ad(0x174)](_0x4a7414=>_0x4a7414['rangeType']===_0x383e05[_0xa847ad(0x156)][_0xa847ad(0x119)])['map'](_0x29c931=>_0x29c931['rangeId']))!=null?_0x45c551:[],_0x7920b6=JSON[_0xa847ad(0x158)](_0xff7475),_0x330541=_0x5c0097[_0xa847ad(0x13d)],_0xb0e858=_0x5c0097['id'],_0x446224={'memberId':(await this[_0xa847ad(0x115)]['requireSession'](_0x4d3436))[_0xa847ad(0x139)](),'unitId':_0x4d3436,'threadId':_0x330541,'mention':_0x4bc1e4,'content':_0x7920b6,'replyId':_0xb0e858},_0xb9821b=await this[_0xa847ad(0x13f)]['post'](_0xa847ad(0x14e)+_0x4d3436+'/edit',{'body':_0x446224});return!_0xb9821b[_0xa847ad(0x137)]['error']||_0xb9821b[_0xa847ad(0x137)][_0xa847ad(0x101)]['code']===0x1;}async[_0x161f25(0x12e)](_0x1ac5c1){const _0x1d9859=_0x161f25,{unitId:_0x556f22}=_0x1ac5c1,_0x2ac2a9=_0x1ac5c1[_0x1d9859(0x13d)],_0x268b40={'memberId':this[_0x1d9859(0x13c)][_0x1d9859(0x112)]()[_0x1d9859(0x171)],'unitId':_0x556f22,'threadId':_0x2ac2a9,'solved':_0x1ac5c1[_0x1d9859(0x15c)]?_0x5a7e30['Solved']:_0x5a7e30[_0x1d9859(0x168)]},_0x403035=await this[_0x1d9859(0x13f)][_0x1d9859(0x15f)](_0x1d9859(0x14e)+_0x556f22+'/solved',{'body':_0x268b40});return!_0x403035['body'][_0x1d9859(0x101)]||_0x403035['body'][_0x1d9859(0x101)]['code']===0x1;}async[_0x161f25(0x172)](_0x1a6488,_0x4f063d,_0x4b5f49,_0x2cb2b1){const _0x513941=_0x161f25,_0x53b86c={'memberId':(await this['_sessionService'][_0x513941(0x15a)](_0x1a6488))['getMemberID'](),'threadId':_0x4b5f49,'replyId':_0x2cb2b1,'unitId':_0x1a6488},_0x1e8d70=await this[_0x513941(0x13f)][_0x513941(0x15f)](_0x513941(0x14e)+_0x1a6488+_0x513941(0x110),{'body':_0x53b86c});return!_0x1e8d70[_0x513941(0x137)][_0x513941(0x101)]||_0x1e8d70[_0x513941(0x137)][_0x513941(0x101)]['code']===0x1;}async['listComments'](_0x404b5f,_0x59bc4f,_0x2acad2){const _0x5af83d=_0x161f25,_0x341f98={'unitId':_0x404b5f,'threadId':_0x2acad2},_0x5d2d54=await this[_0x5af83d(0x13f)]['post'](_0x5af83d(0x14e)+_0x404b5f+'/list',{'body':_0x341f98}),_0x35bf45=_0x2acad2[_0x5af83d(0x12c)](_0x43530c=>_0x11e7e9(_0x5d2d54[_0x5af83d(0x137)][_0x5af83d(0x140)][_0x43530c],_0x404b5f,_0x59bc4f))[_0x5af83d(0x174)](Boolean);return Object[_0x5af83d(0x149)](_0x5d2d54[_0x5af83d(0x137)][_0x5af83d(0x151)])[_0x5af83d(0x132)](_0x221990=>{const _0x561ffe=_0x5af83d;this[_0x561ffe(0x13c)][_0x561ffe(0x12d)](_0x221990);}),_0x35bf45;}[_0x161f25(0x16e)](_0x3b1468){const _0x373431=_0x161f25;return{'id':_0x3b1468['id'],'threadId':_0x3b1468[_0x373431(0x13d)],'ref':_0x3b1468[_0x373431(0xfc)]};}};_0x1a6ec0=_0x4657c8([_0x1d05fe(0x0,_0x383e05['Inject'](_0x1cf243[_0x161f25(0x177)])),_0x1d05fe(0x1,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x100)])),_0x1d05fe(0x2,_0x383e05[_0x161f25(0x102)](_0x1a8adc[_0x161f25(0x150)])),_0x1d05fe(0x3,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)]))],_0x1a6ec0);var _0x594411=Object['getOwnPropertyDescriptor'],_0x2777ed=(_0x303caa,_0x1d67ee,_0x1fa75d,_0x160319)=>{const _0x37ea89=_0x161f25;for(var _0xf9ac50=_0x160319>0x1?void 0x0:_0x160319?_0x594411(_0x1d67ee,_0x1fa75d):_0x1d67ee,_0x712dbe=_0x303caa[_0x37ea89(0x162)]-0x1,_0x2f0093;_0x712dbe>=0x0;_0x712dbe--)(_0x2f0093=_0x303caa[_0x712dbe])&&(_0xf9ac50=_0x2f0093(_0xf9ac50)||_0xf9ac50);return _0xf9ac50;},_0x30e29a=(_0x29336b,_0x51c9f1)=>(_0x3b8d5f,_0x40313d)=>_0x51c9f1(_0x3b8d5f,_0x40313d,_0x29336b);let _0x53c45d=class extends _0x383e05['Disposable']{constructor(_0x453851,_0x1ad0d7){const _0x5e9948=_0x161f25;super(),this[_0x5e9948(0x133)]=_0x453851,this[_0x5e9948(0x107)]=_0x1ad0d7,this[_0x5e9948(0x105)]();}[_0x161f25(0x105)](){const _0x5cf4c2=_0x161f25;this[_0x5cf4c2(0x133)][_0x5cf4c2(0x12a)]=this['_threadCommentDataSource'],this[_0x5cf4c2(0x133)][_0x5cf4c2(0x16c)]=!0x1;}};_0x53c45d=_0x2777ed([_0x30e29a(0x0,_0x3587e2[_0x161f25(0x11c)]),_0x30e29a(0x1,_0x383e05[_0x161f25(0x102)](_0x1a6ec0))],_0x53c45d);var _0x23e2b0=Object[_0x161f25(0x117)],_0x1074aa=Object[_0x161f25(0x11d)],_0xefd8d5=(_0x1da67e,_0x21fe53,_0x2507e1)=>_0x21fe53 in _0x1da67e?_0x23e2b0(_0x1da67e,_0x21fe53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2507e1}):_0x1da67e[_0x21fe53]=_0x2507e1,_0x1ec4a3=(_0xaeef33,_0x530bbc,_0x3b7154,_0x14232a)=>{for(var _0x3369dd=_0x14232a>0x1?void 0x0:_0x14232a?_0x1074aa(_0x530bbc,_0x3b7154):_0x530bbc,_0x321c2a=_0xaeef33['length']-0x1,_0x162e8a;_0x321c2a>=0x0;_0x321c2a--)(_0x162e8a=_0xaeef33[_0x321c2a])&&(_0x3369dd=_0x162e8a(_0x3369dd)||_0x3369dd);return _0x3369dd;},_0x3bb426=(_0x715390,_0x304e75)=>(_0x2075a9,_0x3c4c91)=>_0x304e75(_0x2075a9,_0x3c4c91,_0x715390),_0x3b36cd=(_0x9283e8,_0x471066,_0x6ece6c)=>_0xefd8d5(_0x9283e8,typeof _0x471066!='symbol'?_0x471066+'':_0x471066,_0x6ece6c);_0x5c21b9[_0x161f25(0x134)]=class extends _0x383e05[_0x161f25(0x11f)]{constructor(_0x4b8b21=_0x1be899,_0x328df4,_0xd935e4){const _0x1f206=_0x161f25;super(),this[_0x1f206(0x14d)]=_0x4b8b21,this[_0x1f206(0x152)]=_0x328df4,this['_configService']=_0xd935e4;const {..._0x393109}=_0x383e05[_0x1f206(0x125)]({},_0x1be899,this[_0x1f206(0x14d)]);this[_0x1f206(0x143)]['setConfig'](_0xb78c8e,_0x393109);}[_0x161f25(0x121)](){const _0x434961=_0x161f25;[[_0x1a6ec0],[_0x53c45d],[_0x19f978]][_0x434961(0x132)](_0x21fe9c=>{const _0x4e0fbb=_0x434961;this[_0x4e0fbb(0x152)][_0x4e0fbb(0xff)](_0x21fe9c);});}[_0x161f25(0x148)](){const _0x3c35fa=_0x161f25;this[_0x3c35fa(0x152)]['get'](_0x53c45d),this[_0x3c35fa(0x152)][_0x3c35fa(0x165)](_0x19f978);}},_0x3b36cd(_0x5c21b9[_0x161f25(0x134)],_0x161f25(0x170),_0x5bcb87),_0x3b36cd(_0x5c21b9[_0x161f25(0x134)],_0x161f25(0x128),_0x383e05['UniverInstanceType'][_0x161f25(0x14b)]),_0x5c21b9['UniverThreadCommentDataSourcePlugin']=_0x1ec4a3([_0x383e05['DependentOn'](_0x2ba6e9[_0x161f25(0x11b)],_0x1a8adc[_0x161f25(0x154)],_0x4ce85d[_0x161f25(0x175)]),_0x3bb426(0x1,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)])),_0x3bb426(0x2,_0x383e05[_0x161f25(0x167)])],_0x5c21b9[_0x161f25(0x134)]),Object[_0x161f25(0x117)](_0x5c21b9,Symbol[_0x161f25(0x160)],{'value':_0x161f25(0x114)});}));function _0xd8b8(_0x47285c,_0x4d0857){const _0x5cfd8a=_0x5cfd();return _0xd8b8=function(_0xd8b827,_0x202e3f){_0xd8b827=_0xd8b827-0xfa;let _0x4c4e53=_0x5cfd8a[_0xd8b827];return _0x4c4e53;},_0xd8b8(_0x47285c,_0x4d0857);}function _0x5cfd(){const _0x413871=['_commentService','getCurrentUser','@univerjs-pro/collaboration-client','Module','_sessionService','replyId','defineProperty','UniverCore','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentUIPlugin','IThreadCommentDataSourceService','getOwnPropertyDescriptor','@univerjs-pro/license','Plugin','getUnit','onStarting','7AXPssr','disposeWithMe','Injector','merge','@univerjs/thread-comment-ui','@univerjs/network','type','68960DSeCKM','dataSource','rxjs','map','addUser','resolveComment','Solved','user','replies','forEach','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','287328oBFOch','subscribe','body','@univerjs/core','getMemberID','content','commentUpdate$','_userService','threadId','/add','_httpService','comments','reply','solved','_configService','dayjs','format','unitId','object','onReady','values','Disposable','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','_config','/universer-api/comment/unit/','comment','CollaborationSessionService','users','_injector','getUser','UniverCollaborationClientPlugin','Reply','CustomRangeType','UniverNetwork','stringify','slice','requireSession','rangeId','resolved','80651adwlVh','Add','post','toStringTag','CommentService','length','find','_init','get','rangeType','IConfigService','OpenOrReOpen','805085FwnQzw','_threadCommentModel','Edit','syncUpdateMutationToColla','1253634pixIkM','saveCommentToSnapshot','Delete','pluginName','userID','deleteComment','delete','filter','UniverLicensePlugin','_initUserSync','HTTPService','@univerjs/thread-comment','Solve','UniverProCollaborationClient','UniverThreadComment','ref','customRanges','addComment','add','UserManagerService','error','Inject','userId','490oRAwUx','_initDataSource','UniverThreadCommentUi','_threadCommentDataSource','createTimestamp','3690018mGWSOX','parse','129KALhUb','function','UNRECOGNIZED','personId','payload','/delete'];_0x5cfd=function(){return _0x413871;};return _0x5cfd();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.8.0-nightly.
|
|
3
|
+
"version": "0.8.0-nightly.202506051607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.8.0-nightly.
|
|
49
|
-
"@univerjs-pro/license": "0.8.0-nightly.
|
|
50
|
-
"@univerjs/core": "0.8.0-nightly.
|
|
51
|
-
"@univerjs/network": "0.8.0-nightly.202506031608",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.8.0-nightly.202506051607",
|
|
49
|
+
"@univerjs-pro/license": "0.8.0-nightly.202506051607",
|
|
50
|
+
"@univerjs/core": "0.8.0-nightly.202506051607",
|
|
52
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/thread-comment": "0.8.0-nightly.
|
|
54
|
-
"@univerjs/
|
|
52
|
+
"@univerjs/thread-comment": "0.8.0-nightly.202506051607",
|
|
53
|
+
"@univerjs/network": "0.8.0-nightly.202506051607",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.8.0-nightly.202506051607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|