@univerjs-pro/thread-comment-datasource 0.11.0 → 0.12.0
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 +9 -9
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x4b0c74=_0x4dc5;(function(_0x394471,_0x4e3c5a){const _0x554fd7=_0x4dc5,_0x2f0f36=_0x394471();while(!![]){try{const _0x5e1624=parseInt(_0x554fd7(0x152))/0x1*(-parseInt(_0x554fd7(0x10a))/0x2)+-parseInt(_0x554fd7(0x13e))/0x3+parseInt(_0x554fd7(0x15f))/0x4*(-parseInt(_0x554fd7(0x10c))/0x5)+-parseInt(_0x554fd7(0x151))/0x6+parseInt(_0x554fd7(0x16a))/0x7+-parseInt(_0x554fd7(0x178))/0x8*(-parseInt(_0x554fd7(0x15c))/0x9)+parseInt(_0x554fd7(0x16b))/0xa;if(_0x5e1624===_0x4e3c5a)break;else _0x2f0f36['push'](_0x2f0f36['shift']());}catch(_0x3754ac){_0x2f0f36['push'](_0x2f0f36['shift']());}}}(_0x2530,0x9e9a1));function _0x2530(){const _0x23a04e=['/edit','userID','syncUpdateMutationToColla','getCurrentUser','add','1006eQvNLb','getUser','530vclkTp','thread-comment-data-source.config','filter','Edit','/universer-api/comment/unit/','_configService','saveCommentToSnapshot','_threadCommentDataSourceService','threadId','requireSession','ThreadCommentModel','ref','replies','Inject','Plugin','code','UniverThreadCommentDataSourcePlugin','payload','onStarting','UniverInstanceType','Module','Delete','dataSource','_httpService','content','unitId','map','find','toStringTag','slice','size','_initUserSync','pipe','addComment','stringify','resolveComment','Add','solved','customRanges','dayjs','disposeWithMe','personId','UNRECOGNIZED','getMemberID','comments','resolved','root','rangeId','getOwnPropertyDescriptor','onReady','1907586RvJgwe','getComment','error','users','_config','UserManagerService','_threadCommentDataSource','length','_commentService','createTimestamp','commentUpdate$','UniverThreadCommentUIPlugin','body','defineProperty','reply','_injector','/delete','format','Injector','6032298zZtBMV','1714FrFobm','replyId','_initDataSource','merge','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/user/list','deleteComment','pluginName','forEach','5022csUYvX','_sessionService','_init','14836IcHvZF','Solve','OpenOrReOpen','_threadCommentModel','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','COMMENT','CustomRangeType','parentId','Disposable','getUnit','3739407HqJILH','18206430cyJeRE','get','comment','user','userId','post','/solved','Solved','setConfig','HTTPService','subscribe','addUser','DependentOn','17080qPXgWu','CollaborationSessionService','parse','Reply','UniverLicensePlugin','type','updateComment','listComments','IConfigService','/reply'];_0x2530=function(){return _0x23a04e;};return _0x2530();}Object[_0x4b0c74(0x14b)](exports,Symbol[_0x4b0c74(0x128)],{'value':_0x4b0c74(0x120)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4b0c74(0x157);var I=(_0x455d46=>(_0x455d46[_0x455d46[_0x4b0c74(0x161)]=0x0]=_0x4b0c74(0x161),_0x455d46[_0x455d46['Solved']=0x1]=_0x4b0c74(0x172),_0x455d46[_0x455d46[_0x4b0c74(0x136)]=-0x1]=_0x4b0c74(0x136),_0x455d46))(I||{}),v=(_0x4bda3f=>(_0x4bda3f[_0x4bda3f['Unknown']=0x0]='Unknown',_0x4bda3f[_0x4bda3f[_0x4b0c74(0x130)]=0x1]=_0x4b0c74(0x130),_0x4bda3f[_0x4bda3f['Reply']=0x2]=_0x4b0c74(0x17b),_0x4bda3f[_0x4bda3f[_0x4b0c74(0x10f)]=0x3]='Edit',_0x4bda3f[_0x4bda3f[_0x4b0c74(0x121)]=0x4]=_0x4b0c74(0x121),_0x4bda3f[_0x4bda3f['Solve']=0x5]=_0x4b0c74(0x160),_0x4bda3f[_0x4bda3f[_0x4b0c74(0x136)]=-0x1]=_0x4b0c74(0x136),_0x4bda3f))(v||{});const f=_0x55a1c7=>c[_0x4b0c74(0x133)](new Date(+_0x55a1c7))[_0x4b0c74(0x14f)](_0x4b0c74(0x164)),R=async(_0x5213ca,_0xe251c7)=>{const _0x158f24=_0x4b0c74,_0x216e43=_0x5213ca['get'](c[_0x158f24(0x143)]),_0x2af14b=_0x5213ca['get'](P[_0x158f24(0x174)]);_0xe251c7[_0x158f24(0x15b)](_0x2bc5cd=>{const _0x55b05f=_0x158f24;_0x216e43[_0x55b05f(0x10b)](_0x2bc5cd)&&_0xe251c7['delete'](_0x2bc5cd);}),_0xe251c7[_0x158f24(0x12a)]&&(await _0x2af14b['get'](_0x158f24(0x158),{'params':{'userIDs':[..._0xe251c7]}}))[_0x158f24(0x14a)][_0x158f24(0x141)]['forEach'](_0x10ca9c=>{const _0x421d66=_0x158f24;_0x10ca9c&&_0x216e43[_0x421d66(0x176)](_0x10ca9c);});};var $=Object[_0x4b0c74(0x13c)],E=(_0xe4c895,_0x428bd2,_0x5b771d,_0x1c9de2)=>{for(var _0x58fdcf=_0x1c9de2>0x1?void 0x0:_0x1c9de2?$(_0x428bd2,_0x5b771d):_0x428bd2,_0x2a39c8=_0xe4c895['length']-0x1,_0x29c701;_0x2a39c8>=0x0;_0x2a39c8--)(_0x29c701=_0xe4c895[_0x2a39c8])&&(_0x58fdcf=_0x29c701(_0x58fdcf)||_0x58fdcf);return _0x58fdcf;},S=(_0x12b0d9,_0x230901)=>(_0x54272e,_0x58746a)=>_0x230901(_0x54272e,_0x58746a,_0x12b0d9);let _=class extends c[_0x4b0c74(0x168)]{constructor(_0xf066ea,_0x192626,_0x25729d,_0x3dc745){const _0x58ca59=_0x4b0c74;super(),this[_0x58ca59(0x146)]=_0xf066ea,this[_0x58ca59(0x162)]=_0x192626,this[_0x58ca59(0x156)]=_0x25729d,this[_0x58ca59(0x14d)]=_0x3dc745,this[_0x58ca59(0x15e)](),this[_0x58ca59(0x12b)]();}[_0x4b0c74(0x12b)](){const _0x2906b9=_0x4b0c74;this[_0x2906b9(0x134)](this['_threadCommentModel'][_0x2906b9(0x148)][_0x2906b9(0x12c)](j['bufferTime'](0x10))[_0x2906b9(0x175)](_0x525188=>{const _0x4b583d=_0x2906b9,_0x5ecb2f=new Set();_0x525188[_0x4b583d(0x15b)](_0x2aa7e3=>{const _0x432988=_0x4b583d;switch(_0x2aa7e3[_0x432988(0x17d)]){case _0x432988(0x186):{const _0x1e5103=_0x2aa7e3[_0x432988(0x11d)][_0x432988(0x135)];_0x5ecb2f[_0x432988(0x186)](_0x1e5103);break;}}}),R(this[_0x4b583d(0x14d)],_0x5ecb2f);}));}['_init'](){const _0x179324=_0x4b0c74;this[_0x179324(0x134)](this[_0x179324(0x146)]['commentUpdate$'][_0x179324(0x175)](async _0x1104a8=>{const _0x5680ac=_0x179324;var _0x21aa03,_0x38718a,_0x3d5b7a,_0x4fab6e;const _0x544c49=(_0x21aa03=this[_0x5680ac(0x162)][_0x5680ac(0x169)](_0x1104a8['unitId'])[_0x5680ac(0x127)](_0x52746b=>_0x52746b[_0x5680ac(0x114)]===_0x1104a8[_0x5680ac(0x114)]))==null?void 0x0:_0x21aa03[_0x5680ac(0x13a)];if(!_0x544c49)return;const {unitId:_0x723cbd,subUnitId:_0x36ae90}=_0x544c49;switch(_0x1104a8['user']&&this['_userService']['addUser'](_0x1104a8[_0x5680ac(0x16e)]),_0x1104a8[_0x5680ac(0x17d)]){case v[_0x5680ac(0x130)]:break;case v['Reply']:{this['_threadCommentModel'][_0x5680ac(0x12d)](_0x723cbd,_0x36ae90,{'unitId':_0x723cbd,'subUnitId':_0x36ae90,'ref':'','id':_0x1104a8[_0x5680ac(0x153)],'dT':f(+_0x1104a8[_0x5680ac(0x147)]),'threadId':_0x1104a8[_0x5680ac(0x114)],'personId':(_0x3d5b7a=(_0x38718a=_0x1104a8[_0x5680ac(0x16e)])==null?void 0x0:_0x38718a[_0x5680ac(0x183)])!=null?_0x3d5b7a:_0x1104a8[_0x5680ac(0x16f)],'text':JSON['parse'](_0x1104a8['content']),'parentId':_0x544c49['id']});break;}case v[_0x5680ac(0x121)]:{const _0x4aa224=this[_0x5680ac(0x162)][_0x5680ac(0x13f)](_0x723cbd,_0x36ae90,_0x1104a8['replyId']);_0x4aa224&&_0x4aa224[_0x5680ac(0x167)]&&this[_0x5680ac(0x162)]['deleteComment'](_0x723cbd,_0x36ae90,_0x1104a8['replyId']);break;}case v[_0x5680ac(0x10f)]:{this[_0x5680ac(0x162)][_0x5680ac(0x17e)](_0x723cbd,_0x36ae90,{'commentId':_0x1104a8[_0x5680ac(0x153)],'text':JSON[_0x5680ac(0x17a)](_0x1104a8[_0x5680ac(0x124)])});break;}case v[_0x5680ac(0x160)]:{const _0x337312=(_0x4fab6e=this['_threadCommentModel'][_0x5680ac(0x169)](_0x1104a8[_0x5680ac(0x125)])['find'](_0x104fdb=>_0x104fdb[_0x5680ac(0x114)]===_0x1104a8[_0x5680ac(0x114)]))==null?void 0x0:_0x4fab6e[_0x5680ac(0x13a)];_0x337312&&this[_0x5680ac(0x162)][_0x5680ac(0x12f)](_0x723cbd,_0x36ae90,_0x337312['id'],_0x1104a8['solved']===I[_0x5680ac(0x172)]);break;}}}));}};_=E([S(0x0,c[_0x4b0c74(0x119)](b['CommentService'])),S(0x1,c[_0x4b0c74(0x119)](M[_0x4b0c74(0x116)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x4b0c74(0x150)]))],_);function _0x4dc5(_0x5d6b1e,_0x4e8ffc){const _0x25306e=_0x2530();return _0x4dc5=function(_0x4dc5d9,_0x167798){_0x4dc5d9=_0x4dc5d9-0x10a;let _0x2f5f5b=_0x25306e[_0x4dc5d9];return _0x2f5f5b;},_0x4dc5(_0x5d6b1e,_0x4e8ffc);}const q=_0x4b0c74(0x10d),D={};var A=Object[_0x4b0c74(0x13c)],x=(_0x30473d,_0x49fb8d,_0x3ea266,_0x425ab1)=>{const _0x14ea4e=_0x4b0c74;for(var _0x494f21=_0x425ab1>0x1?void 0x0:_0x425ab1?A(_0x49fb8d,_0x3ea266):_0x49fb8d,_0x22b723=_0x30473d[_0x14ea4e(0x145)]-0x1,_0x50e0b8;_0x22b723>=0x0;_0x22b723--)(_0x50e0b8=_0x30473d[_0x22b723])&&(_0x494f21=_0x50e0b8(_0x494f21)||_0x494f21);return _0x494f21;},C=(_0xce10a4,_0x399ef1)=>(_0xc047c,_0x13c68c)=>_0x399ef1(_0xc047c,_0x13c68c,_0xce10a4);function Y(_0x13900c,_0x4a0629){const _0x283d58=_0x4b0c74,_0x2d01ad=_0x13900c['replies'][0x0];return{..._0x4a0629,'id':_0x2d01ad[_0x283d58(0x153)],'resolved':_0x13900c[_0x283d58(0x131)]===0x1,'dT':f(_0x2d01ad['createTimestamp']),'personId':_0x2d01ad['userId'],'threadId':_0x2d01ad[_0x283d58(0x114)]};}function G(_0x3a2fce,_0x4d074d,_0x393dd8){const _0x3e9df2=_0x4b0c74;var _0x1af3ed,_0x120e99;if(((_0x120e99=(_0x1af3ed=_0x3a2fce==null?void 0x0:_0x3a2fce['replies'])==null?void 0x0:_0x1af3ed['length'])!=null?_0x120e99:0x0)>0x0){const _0x276ebb=(_0xb6e67a,_0x2aa339)=>({'id':_0xb6e67a[_0x3e9df2(0x153)],'threadId':_0xb6e67a[_0x3e9df2(0x114)],'dT':f(_0xb6e67a['createTimestamp']),'personId':_0xb6e67a[_0x3e9df2(0x16f)],'resolved':_0x3a2fce[_0x3e9df2(0x131)]===I['Solved'],'unitId':_0x4d074d,'subUnitId':_0x393dd8,'text':JSON[_0x3e9df2(0x17a)](_0xb6e67a[_0x3e9df2(0x124)]),'parentId':_0x2aa339}),_0x54deb6=_0x276ebb(_0x3a2fce[_0x3e9df2(0x118)][0x0]);return{..._0x54deb6,'children':_0x3a2fce[_0x3e9df2(0x118)][_0x3e9df2(0x129)](0x1)[_0x3e9df2(0x126)](_0x37ca6d=>_0x276ebb(_0x37ca6d,_0x54deb6['id']))};}return null;}let p=class{constructor(_0x38828f,_0x51b3cb,_0x17dab6){const _0x3ac4fd=_0x4b0c74;this[_0x3ac4fd(0x123)]=_0x38828f,this[_0x3ac4fd(0x156)]=_0x51b3cb,this['_sessionService']=_0x17dab6;}async['addComment'](_0x2b93a6){const _0x2b66fb=_0x4b0c74;var _0xf6612c,_0x498ddb;const {parentId:_0x481090,unitId:_0x5bdc73,text:_0x3df42f,threadId:_0x189c72}=_0x2b93a6,_0x4a33d0=(_0x498ddb=(_0xf6612c=_0x3df42f['customRanges'])==null?void 0x0:_0xf6612c[_0x2b66fb(0x10e)](_0x5c9217=>_0x5c9217['rangeType']===c[_0x2b66fb(0x166)][_0x2b66fb(0x165)])[_0x2b66fb(0x126)](_0x1c1674=>_0x1c1674[_0x2b66fb(0x13b)]))!=null?_0x498ddb:[],_0x41d73c=JSON[_0x2b66fb(0x12e)](_0x3df42f),_0x5568ba=(await this[_0x2b66fb(0x15d)][_0x2b66fb(0x115)](_0x5bdc73))[_0x2b66fb(0x137)]();if(_0x481090){const _0x2dbb10={'memberId':_0x5568ba,'unitId':_0x5bdc73,'content':_0x41d73c,'mention':_0x4a33d0,'threadId':_0x189c72},_0x3b3af0=(await this['_httpService'][_0x2b66fb(0x170)]('/universer-api/comment/unit/'+_0x5bdc73+_0x2b66fb(0x181),{'body':_0x2dbb10}))[_0x2b66fb(0x14a)][_0x2b66fb(0x14c)];return{..._0x2b93a6,'id':_0x3b3af0[_0x2b66fb(0x153)],'dT':c[_0x2b66fb(0x133)](+_0x3b3af0[_0x2b66fb(0x147)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3b3af0[_0x2b66fb(0x16f)]};}else{const _0x2c4a48={'memberId':_0x5568ba,'unitId':_0x5bdc73,'content':_0x41d73c,'mention':_0x4a33d0},_0x1a6504=await this[_0x2b66fb(0x123)]['post'](_0x2b66fb(0x110)+_0x5bdc73+'/add',{'body':_0x2c4a48});return Y(_0x1a6504[_0x2b66fb(0x14a)][_0x2b66fb(0x16d)],_0x2b93a6);}}async[_0x4b0c74(0x17e)](_0x1db375){const _0x4b81fa=_0x4b0c74;var _0x580f20,_0x40f104;const {text:_0xa6d875,unitId:_0x568637}=_0x1db375,_0x38a4a6=(_0x40f104=(_0x580f20=_0xa6d875[_0x4b81fa(0x132)])==null?void 0x0:_0x580f20[_0x4b81fa(0x10e)](_0x32587c=>_0x32587c['rangeType']===c[_0x4b81fa(0x166)][_0x4b81fa(0x165)])[_0x4b81fa(0x126)](_0x5e9836=>_0x5e9836[_0x4b81fa(0x13b)]))!=null?_0x40f104:[],_0x1702c6=JSON['stringify'](_0xa6d875),_0x1cc40e=_0x1db375['threadId'],_0x28ca9e=_0x1db375['id'],_0x30d798={'memberId':(await this[_0x4b81fa(0x15d)][_0x4b81fa(0x115)](_0x568637))[_0x4b81fa(0x137)](),'unitId':_0x568637,'threadId':_0x1cc40e,'mention':_0x38a4a6,'content':_0x1702c6,'replyId':_0x28ca9e},_0x141dbf=await this[_0x4b81fa(0x123)][_0x4b81fa(0x170)](_0x4b81fa(0x110)+_0x568637+_0x4b81fa(0x182),{'body':_0x30d798});return!_0x141dbf[_0x4b81fa(0x14a)][_0x4b81fa(0x140)]||_0x141dbf[_0x4b81fa(0x14a)][_0x4b81fa(0x140)]['code']===0x1;}async['resolveComment'](_0x1cf943){const _0x2c9987=_0x4b0c74,{unitId:_0x1443ae}=_0x1cf943,_0x1cd7a4=_0x1cf943[_0x2c9987(0x114)],_0x1b8392={'memberId':this[_0x2c9987(0x156)][_0x2c9987(0x185)]()[_0x2c9987(0x183)],'unitId':_0x1443ae,'threadId':_0x1cd7a4,'solved':_0x1cf943[_0x2c9987(0x139)]?I['Solved']:I['OpenOrReOpen']},_0x204701=await this[_0x2c9987(0x123)][_0x2c9987(0x170)]('/universer-api/comment/unit/'+_0x1443ae+_0x2c9987(0x171),{'body':_0x1b8392});return!_0x204701[_0x2c9987(0x14a)][_0x2c9987(0x140)]||_0x204701['body'][_0x2c9987(0x140)]['code']===0x1;}async[_0x4b0c74(0x159)](_0xd6ce38,_0x4dedbf,_0x8defaa,_0x4bc326){const _0x4592e3=_0x4b0c74,_0x3913a4={'memberId':(await this[_0x4592e3(0x15d)][_0x4592e3(0x115)](_0xd6ce38))['getMemberID'](),'threadId':_0x8defaa,'replyId':_0x4bc326,'unitId':_0xd6ce38},_0x14681c=await this[_0x4592e3(0x123)][_0x4592e3(0x170)](_0x4592e3(0x110)+_0xd6ce38+_0x4592e3(0x14e),{'body':_0x3913a4});return!_0x14681c['body'][_0x4592e3(0x140)]||_0x14681c[_0x4592e3(0x14a)][_0x4592e3(0x140)][_0x4592e3(0x11b)]===0x1;}async[_0x4b0c74(0x17f)](_0x39218c,_0x12ec68,_0x528c10){const _0x28a0b5=_0x4b0c74,_0x2ce27f={'unitId':_0x39218c,'threadId':_0x528c10},_0x52b942=await this[_0x28a0b5(0x123)][_0x28a0b5(0x170)](_0x28a0b5(0x110)+_0x39218c+'/list',{'body':_0x2ce27f}),_0x26da5b=_0x528c10[_0x28a0b5(0x126)](_0x3c5eaa=>G(_0x52b942[_0x28a0b5(0x14a)][_0x28a0b5(0x138)][_0x3c5eaa],_0x39218c,_0x12ec68))[_0x28a0b5(0x10e)](Boolean);return Object['values'](_0x52b942[_0x28a0b5(0x14a)][_0x28a0b5(0x141)])[_0x28a0b5(0x15b)](_0x20aff0=>{const _0x2095bc=_0x28a0b5;this[_0x2095bc(0x156)][_0x2095bc(0x176)](_0x20aff0);}),_0x26da5b;}[_0x4b0c74(0x112)](_0x285167){const _0x2ccf98=_0x4b0c74;return{'id':_0x285167['id'],'threadId':_0x285167[_0x2ccf98(0x114)],'ref':_0x285167[_0x2ccf98(0x117)]};}};p=x([C(0x0,c['Inject'](P[_0x4b0c74(0x174)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x4b0c74(0x119)](b[_0x4b0c74(0x179)]))],p);var H=Object[_0x4b0c74(0x13c)],J=(_0xe94940,_0x4cf5ba,_0xbdd535,_0x42c568)=>{const _0x4fb9ee=_0x4b0c74;for(var _0x149fd2=_0x42c568>0x1?void 0x0:_0x42c568?H(_0x4cf5ba,_0xbdd535):_0x4cf5ba,_0x10a09e=_0xe94940[_0x4fb9ee(0x145)]-0x1,_0x4b3c84;_0x10a09e>=0x0;_0x10a09e--)(_0x4b3c84=_0xe94940[_0x10a09e])&&(_0x149fd2=_0x4b3c84(_0x149fd2)||_0x149fd2);return _0x149fd2;},y=(_0x271092,_0x23e0bb)=>(_0x1f76f1,_0x23b919)=>_0x23e0bb(_0x1f76f1,_0x23b919,_0x271092);let g=class extends c[_0x4b0c74(0x168)]{constructor(_0x4a7135,_0x46d0c4){const _0x4c4e92=_0x4b0c74;super(),this[_0x4c4e92(0x113)]=_0x4a7135,this['_threadCommentDataSource']=_0x46d0c4,this[_0x4c4e92(0x154)]();}[_0x4b0c74(0x154)](){const _0x10196c=_0x4b0c74;this[_0x10196c(0x113)][_0x10196c(0x122)]=this[_0x10196c(0x144)],this['_threadCommentDataSourceService'][_0x10196c(0x184)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x4b0c74(0x119)](p))],g);var F=Object[_0x4b0c74(0x14b)],L=Object[_0x4b0c74(0x13c)],Z=(_0x164d75,_0x35fbf6,_0x6cb1ac)=>_0x35fbf6 in _0x164d75?F(_0x164d75,_0x35fbf6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6cb1ac}):_0x164d75[_0x35fbf6]=_0x6cb1ac,W=(_0x57bf80,_0x460f4b,_0x4c8c,_0x168e9f)=>{const _0x2e68e6=_0x4b0c74;for(var _0x4e030b=_0x168e9f>0x1?void 0x0:_0x168e9f?L(_0x460f4b,_0x4c8c):_0x460f4b,_0xbb6d95=_0x57bf80[_0x2e68e6(0x145)]-0x1,_0x1206a9;_0xbb6d95>=0x0;_0xbb6d95--)(_0x1206a9=_0x57bf80[_0xbb6d95])&&(_0x4e030b=_0x1206a9(_0x4e030b)||_0x4e030b);return _0x4e030b;},O=(_0x2d899e,_0x697eea)=>(_0x2dec32,_0x23538f)=>_0x697eea(_0x2dec32,_0x23538f,_0x2d899e),N=(_0x34c8a0,_0x4773d5,_0x99e716)=>Z(_0x34c8a0,typeof _0x4773d5!='symbol'?_0x4773d5+'':_0x4773d5,_0x99e716);exports[_0x4b0c74(0x11c)]=class extends c[_0x4b0c74(0x11a)]{constructor(_0x1aebc4=D,_0x4f04c2,_0xd4faa5){const _0x16bc53=_0x4b0c74;super(),this[_0x16bc53(0x142)]=_0x1aebc4,this[_0x16bc53(0x14d)]=_0x4f04c2,this['_configService']=_0xd4faa5;const {..._0x2e6cf1}=c[_0x16bc53(0x155)]({},D,this[_0x16bc53(0x142)]);this[_0x16bc53(0x111)][_0x16bc53(0x173)](q,_0x2e6cf1);}[_0x4b0c74(0x11e)](){[[p],[g],[_]]['forEach'](_0x307826=>{const _0xf3857d=_0x4dc5;this[_0xf3857d(0x14d)][_0xf3857d(0x186)](_0x307826);});}[_0x4b0c74(0x13d)](){const _0x2a768b=_0x4b0c74;this['_injector'][_0x2a768b(0x16c)](g),this['_injector'][_0x2a768b(0x16c)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x4b0c74(0x15a),U),N(exports[_0x4b0c74(0x11c)],_0x4b0c74(0x17d),c[_0x4b0c74(0x11f)][_0x4b0c74(0x163)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x4b0c74(0x177)](w[_0x4b0c74(0x149)],b['UniverCollaborationClientPlugin'],T[_0x4b0c74(0x17c)]),O(0x1,c[_0x4b0c74(0x119)](c[_0x4b0c74(0x150)])),O(0x2,c[_0x4b0c74(0x180)])],exports[_0x4b0c74(0x11c)]);
|
|
1
|
+
'use strict';const _0x195db3=_0x258e;(function(_0x2e4ebd,_0x3036ff){const _0x45239d=_0x258e,_0x419b52=_0x2e4ebd();while(!![]){try{const _0x2e468d=parseInt(_0x45239d(0x189))/0x1*(parseInt(_0x45239d(0x14e))/0x2)+parseInt(_0x45239d(0x186))/0x3+-parseInt(_0x45239d(0x179))/0x4*(-parseInt(_0x45239d(0x19b))/0x5)+-parseInt(_0x45239d(0x185))/0x6+parseInt(_0x45239d(0x15a))/0x7*(parseInt(_0x45239d(0x1ac))/0x8)+-parseInt(_0x45239d(0x19a))/0x9*(parseInt(_0x45239d(0x178))/0xa)+-parseInt(_0x45239d(0x14d))/0xb;if(_0x2e468d===_0x3036ff)break;else _0x419b52['push'](_0x419b52['shift']());}catch(_0x6d2cd0){_0x419b52['push'](_0x419b52['shift']());}}}(_0x542b,0x9223d));function _0x258e(_0x456c8e,_0x532c97){const _0x542b55=_0x542b();return _0x258e=function(_0x258e82,_0x2c7676){_0x258e82=_0x258e82-0x135;let _0x57b794=_0x542b55[_0x258e82];return _0x57b794;},_0x258e(_0x456c8e,_0x532c97);}Object[_0x195db3(0x16f)](exports,Symbol[_0x195db3(0x147)],{'value':_0x195db3(0x144)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x195db3(0x148);var I=(_0x24fdd8=>(_0x24fdd8[_0x24fdd8['OpenOrReOpen']=0x0]=_0x195db3(0x192),_0x24fdd8[_0x24fdd8['Solved']=0x1]=_0x195db3(0x18b),_0x24fdd8[_0x24fdd8[_0x195db3(0x1aa)]=-0x1]=_0x195db3(0x1aa),_0x24fdd8))(I||{}),v=(_0x20ac03=>(_0x20ac03[_0x20ac03[_0x195db3(0x193)]=0x0]=_0x195db3(0x193),_0x20ac03[_0x20ac03[_0x195db3(0x15b)]=0x1]='Add',_0x20ac03[_0x20ac03[_0x195db3(0x199)]=0x2]=_0x195db3(0x199),_0x20ac03[_0x20ac03[_0x195db3(0x136)]=0x3]=_0x195db3(0x136),_0x20ac03[_0x20ac03[_0x195db3(0x160)]=0x4]=_0x195db3(0x160),_0x20ac03[_0x20ac03[_0x195db3(0x14b)]=0x5]=_0x195db3(0x14b),_0x20ac03[_0x20ac03['UNRECOGNIZED']=-0x1]=_0x195db3(0x1aa),_0x20ac03))(v||{});const f=_0x3fcec2=>c[_0x195db3(0x16b)](new Date(+_0x3fcec2))[_0x195db3(0x19c)](_0x195db3(0x17e)),R=async(_0x42a7de,_0x26304c)=>{const _0x1f130f=_0x195db3,_0x2aa132=_0x42a7de['get'](c[_0x1f130f(0x159)]),_0x1801da=_0x42a7de['get'](P[_0x1f130f(0x18d)]);_0x26304c[_0x1f130f(0x13c)](_0x5baac6=>{const _0x4bcbe5=_0x1f130f;_0x2aa132[_0x4bcbe5(0x139)](_0x5baac6)&&_0x26304c[_0x4bcbe5(0x151)](_0x5baac6);}),_0x26304c[_0x1f130f(0x1a1)]&&(await _0x1801da[_0x1f130f(0x17a)](_0x1f130f(0x17d),{'params':{'userIDs':[..._0x26304c]}}))[_0x1f130f(0x182)]['users']['forEach'](_0x3bccdf=>{const _0x50bf63=_0x1f130f;_0x3bccdf&&_0x2aa132[_0x50bf63(0x154)](_0x3bccdf);});};var $=Object[_0x195db3(0x1a4)],E=(_0xc00abc,_0x43ea9e,_0x4c9946,_0x1d084c)=>{for(var _0x356bdb=_0x1d084c>0x1?void 0x0:_0x1d084c?$(_0x43ea9e,_0x4c9946):_0x43ea9e,_0x1c155a=_0xc00abc['length']-0x1,_0x20f7c2;_0x1c155a>=0x0;_0x1c155a--)(_0x20f7c2=_0xc00abc[_0x1c155a])&&(_0x356bdb=_0x20f7c2(_0x356bdb)||_0x356bdb);return _0x356bdb;},S=(_0x2c93b0,_0x22ff17)=>(_0x34a120,_0x159b84)=>_0x22ff17(_0x34a120,_0x159b84,_0x2c93b0);let _=class extends c[_0x195db3(0x172)]{constructor(_0x576af9,_0x1c8f41,_0x5c80a9,_0x4283cc){const _0x4db075=_0x195db3;super(),this[_0x4db075(0x15d)]=_0x576af9,this[_0x4db075(0x16a)]=_0x1c8f41,this['_userService']=_0x5c80a9,this[_0x4db075(0x162)]=_0x4283cc,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0xbeb649=_0x195db3;this[_0xbeb649(0x1ae)](this['_threadCommentModel'][_0xbeb649(0x168)][_0xbeb649(0x167)](j[_0xbeb649(0x1a7)](0x10))[_0xbeb649(0x16c)](_0x1367f5=>{const _0x379813=_0xbeb649,_0x3febad=new Set();_0x1367f5[_0x379813(0x13c)](_0x38376d=>{const _0x2275d8=_0x379813;switch(_0x38376d[_0x2275d8(0x145)]){case'add':{const _0x5238c3=_0x38376d[_0x2275d8(0x150)][_0x2275d8(0x141)];_0x3febad['add'](_0x5238c3);break;}}}),R(this['_injector'],_0x3febad);}));}[_0x195db3(0x177)](){const _0x37f1a3=_0x195db3;this['disposeWithMe'](this['_commentService'][_0x37f1a3(0x168)][_0x37f1a3(0x16c)](async _0x53722f=>{const _0x21fe98=_0x37f1a3;var _0x2a0162,_0x3986d9,_0xe8d305,_0x66369b;const _0x23eb41=(_0x2a0162=this['_threadCommentModel'][_0x21fe98(0x18a)](_0x53722f[_0x21fe98(0x163)])['find'](_0x502ddd=>_0x502ddd['threadId']===_0x53722f[_0x21fe98(0x169)]))==null?void 0x0:_0x2a0162[_0x21fe98(0x190)];if(!_0x23eb41)return;const {unitId:_0x6fb230,subUnitId:_0x32e0d3}=_0x23eb41;switch(_0x53722f['user']&&this[_0x21fe98(0x1a3)][_0x21fe98(0x154)](_0x53722f[_0x21fe98(0x195)]),_0x53722f[_0x21fe98(0x145)]){case v[_0x21fe98(0x15b)]:break;case v[_0x21fe98(0x199)]:{this[_0x21fe98(0x16a)][_0x21fe98(0x196)](_0x6fb230,_0x32e0d3,{'unitId':_0x6fb230,'subUnitId':_0x32e0d3,'ref':'','id':_0x53722f[_0x21fe98(0x171)],'dT':f(+_0x53722f[_0x21fe98(0x149)]),'threadId':_0x53722f[_0x21fe98(0x169)],'personId':(_0xe8d305=(_0x3986d9=_0x53722f[_0x21fe98(0x195)])==null?void 0x0:_0x3986d9[_0x21fe98(0x146)])!=null?_0xe8d305:_0x53722f[_0x21fe98(0x13d)],'text':JSON[_0x21fe98(0x15c)](_0x53722f[_0x21fe98(0x176)]),'parentId':_0x23eb41['id']});break;}case v['Delete']:{const _0x1fd165=this[_0x21fe98(0x16a)]['getComment'](_0x6fb230,_0x32e0d3,_0x53722f['replyId']);_0x1fd165&&_0x1fd165['parentId']&&this[_0x21fe98(0x16a)][_0x21fe98(0x13f)](_0x6fb230,_0x32e0d3,_0x53722f[_0x21fe98(0x171)]);break;}case v[_0x21fe98(0x136)]:{this['_threadCommentModel'][_0x21fe98(0x143)](_0x6fb230,_0x32e0d3,{'commentId':_0x53722f['replyId'],'text':JSON[_0x21fe98(0x15c)](_0x53722f['content'])});break;}case v[_0x21fe98(0x14b)]:{const _0x56b272=(_0x66369b=this[_0x21fe98(0x16a)]['getUnit'](_0x53722f[_0x21fe98(0x163)])[_0x21fe98(0x161)](_0x4368ae=>_0x4368ae['threadId']===_0x53722f[_0x21fe98(0x169)]))==null?void 0x0:_0x66369b[_0x21fe98(0x190)];_0x56b272&&this[_0x21fe98(0x16a)][_0x21fe98(0x19e)](_0x6fb230,_0x32e0d3,_0x56b272['id'],_0x53722f['solved']===I[_0x21fe98(0x18b)]);break;}}}));}};_=E([S(0x0,c[_0x195db3(0x135)](b[_0x195db3(0x13b)])),S(0x1,c[_0x195db3(0x135)](M[_0x195db3(0x1a9)])),S(0x2,c[_0x195db3(0x135)](c[_0x195db3(0x159)])),S(0x3,c[_0x195db3(0x135)](c['Injector']))],_);const q=_0x195db3(0x16e),D={};function _0x542b(){const _0x2d24bb=['subscribe','customRanges','thread-comment-data-source.config','defineProperty','CollaborationSessionService','replyId','Disposable','listComments','COMMENT','comment','content','_init','4850jTKrgN','3644uZGjjR','get','error','dataSource','/universer-api/user/list','YYYY/MM/DD\x20HH:mm','ref','syncUpdateMutationToColla','reply','body','saveCommentToSnapshot','replies','5834784YUodIV','2832624DBQdHp','_initDataSource','users','775805JbSnnE','getUnit','Solved','/add','HTTPService','rangeId','map','root','onStarting','OpenOrReOpen','Unknown','stringify','user','addComment','slice','_threadCommentDataSourceService','Reply','8793YdaqYX','1175mLAJso','format','_threadCommentDataSource','resolveComment','_httpService','filter','size','code','_userService','getOwnPropertyDescriptor','_configService','IThreadCommentDataSourceService','bufferTime','_sessionService','ThreadCommentModel','UNRECOGNIZED','/edit','208lrZiVf','requireSession','disposeWithMe','onReady','rangeType','Inject','Edit','solved','/reply','getUser','resolved','CommentService','forEach','userId','merge','deleteComment','pluginName','personId','length','updateComment','Module','type','userID','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','Injector','Solve','/universer-api/comment/unit/','6475172frenTZ','2zfPPco','_config','payload','delete','getMemberID','setConfig','addUser','Plugin','UniverLicensePlugin','/list','post','UserManagerService','188314gYbJqQ','Add','parse','_commentService','UniverThreadCommentDataSourcePlugin','values','Delete','find','_injector','unitId','CustomRangeType','DependentOn','add','pipe','commentUpdate$','threadId','_threadCommentModel','dayjs'];_0x542b=function(){return _0x2d24bb;};return _0x542b();}var A=Object[_0x195db3(0x1a4)],x=(_0x2b5ce1,_0x552725,_0x59c638,_0x1a68e4)=>{const _0x5b1e91=_0x195db3;for(var _0x1bbb13=_0x1a68e4>0x1?void 0x0:_0x1a68e4?A(_0x552725,_0x59c638):_0x552725,_0x54db8d=_0x2b5ce1[_0x5b1e91(0x142)]-0x1,_0x5a02d8;_0x54db8d>=0x0;_0x54db8d--)(_0x5a02d8=_0x2b5ce1[_0x54db8d])&&(_0x1bbb13=_0x5a02d8(_0x1bbb13)||_0x1bbb13);return _0x1bbb13;},C=(_0x2aa6ff,_0x35fc84)=>(_0x3347fe,_0xcca97b)=>_0x35fc84(_0x3347fe,_0xcca97b,_0x2aa6ff);function Y(_0x21be45,_0x2905f5){const _0x5913f8=_0x195db3,_0x5cf8ce=_0x21be45[_0x5913f8(0x184)][0x0];return{..._0x2905f5,'id':_0x5cf8ce['replyId'],'resolved':_0x21be45[_0x5913f8(0x137)]===0x1,'dT':f(_0x5cf8ce[_0x5913f8(0x149)]),'personId':_0x5cf8ce['userId'],'threadId':_0x5cf8ce['threadId']};}function G(_0x2cb4bb,_0xe75564,_0x4d262c){const _0x5601d2=_0x195db3;var _0xb9406d,_0x4f6325;if(((_0x4f6325=(_0xb9406d=_0x2cb4bb==null?void 0x0:_0x2cb4bb[_0x5601d2(0x184)])==null?void 0x0:_0xb9406d[_0x5601d2(0x142)])!=null?_0x4f6325:0x0)>0x0){const _0x2899a5=(_0x175f0a,_0x4fa2f7)=>({'id':_0x175f0a[_0x5601d2(0x171)],'threadId':_0x175f0a[_0x5601d2(0x169)],'dT':f(_0x175f0a['createTimestamp']),'personId':_0x175f0a[_0x5601d2(0x13d)],'resolved':_0x2cb4bb[_0x5601d2(0x137)]===I[_0x5601d2(0x18b)],'unitId':_0xe75564,'subUnitId':_0x4d262c,'text':JSON[_0x5601d2(0x15c)](_0x175f0a['content']),'parentId':_0x4fa2f7}),_0x1f5141=_0x2899a5(_0x2cb4bb[_0x5601d2(0x184)][0x0]);return{..._0x1f5141,'children':_0x2cb4bb[_0x5601d2(0x184)][_0x5601d2(0x197)](0x1)['map'](_0x373122=>_0x2899a5(_0x373122,_0x1f5141['id']))};}return null;}let p=class{constructor(_0x5584d6,_0x3cec69,_0x5c5b4d){const _0x557221=_0x195db3;this[_0x557221(0x19f)]=_0x5584d6,this[_0x557221(0x1a3)]=_0x3cec69,this['_sessionService']=_0x5c5b4d;}async[_0x195db3(0x196)](_0x35bf60){const _0x44be90=_0x195db3;var _0x373af9,_0x29f677;const {parentId:_0x40e44d,unitId:_0x401325,text:_0x4c484d,threadId:_0x263dca}=_0x35bf60,_0x4b9268=(_0x29f677=(_0x373af9=_0x4c484d[_0x44be90(0x16d)])==null?void 0x0:_0x373af9[_0x44be90(0x1a0)](_0x198e77=>_0x198e77[_0x44be90(0x1b0)]===c[_0x44be90(0x164)][_0x44be90(0x174)])[_0x44be90(0x18f)](_0x169ca0=>_0x169ca0[_0x44be90(0x18e)]))!=null?_0x29f677:[],_0x1da5c1=JSON[_0x44be90(0x194)](_0x4c484d),_0x441f9d=(await this[_0x44be90(0x1a8)][_0x44be90(0x1ad)](_0x401325))[_0x44be90(0x152)]();if(_0x40e44d){const _0xda83d2={'memberId':_0x441f9d,'unitId':_0x401325,'content':_0x1da5c1,'mention':_0x4b9268,'threadId':_0x263dca},_0x493ac9=(await this[_0x44be90(0x19f)][_0x44be90(0x158)](_0x44be90(0x14c)+_0x401325+_0x44be90(0x138),{'body':_0xda83d2}))[_0x44be90(0x182)][_0x44be90(0x181)];return{..._0x35bf60,'id':_0x493ac9[_0x44be90(0x171)],'dT':c['dayjs'](+_0x493ac9[_0x44be90(0x149)])[_0x44be90(0x19c)](_0x44be90(0x17e)),'personId':_0x493ac9[_0x44be90(0x13d)]};}else{const _0x564395={'memberId':_0x441f9d,'unitId':_0x401325,'content':_0x1da5c1,'mention':_0x4b9268},_0x2a819a=await this[_0x44be90(0x19f)][_0x44be90(0x158)](_0x44be90(0x14c)+_0x401325+_0x44be90(0x18c),{'body':_0x564395});return Y(_0x2a819a[_0x44be90(0x182)][_0x44be90(0x175)],_0x35bf60);}}async[_0x195db3(0x143)](_0x1a6277){const _0xf31879=_0x195db3;var _0x1e0c15,_0x404a33;const {text:_0x27a8ad,unitId:_0x6050b5}=_0x1a6277,_0x7d6f7b=(_0x404a33=(_0x1e0c15=_0x27a8ad[_0xf31879(0x16d)])==null?void 0x0:_0x1e0c15[_0xf31879(0x1a0)](_0x34d9e4=>_0x34d9e4[_0xf31879(0x1b0)]===c[_0xf31879(0x164)][_0xf31879(0x174)])['map'](_0x38b5e3=>_0x38b5e3[_0xf31879(0x18e)]))!=null?_0x404a33:[],_0x182f70=JSON[_0xf31879(0x194)](_0x27a8ad),_0x1228ce=_0x1a6277[_0xf31879(0x169)],_0x4e565b=_0x1a6277['id'],_0x22c37d={'memberId':(await this[_0xf31879(0x1a8)][_0xf31879(0x1ad)](_0x6050b5))[_0xf31879(0x152)](),'unitId':_0x6050b5,'threadId':_0x1228ce,'mention':_0x7d6f7b,'content':_0x182f70,'replyId':_0x4e565b},_0x4f8fc6=await this[_0xf31879(0x19f)]['post'](_0xf31879(0x14c)+_0x6050b5+_0xf31879(0x1ab),{'body':_0x22c37d});return!_0x4f8fc6[_0xf31879(0x182)][_0xf31879(0x17b)]||_0x4f8fc6['body']['error'][_0xf31879(0x1a2)]===0x1;}async[_0x195db3(0x19e)](_0x59ff42){const _0x516013=_0x195db3,{unitId:_0x160e1f}=_0x59ff42,_0x1ceb84=_0x59ff42[_0x516013(0x169)],_0x26103e={'memberId':this[_0x516013(0x1a3)]['getCurrentUser']()['userID'],'unitId':_0x160e1f,'threadId':_0x1ceb84,'solved':_0x59ff42[_0x516013(0x13a)]?I[_0x516013(0x18b)]:I[_0x516013(0x192)]},_0x58d704=await this[_0x516013(0x19f)][_0x516013(0x158)](_0x516013(0x14c)+_0x160e1f+'/solved',{'body':_0x26103e});return!_0x58d704[_0x516013(0x182)][_0x516013(0x17b)]||_0x58d704[_0x516013(0x182)][_0x516013(0x17b)][_0x516013(0x1a2)]===0x1;}async[_0x195db3(0x13f)](_0xdf98aa,_0x1378cf,_0x4d3b8e,_0xb1038c){const _0x54a7b4=_0x195db3,_0x2647aa={'memberId':(await this['_sessionService'][_0x54a7b4(0x1ad)](_0xdf98aa))['getMemberID'](),'threadId':_0x4d3b8e,'replyId':_0xb1038c,'unitId':_0xdf98aa},_0x5ee1a2=await this['_httpService'][_0x54a7b4(0x158)](_0x54a7b4(0x14c)+_0xdf98aa+'/delete',{'body':_0x2647aa});return!_0x5ee1a2[_0x54a7b4(0x182)][_0x54a7b4(0x17b)]||_0x5ee1a2[_0x54a7b4(0x182)][_0x54a7b4(0x17b)][_0x54a7b4(0x1a2)]===0x1;}async[_0x195db3(0x173)](_0x46ab83,_0x5ab91c,_0x55c6d8){const _0x101912=_0x195db3,_0x31ccec={'unitId':_0x46ab83,'threadId':_0x55c6d8},_0x20e19d=await this['_httpService'][_0x101912(0x158)](_0x101912(0x14c)+_0x46ab83+_0x101912(0x157),{'body':_0x31ccec}),_0x10977e=_0x55c6d8['map'](_0x57cb40=>G(_0x20e19d[_0x101912(0x182)]['comments'][_0x57cb40],_0x46ab83,_0x5ab91c))['filter'](Boolean);return Object[_0x101912(0x15f)](_0x20e19d['body'][_0x101912(0x188)])[_0x101912(0x13c)](_0x89551c=>{const _0x59183d=_0x101912;this['_userService'][_0x59183d(0x154)](_0x89551c);}),_0x10977e;}[_0x195db3(0x183)](_0x563b0d){const _0x3e14dc=_0x195db3;return{'id':_0x563b0d['id'],'threadId':_0x563b0d[_0x3e14dc(0x169)],'ref':_0x563b0d[_0x3e14dc(0x17f)]};}};p=x([C(0x0,c[_0x195db3(0x135)](P[_0x195db3(0x18d)])),C(0x1,c[_0x195db3(0x135)](c['UserManagerService'])),C(0x2,c[_0x195db3(0x135)](b[_0x195db3(0x170)]))],p);var H=Object[_0x195db3(0x1a4)],J=(_0x475c1c,_0x5f0b88,_0x483961,_0x4a9959)=>{const _0x10680b=_0x195db3;for(var _0x1c9ce6=_0x4a9959>0x1?void 0x0:_0x4a9959?H(_0x5f0b88,_0x483961):_0x5f0b88,_0x4de202=_0x475c1c[_0x10680b(0x142)]-0x1,_0x70ee70;_0x4de202>=0x0;_0x4de202--)(_0x70ee70=_0x475c1c[_0x4de202])&&(_0x1c9ce6=_0x70ee70(_0x1c9ce6)||_0x1c9ce6);return _0x1c9ce6;},y=(_0x13b6a7,_0x4d6b97)=>(_0x13b1f1,_0x25a6f4)=>_0x4d6b97(_0x13b1f1,_0x25a6f4,_0x13b6a7);let g=class extends c[_0x195db3(0x172)]{constructor(_0x388939,_0x408779){const _0x5d3a98=_0x195db3;super(),this['_threadCommentDataSourceService']=_0x388939,this[_0x5d3a98(0x19d)]=_0x408779,this['_initDataSource']();}[_0x195db3(0x187)](){const _0x223aa7=_0x195db3;this[_0x223aa7(0x198)][_0x223aa7(0x17c)]=this[_0x223aa7(0x19d)],this[_0x223aa7(0x198)][_0x223aa7(0x180)]=!0x1;}};g=J([y(0x0,M[_0x195db3(0x1a6)]),y(0x1,c['Inject'](p))],g);var F=Object[_0x195db3(0x16f)],L=Object[_0x195db3(0x1a4)],Z=(_0x19ef7e,_0x2c74c6,_0x398add)=>_0x2c74c6 in _0x19ef7e?F(_0x19ef7e,_0x2c74c6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x398add}):_0x19ef7e[_0x2c74c6]=_0x398add,W=(_0x3be2e7,_0x3c5cf3,_0x548ffb,_0x576e0b)=>{const _0x28e9da=_0x195db3;for(var _0x47cfe5=_0x576e0b>0x1?void 0x0:_0x576e0b?L(_0x3c5cf3,_0x548ffb):_0x3c5cf3,_0x44d2a4=_0x3be2e7[_0x28e9da(0x142)]-0x1,_0x5d2488;_0x44d2a4>=0x0;_0x44d2a4--)(_0x5d2488=_0x3be2e7[_0x44d2a4])&&(_0x47cfe5=_0x5d2488(_0x47cfe5)||_0x47cfe5);return _0x47cfe5;},O=(_0x4a2c23,_0x3e467a)=>(_0x433fac,_0x2177fc)=>_0x3e467a(_0x433fac,_0x2177fc,_0x4a2c23),N=(_0xee95f7,_0xb7021c,_0x3ea5bb)=>Z(_0xee95f7,typeof _0xb7021c!='symbol'?_0xb7021c+'':_0xb7021c,_0x3ea5bb);exports[_0x195db3(0x15e)]=class extends c[_0x195db3(0x155)]{constructor(_0x283a8b=D,_0x112f56,_0x37581f){const _0x18c80e=_0x195db3;super(),this[_0x18c80e(0x14f)]=_0x283a8b,this[_0x18c80e(0x162)]=_0x112f56,this[_0x18c80e(0x1a5)]=_0x37581f;const {..._0x57546a}=c[_0x18c80e(0x13e)]({},D,this[_0x18c80e(0x14f)]);this[_0x18c80e(0x1a5)][_0x18c80e(0x153)](q,_0x57546a);}[_0x195db3(0x191)](){[[p],[g],[_]]['forEach'](_0xbabd8e=>{const _0x51124a=_0x258e;this[_0x51124a(0x162)][_0x51124a(0x166)](_0xbabd8e);});}[_0x195db3(0x1af)](){const _0x42b9aa=_0x195db3;this['_injector'][_0x42b9aa(0x17a)](g),this[_0x42b9aa(0x162)][_0x42b9aa(0x17a)](_);}},N(exports[_0x195db3(0x15e)],_0x195db3(0x140),U),N(exports[_0x195db3(0x15e)],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x195db3(0x15e)]=W([c[_0x195db3(0x165)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x195db3(0x156)]),O(0x1,c['Inject'](c[_0x195db3(0x14a)])),O(0x2,c['IConfigService'])],exports[_0x195db3(0x15e)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xb18176=_0x3124;(function(_0x465bba,_0x2bbaa0){const _0x1f11a0=_0x3124,_0x259cd4=_0x465bba();while(!![]){try{const _0x2c6177=-parseInt(_0x1f11a0(0x19b))/0x1+parseInt(_0x1f11a0(0x1b5))/0x2*(-parseInt(_0x1f11a0(0x177))/0x3)+-parseInt(_0x1f11a0(0x1ae))/0x4*(parseInt(_0x1f11a0(0x15c))/0x5)+-parseInt(_0x1f11a0(0x198))/0x6*(-parseInt(_0x1f11a0(0x156))/0x7)+parseInt(_0x1f11a0(0x175))/0x8*(parseInt(_0x1f11a0(0x18f))/0x9)+parseInt(_0x1f11a0(0x1a4))/0xa+parseInt(_0x1f11a0(0x1a6))/0xb*(-parseInt(_0x1f11a0(0x1b2))/0xc);if(_0x2c6177===_0x2bbaa0)break;else _0x259cd4['push'](_0x259cd4['shift']());}catch(_0x25b606){_0x259cd4['push'](_0x259cd4['shift']());}}}(_0x1b07,0xdb42b));import{CommentService as _0x56f935,CollaborationSessionService as _0x4f26c9,UniverCollaborationClientPlugin as _0x2c8c03}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2491e5}from'@univerjs-pro/license';import{dayjs as _0x1f6619,UserManagerService as _0x2e7610,Inject as _0x42a167,Injector as _0x2faf0e,Disposable as _0x47c608,CustomRangeType as _0x395d63,UniverInstanceType as _0x369e42,DependentOn as _0x21c16a,IConfigService as _0x5f2d20,Plugin as _0x1bbe28,merge as _0x52ed40}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b2098}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3daa09,IThreadCommentDataSourceService as _0x481685}from'@univerjs/thread-comment';import{bufferTime as _0x156334}from'rxjs';import{HTTPService as _0x5108a4}from'@univerjs/network';const W=_0xb18176(0x182);function _0x3124(_0x1c967f,_0xf2904){const _0x1b0718=_0x1b07();return _0x3124=function(_0x31248f,_0x6581ee){_0x31248f=_0x31248f-0x154;let _0x42fdcc=_0x1b0718[_0x31248f];return _0x42fdcc;},_0x3124(_0x1c967f,_0xf2904);}var I=(_0x3b94cc=>(_0x3b94cc[_0x3b94cc['OpenOrReOpen']=0x0]=_0xb18176(0x19c),_0x3b94cc[_0x3b94cc['Solved']=0x1]=_0xb18176(0x18b),_0x3b94cc[_0x3b94cc[_0xb18176(0x1a0)]=-0x1]=_0xb18176(0x1a0),_0x3b94cc))(I||{}),v=(_0x1ef831=>(_0x1ef831[_0x1ef831[_0xb18176(0x159)]=0x0]=_0xb18176(0x159),_0x1ef831[_0x1ef831[_0xb18176(0x172)]=0x1]=_0xb18176(0x172),_0x1ef831[_0x1ef831[_0xb18176(0x171)]=0x2]=_0xb18176(0x171),_0x1ef831[_0x1ef831[_0xb18176(0x181)]=0x3]=_0xb18176(0x181),_0x1ef831[_0x1ef831['Delete']=0x4]=_0xb18176(0x1ac),_0x1ef831[_0x1ef831['Solve']=0x5]=_0xb18176(0x1a5),_0x1ef831[_0x1ef831[_0xb18176(0x1a0)]=-0x1]='UNRECOGNIZED',_0x1ef831))(v||{});const y=_0x68f3f0=>_0x1f6619(new Date(+_0x68f3f0))[_0xb18176(0x184)](_0xb18176(0x158)),B=async(_0x224f22,_0xec13bc)=>{const _0x3e7527=_0xb18176,_0x26053d=_0x224f22[_0x3e7527(0x1b7)](_0x2e7610),_0x4ed527=_0x224f22[_0x3e7527(0x1b7)](_0x5108a4);_0xec13bc[_0x3e7527(0x19e)](_0x222a26=>{const _0x50b095=_0x3e7527;_0x26053d[_0x50b095(0x1a3)](_0x222a26)&&_0xec13bc[_0x50b095(0x17c)](_0x222a26);}),_0xec13bc['size']&&(await _0x4ed527[_0x3e7527(0x1b7)](_0x3e7527(0x187),{'params':{'userIDs':[..._0xec13bc]}}))[_0x3e7527(0x17b)][_0x3e7527(0x179)][_0x3e7527(0x19e)](_0x538608=>{const _0x1aaf04=_0x3e7527;_0x538608&&_0x26053d[_0x1aaf04(0x15f)](_0x538608);});};var K=Object[_0xb18176(0x15d)],V=(_0x2b8184,_0x27c6fb,_0x709812,_0x180959)=>{const _0x608e39=_0xb18176;for(var _0x36ca98=_0x180959>0x1?void 0x0:_0x180959?K(_0x27c6fb,_0x709812):_0x27c6fb,_0x5785a3=_0x2b8184[_0x608e39(0x185)]-0x1,_0x34af0c;_0x5785a3>=0x0;_0x5785a3--)(_0x34af0c=_0x2b8184[_0x5785a3])&&(_0x36ca98=_0x34af0c(_0x36ca98)||_0x36ca98);return _0x36ca98;},p=(_0x57ad59,_0x52ef02)=>(_0x5ac057,_0x2899a6)=>_0x52ef02(_0x5ac057,_0x2899a6,_0x57ad59);let _=class extends _0x47c608{constructor(_0x24b08a,_0x1574d0,_0x1e3fce,_0x2f6ad1){const _0x1d50af=_0xb18176;super(),this[_0x1d50af(0x196)]=_0x24b08a,this['_threadCommentModel']=_0x1574d0,this['_userService']=_0x1e3fce,this[_0x1d50af(0x18c)]=_0x2f6ad1,this[_0x1d50af(0x1ad)](),this[_0x1d50af(0x16a)]();}[_0xb18176(0x16a)](){const _0x429353=_0xb18176;this[_0x429353(0x16b)](this['_threadCommentModel'][_0x429353(0x163)][_0x429353(0x1b0)](_0x156334(0x10))[_0x429353(0x1b9)](_0x478888=>{const _0x2a85d0=_0x429353,_0x619748=new Set();_0x478888[_0x2a85d0(0x19e)](_0x3bf33b=>{const _0x20d883=_0x2a85d0;switch(_0x3bf33b[_0x20d883(0x1b8)]){case'add':{const _0x3dd168=_0x3bf33b[_0x20d883(0x188)][_0x20d883(0x1ab)];_0x619748[_0x20d883(0x169)](_0x3dd168);break;}}}),B(this[_0x2a85d0(0x18c)],_0x619748);}));}[_0xb18176(0x1ad)](){const _0x488778=_0xb18176;this['disposeWithMe'](this[_0x488778(0x196)]['commentUpdate$'][_0x488778(0x1b9)](async _0x243df4=>{const _0x50b355=_0x488778;var _0xdd9fbb,_0x1a357b,_0x21f22d,_0xf6371a;const _0x3348ea=(_0xdd9fbb=this['_threadCommentModel'][_0x50b355(0x161)](_0x243df4[_0x50b355(0x1a2)])[_0x50b355(0x1b1)](_0x16fbe9=>_0x16fbe9['threadId']===_0x243df4[_0x50b355(0x16c)]))==null?void 0x0:_0xdd9fbb[_0x50b355(0x199)];if(!_0x3348ea)return;const {unitId:_0xfcbf6a,subUnitId:_0x5e8847}=_0x3348ea;switch(_0x243df4[_0x50b355(0x18a)]&&this['_userService'][_0x50b355(0x15f)](_0x243df4[_0x50b355(0x18a)]),_0x243df4[_0x50b355(0x1b8)]){case v[_0x50b355(0x172)]:break;case v[_0x50b355(0x171)]:{this[_0x50b355(0x173)][_0x50b355(0x1af)](_0xfcbf6a,_0x5e8847,{'unitId':_0xfcbf6a,'subUnitId':_0x5e8847,'ref':'','id':_0x243df4[_0x50b355(0x192)],'dT':y(+_0x243df4[_0x50b355(0x186)]),'threadId':_0x243df4[_0x50b355(0x16c)],'personId':(_0x21f22d=(_0x1a357b=_0x243df4[_0x50b355(0x18a)])==null?void 0x0:_0x1a357b[_0x50b355(0x15b)])!=null?_0x21f22d:_0x243df4[_0x50b355(0x165)],'text':JSON['parse'](_0x243df4[_0x50b355(0x183)]),'parentId':_0x3348ea['id']});break;}case v[_0x50b355(0x1ac)]:{const _0xc214ce=this['_threadCommentModel']['getComment'](_0xfcbf6a,_0x5e8847,_0x243df4['replyId']);_0xc214ce&&_0xc214ce[_0x50b355(0x155)]&&this[_0x50b355(0x173)][_0x50b355(0x191)](_0xfcbf6a,_0x5e8847,_0x243df4[_0x50b355(0x192)]);break;}case v['Edit']:{this[_0x50b355(0x173)][_0x50b355(0x1b6)](_0xfcbf6a,_0x5e8847,{'commentId':_0x243df4[_0x50b355(0x192)],'text':JSON[_0x50b355(0x197)](_0x243df4[_0x50b355(0x183)])});break;}case v['Solve']:{const _0x1d2f16=(_0xf6371a=this[_0x50b355(0x173)][_0x50b355(0x161)](_0x243df4[_0x50b355(0x1a2)])[_0x50b355(0x1b1)](_0x1514b3=>_0x1514b3[_0x50b355(0x16c)]===_0x243df4[_0x50b355(0x16c)]))==null?void 0x0:_0xf6371a[_0x50b355(0x199)];_0x1d2f16&&this[_0x50b355(0x173)]['resolveComment'](_0xfcbf6a,_0x5e8847,_0x1d2f16['id'],_0x243df4['solved']===I[_0x50b355(0x18b)]);break;}}}));}};_=V([p(0x0,_0x42a167(_0x56f935)),p(0x1,_0x42a167(_0x3daa09)),p(0x2,_0x42a167(_0x2e7610)),p(0x3,_0x42a167(_0x2faf0e))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17c4e6,_0x55925c,_0x5146f7,_0x30d701)=>{for(var _0x5504df=_0x30d701>0x1?void 0x0:_0x30d701?k(_0x55925c,_0x5146f7):_0x55925c,_0x482889=_0x17c4e6['length']-0x1,_0x402071;_0x482889>=0x0;_0x482889--)(_0x402071=_0x17c4e6[_0x482889])&&(_0x5504df=_0x402071(_0x5504df)||_0x5504df);return _0x5504df;},b=(_0x45e320,_0x503df0)=>(_0x2cfdec,_0x2f055c)=>_0x503df0(_0x2cfdec,_0x2f055c,_0x45e320);function _0x1b07(){const _0x268913=['2444HzXPRj','updateComment','get','type','subscribe','symbol','parentId','44562ZohQqS','/solved','YYYY/MM/DD\x20HH:mm','Unknown','reply','userID','23740lmsySx','getOwnPropertyDescriptor','solved','addUser','pluginName','getUnit','_initDataSource','commentUpdate$','/edit','userId','_threadCommentDataSource','/delete','values','add','_initUserSync','disposeWithMe','threadId','onReady','onStarting','getCurrentUser','_configService','Reply','Add','_threadCommentModel','rangeId','40KBudoV','saveCommentToSnapshot','4341DFBEVR','_httpService','users','getMemberID','body','delete','setConfig','post','_userService','_sessionService','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','format','length','createTimestamp','/universer-api/user/list','payload','map','user','Solved','_injector','filter','resolved','2371401ajxMDJ','/add','deleteComment','replyId','COMMENT','error','rangeType','_commentService','parse','486glSAWF','root','ref','63369hyMgqg','OpenOrReOpen','code','forEach','UNIVER_UNKNOWN','UNRECOGNIZED','replies','unitId','getUser','16806960VHTDSn','Solve','165cQQdjT','/universer-api/comment/unit/','comments','_threadCommentDataSourceService','syncUpdateMutationToColla','personId','Delete','_init','44FkGFal','addComment','pipe','find','585492FYjyhK','requireSession','slice'];_0x1b07=function(){return _0x268913;};return _0x1b07();}function X(_0x43e197,_0x47fded){const _0x5c97c3=_0xb18176,_0x3c2f1a=_0x43e197[_0x5c97c3(0x1a1)][0x0];return{..._0x47fded,'id':_0x3c2f1a['replyId'],'resolved':_0x43e197[_0x5c97c3(0x15e)]===0x1,'dT':y(_0x3c2f1a['createTimestamp']),'personId':_0x3c2f1a[_0x5c97c3(0x165)],'threadId':_0x3c2f1a[_0x5c97c3(0x16c)]};}function ee(_0xc485c9,_0x14dc30,_0x5e0796){const _0x2e6e00=_0xb18176;var _0x42d239,_0xc438ae;if(((_0xc438ae=(_0x42d239=_0xc485c9==null?void 0x0:_0xc485c9[_0x2e6e00(0x1a1)])==null?void 0x0:_0x42d239['length'])!=null?_0xc438ae:0x0)>0x0){const _0x1c0be1=(_0x477dad,_0x116014)=>({'id':_0x477dad[_0x2e6e00(0x192)],'threadId':_0x477dad[_0x2e6e00(0x16c)],'dT':y(_0x477dad[_0x2e6e00(0x186)]),'personId':_0x477dad['userId'],'resolved':_0xc485c9[_0x2e6e00(0x15e)]===I[_0x2e6e00(0x18b)],'unitId':_0x14dc30,'subUnitId':_0x5e0796,'text':JSON[_0x2e6e00(0x197)](_0x477dad[_0x2e6e00(0x183)]),'parentId':_0x116014}),_0x6a6f32=_0x1c0be1(_0xc485c9['replies'][0x0]);return{..._0x6a6f32,'children':_0xc485c9[_0x2e6e00(0x1a1)][_0x2e6e00(0x1b4)](0x1)[_0x2e6e00(0x189)](_0x342b6d=>_0x1c0be1(_0x342b6d,_0x6a6f32['id']))};}return null;}let S=class{constructor(_0xce770f,_0x471032,_0x361464){const _0xab367e=_0xb18176;this[_0xab367e(0x178)]=_0xce770f,this[_0xab367e(0x17f)]=_0x471032,this[_0xab367e(0x180)]=_0x361464;}async[_0xb18176(0x1af)](_0x1d2416){const _0x149f2b=_0xb18176;var _0x2625a5,_0x2c81c6;const {parentId:_0x59dc36,unitId:_0x20a4e8,text:_0x2a7e0d,threadId:_0x343da6}=_0x1d2416,_0x2604ad=(_0x2c81c6=(_0x2625a5=_0x2a7e0d['customRanges'])==null?void 0x0:_0x2625a5[_0x149f2b(0x18d)](_0x5e222c=>_0x5e222c[_0x149f2b(0x195)]===_0x395d63[_0x149f2b(0x193)])[_0x149f2b(0x189)](_0x254765=>_0x254765[_0x149f2b(0x174)]))!=null?_0x2c81c6:[],_0x2f8b5b=JSON['stringify'](_0x2a7e0d),_0x5d7790=(await this[_0x149f2b(0x180)]['requireSession'](_0x20a4e8))[_0x149f2b(0x17a)]();if(_0x59dc36){const _0x3d32ad={'memberId':_0x5d7790,'unitId':_0x20a4e8,'content':_0x2f8b5b,'mention':_0x2604ad,'threadId':_0x343da6},_0x40faf8=(await this[_0x149f2b(0x178)]['post'](_0x149f2b(0x1a7)+_0x20a4e8+'/reply',{'body':_0x3d32ad}))['body'][_0x149f2b(0x15a)];return{..._0x1d2416,'id':_0x40faf8['replyId'],'dT':_0x1f6619(+_0x40faf8['createTimestamp'])[_0x149f2b(0x184)](_0x149f2b(0x158)),'personId':_0x40faf8[_0x149f2b(0x165)]};}else{const _0x540a15={'memberId':_0x5d7790,'unitId':_0x20a4e8,'content':_0x2f8b5b,'mention':_0x2604ad},_0x4d8c9b=await this[_0x149f2b(0x178)][_0x149f2b(0x17e)](_0x149f2b(0x1a7)+_0x20a4e8+_0x149f2b(0x190),{'body':_0x540a15});return X(_0x4d8c9b[_0x149f2b(0x17b)]['comment'],_0x1d2416);}}async['updateComment'](_0x266583){const _0x47c5e4=_0xb18176;var _0x7ac632,_0x454ace;const {text:_0x3fa0ad,unitId:_0x207134}=_0x266583,_0x4f315f=(_0x454ace=(_0x7ac632=_0x3fa0ad['customRanges'])==null?void 0x0:_0x7ac632[_0x47c5e4(0x18d)](_0x410e5c=>_0x410e5c[_0x47c5e4(0x195)]===_0x395d63[_0x47c5e4(0x193)])['map'](_0x29220d=>_0x29220d['rangeId']))!=null?_0x454ace:[],_0x32b6f8=JSON['stringify'](_0x3fa0ad),_0x14fc76=_0x266583[_0x47c5e4(0x16c)],_0x439bb3=_0x266583['id'],_0x4581dd={'memberId':(await this[_0x47c5e4(0x180)][_0x47c5e4(0x1b3)](_0x207134))['getMemberID'](),'unitId':_0x207134,'threadId':_0x14fc76,'mention':_0x4f315f,'content':_0x32b6f8,'replyId':_0x439bb3},_0x312d7b=await this['_httpService']['post'](_0x47c5e4(0x1a7)+_0x207134+_0x47c5e4(0x164),{'body':_0x4581dd});return!_0x312d7b[_0x47c5e4(0x17b)]['error']||_0x312d7b[_0x47c5e4(0x17b)]['error'][_0x47c5e4(0x19d)]===0x1;}async['resolveComment'](_0xfb80d8){const _0xf8aec1=_0xb18176,{unitId:_0x24602e}=_0xfb80d8,_0x5da0f8=_0xfb80d8[_0xf8aec1(0x16c)],_0x1064c2={'memberId':this['_userService'][_0xf8aec1(0x16f)]()[_0xf8aec1(0x15b)],'unitId':_0x24602e,'threadId':_0x5da0f8,'solved':_0xfb80d8[_0xf8aec1(0x18e)]?I[_0xf8aec1(0x18b)]:I[_0xf8aec1(0x19c)]},_0x13c079=await this[_0xf8aec1(0x178)][_0xf8aec1(0x17e)]('/universer-api/comment/unit/'+_0x24602e+_0xf8aec1(0x157),{'body':_0x1064c2});return!_0x13c079['body'][_0xf8aec1(0x194)]||_0x13c079[_0xf8aec1(0x17b)][_0xf8aec1(0x194)][_0xf8aec1(0x19d)]===0x1;}async['deleteComment'](_0xf8f946,_0x3d2a98,_0xde695b,_0x442709){const _0x44dc17=_0xb18176,_0x240123={'memberId':(await this[_0x44dc17(0x180)][_0x44dc17(0x1b3)](_0xf8f946))[_0x44dc17(0x17a)](),'threadId':_0xde695b,'replyId':_0x442709,'unitId':_0xf8f946},_0x15d0b7=await this[_0x44dc17(0x178)][_0x44dc17(0x17e)](_0x44dc17(0x1a7)+_0xf8f946+_0x44dc17(0x167),{'body':_0x240123});return!_0x15d0b7[_0x44dc17(0x17b)]['error']||_0x15d0b7['body'][_0x44dc17(0x194)][_0x44dc17(0x19d)]===0x1;}async['listComments'](_0x3d40f8,_0x5d38fb,_0x2ce677){const _0xf632f3=_0xb18176,_0x2a9b91={'unitId':_0x3d40f8,'threadId':_0x2ce677},_0x23d258=await this['_httpService']['post'](_0xf632f3(0x1a7)+_0x3d40f8+'/list',{'body':_0x2a9b91}),_0xac3570=_0x2ce677['map'](_0x144abf=>ee(_0x23d258[_0xf632f3(0x17b)][_0xf632f3(0x1a8)][_0x144abf],_0x3d40f8,_0x5d38fb))[_0xf632f3(0x18d)](Boolean);return Object[_0xf632f3(0x168)](_0x23d258[_0xf632f3(0x17b)][_0xf632f3(0x179)])[_0xf632f3(0x19e)](_0x1c132f=>{const _0x2752ce=_0xf632f3;this[_0x2752ce(0x17f)][_0x2752ce(0x15f)](_0x1c132f);}),_0xac3570;}[_0xb18176(0x176)](_0x3de6e4){const _0xd0a8d9=_0xb18176;return{'id':_0x3de6e4['id'],'threadId':_0x3de6e4['threadId'],'ref':_0x3de6e4[_0xd0a8d9(0x19a)]};}};S=Q([b(0x0,_0x42a167(_0x5108a4)),b(0x1,_0x42a167(_0x2e7610)),b(0x2,_0x42a167(_0x4f26c9))],S);var re=Object[_0xb18176(0x15d)],te=(_0x5b14ac,_0x3db8d4,_0x2dfc25,_0x474397)=>{const _0x1e94a2=_0xb18176;for(var _0x4dd0e8=_0x474397>0x1?void 0x0:_0x474397?re(_0x3db8d4,_0x2dfc25):_0x3db8d4,_0x2253f5=_0x5b14ac[_0x1e94a2(0x185)]-0x1,_0x5c2a56;_0x2253f5>=0x0;_0x2253f5--)(_0x5c2a56=_0x5b14ac[_0x2253f5])&&(_0x4dd0e8=_0x5c2a56(_0x4dd0e8)||_0x4dd0e8);return _0x4dd0e8;},M=(_0x53bcce,_0x2bbd62)=>(_0x13a92d,_0x54b2f9)=>_0x2bbd62(_0x13a92d,_0x54b2f9,_0x53bcce);let f=class extends _0x47c608{constructor(_0x9fd847,_0x677d16){const _0xcd23ae=_0xb18176;super(),this[_0xcd23ae(0x1a9)]=_0x9fd847,this[_0xcd23ae(0x166)]=_0x677d16,this['_initDataSource']();}[_0xb18176(0x162)](){const _0x21f1b8=_0xb18176;this['_threadCommentDataSourceService']['dataSource']=this[_0x21f1b8(0x166)],this['_threadCommentDataSourceService'][_0x21f1b8(0x1aa)]=!0x1;}};f=te([M(0x0,_0x481685),M(0x1,_0x42a167(S))],f);var se=Object['defineProperty'],oe=Object[_0xb18176(0x15d)],ne=(_0x1e2701,_0x14aecb,_0x273c31)=>_0x14aecb in _0x1e2701?se(_0x1e2701,_0x14aecb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x273c31}):_0x1e2701[_0x14aecb]=_0x273c31,ie=(_0x3a9795,_0x5d1db5,_0x2eb15a,_0x25e591)=>{const _0x1a70f4=_0xb18176;for(var _0x57640a=_0x25e591>0x1?void 0x0:_0x25e591?oe(_0x5d1db5,_0x2eb15a):_0x5d1db5,_0x261f91=_0x3a9795[_0x1a70f4(0x185)]-0x1,_0x4c9132;_0x261f91>=0x0;_0x261f91--)(_0x4c9132=_0x3a9795[_0x261f91])&&(_0x57640a=_0x4c9132(_0x57640a)||_0x57640a);return _0x57640a;},N=(_0x197790,_0x1a448a)=>(_0x13d906,_0x286a33)=>_0x1a448a(_0x13d906,_0x286a33,_0x197790),$=(_0x411316,_0x4bdb5b,_0x950d79)=>ne(_0x411316,typeof _0x4bdb5b!=_0xb18176(0x154)?_0x4bdb5b+'':_0x4bdb5b,_0x950d79);let g=class extends _0x1bbe28{constructor(_0x2389c8=O,_0x1a02d5,_0x38e300){const _0x17d4c2=_0xb18176;super(),this['_config']=_0x2389c8,this['_injector']=_0x1a02d5,this[_0x17d4c2(0x170)]=_0x38e300;const {..._0x372acf}=_0x52ed40({},O,this['_config']);this[_0x17d4c2(0x170)][_0x17d4c2(0x17d)](z,_0x372acf);}[_0xb18176(0x16e)](){const _0x4f332e=_0xb18176;[[S],[f],[_]][_0x4f332e(0x19e)](_0x46a1bf=>{const _0x1252d1=_0x4f332e;this[_0x1252d1(0x18c)][_0x1252d1(0x169)](_0x46a1bf);});}[_0xb18176(0x16d)](){const _0x524ced=_0xb18176;this[_0x524ced(0x18c)]['get'](f),this[_0x524ced(0x18c)][_0x524ced(0x1b7)](_);}};$(g,_0xb18176(0x160),W),$(g,_0xb18176(0x1b8),_0x369e42[_0xb18176(0x19f)]),g=ie([_0x21c16a(_0x2b2098,_0x2c8c03,_0x2491e5),N(0x1,_0x42a167(_0x2faf0e)),N(0x2,_0x5f2d20)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x30354b=_0x6b72;(function(_0x19d239,_0x4952ed){const _0x4ca1fb=_0x6b72,_0x19fe23=_0x19d239();while(!![]){try{const _0x3084f5=-parseInt(_0x4ca1fb(0x1f4))/0x1+parseInt(_0x4ca1fb(0x208))/0x2*(parseInt(_0x4ca1fb(0x1da))/0x3)+-parseInt(_0x4ca1fb(0x1db))/0x4*(parseInt(_0x4ca1fb(0x1ed))/0x5)+parseInt(_0x4ca1fb(0x200))/0x6*(parseInt(_0x4ca1fb(0x205))/0x7)+parseInt(_0x4ca1fb(0x1dd))/0x8*(parseInt(_0x4ca1fb(0x222))/0x9)+parseInt(_0x4ca1fb(0x1e1))/0xa*(-parseInt(_0x4ca1fb(0x20d))/0xb)+-parseInt(_0x4ca1fb(0x21e))/0xc*(-parseInt(_0x4ca1fb(0x1d6))/0xd);if(_0x3084f5===_0x4952ed)break;else _0x19fe23['push'](_0x19fe23['shift']());}catch(_0x39d700){_0x19fe23['push'](_0x19fe23['shift']());}}}(_0x403e,0x81e18));import{CommentService as _0x3237e5,CollaborationSessionService as _0x4c60bb,UniverCollaborationClientPlugin as _0x516653}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2125bb}from'@univerjs-pro/license';import{dayjs as _0x4a080f,UserManagerService as _0x3579fd,Inject as _0x5d6dec,Injector as _0x5eef6b,Disposable as _0x5da71c,CustomRangeType as _0x300af4,UniverInstanceType as _0x3bb98c,DependentOn as _0x413398,IConfigService as _0x195d4b,Plugin as _0x3bc542,merge as _0x3f3339}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x32a910}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59f117,IThreadCommentDataSourceService as _0x5a2639}from'@univerjs/thread-comment';import{bufferTime as _0x298b90}from'rxjs';import{HTTPService as _0x365edd}from'@univerjs/network';const W=_0x30354b(0x213);var I=(_0x42d073=>(_0x42d073[_0x42d073['OpenOrReOpen']=0x0]=_0x30354b(0x20c),_0x42d073[_0x42d073[_0x30354b(0x1c9)]=0x1]=_0x30354b(0x1c9),_0x42d073[_0x42d073[_0x30354b(0x228)]=-0x1]=_0x30354b(0x228),_0x42d073))(I||{}),v=(_0xdac16d=>(_0xdac16d[_0xdac16d[_0x30354b(0x227)]=0x0]=_0x30354b(0x227),_0xdac16d[_0xdac16d[_0x30354b(0x1eb)]=0x1]=_0x30354b(0x1eb),_0xdac16d[_0xdac16d['Reply']=0x2]=_0x30354b(0x206),_0xdac16d[_0xdac16d[_0x30354b(0x1e6)]=0x3]=_0x30354b(0x1e6),_0xdac16d[_0xdac16d[_0x30354b(0x21c)]=0x4]=_0x30354b(0x21c),_0xdac16d[_0xdac16d[_0x30354b(0x1f9)]=0x5]=_0x30354b(0x1f9),_0xdac16d[_0xdac16d[_0x30354b(0x228)]=-0x1]='UNRECOGNIZED',_0xdac16d))(v||{});function _0x6b72(_0x14a30b,_0x560ebb){const _0x403ee1=_0x403e();return _0x6b72=function(_0x6b7255,_0x530bbb){_0x6b7255=_0x6b7255-0x1bf;let _0x1ed82a=_0x403ee1[_0x6b7255];return _0x1ed82a;},_0x6b72(_0x14a30b,_0x560ebb);}const y=_0x20d043=>_0x4a080f(new Date(+_0x20d043))[_0x30354b(0x1dc)](_0x30354b(0x1ea)),B=async(_0x8aafcb,_0x268328)=>{const _0x272da7=_0x30354b,_0x5a6e33=_0x8aafcb[_0x272da7(0x1f2)](_0x3579fd),_0x4580be=_0x8aafcb['get'](_0x365edd);_0x268328[_0x272da7(0x1f8)](_0x5b728e=>{const _0x20658e=_0x272da7;_0x5a6e33['getUser'](_0x5b728e)&&_0x268328[_0x20658e(0x1cd)](_0x5b728e);}),_0x268328[_0x272da7(0x20e)]&&(await _0x4580be[_0x272da7(0x1f2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x268328]}}))['body'][_0x272da7(0x1c0)][_0x272da7(0x1f8)](_0x3d3b14=>{_0x3d3b14&&_0x5a6e33['addUser'](_0x3d3b14);});};var K=Object[_0x30354b(0x1cf)],V=(_0x21890e,_0x355929,_0x52281e,_0x33a0bb)=>{for(var _0x2d5ee7=_0x33a0bb>0x1?void 0x0:_0x33a0bb?K(_0x355929,_0x52281e):_0x355929,_0x64e2f4=_0x21890e['length']-0x1,_0x187cda;_0x64e2f4>=0x0;_0x64e2f4--)(_0x187cda=_0x21890e[_0x64e2f4])&&(_0x2d5ee7=_0x187cda(_0x2d5ee7)||_0x2d5ee7);return _0x2d5ee7;},p=(_0x32e8d0,_0x11768a)=>(_0xb1bcde,_0x41d10e)=>_0x11768a(_0xb1bcde,_0x41d10e,_0x32e8d0);function _0x403e(){const _0x9332c1=['383411wVdAmB','Reply','_threadCommentModel','973118bKoQQJ','unitId','parentId','post','OpenOrReOpen','8591EPYukU','size','map','deleteComment','/edit','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','listComments','add','code','requireSession','length','find','_userService','_injector','Delete','thread-comment-data-source.config','12RTfxpP','disposeWithMe','customRanges','content','3332061xALvhp','type','COMMENT','subscribe','resolveComment','Unknown','UNRECOGNIZED','userID','rangeType','users','commentUpdate$','updateComment','userId','pluginName','UNIVER_UNKNOWN','/reply','parse','setConfig','Solved','user','symbol','syncUpdateMutationToColla','delete','getMemberID','getOwnPropertyDescriptor','dataSource','_httpService','/universer-api/comment/unit/','rangeId','error','replies','8514857XxTsix','_config','personId','replyId','3enWGLm','2360572tLMfeG','format','16yJVYPp','_threadCommentDataSourceService','root','stringify','12940bAyFEK','getComment','resolved','addComment','solved','Edit','_threadCommentDataSource','ref','getUnit','YYYY/MM/DD\x20HH:mm','Add','defineProperty','5tfTzCe','slice','comment','addUser','_commentService','get','_initUserSync','789944uVQuGT','pipe','_sessionService','threadId','forEach','Solve','values','_init','filter','comments','body','_configService','114URdPkj','/list','onReady','onStarting','createTimestamp'];_0x403e=function(){return _0x9332c1;};return _0x403e();}let _=class extends _0x5da71c{constructor(_0x5774e9,_0xcf3eec,_0x1b0940,_0x585d2e){const _0xaf08c6=_0x30354b;super(),this[_0xaf08c6(0x1f1)]=_0x5774e9,this[_0xaf08c6(0x207)]=_0xcf3eec,this[_0xaf08c6(0x21a)]=_0x1b0940,this['_injector']=_0x585d2e,this[_0xaf08c6(0x1fb)](),this[_0xaf08c6(0x1f3)]();}[_0x30354b(0x1f3)](){const _0x5d96f1=_0x30354b;this[_0x5d96f1(0x21f)](this[_0x5d96f1(0x207)]['commentUpdate$'][_0x5d96f1(0x1f5)](_0x298b90(0x10))[_0x5d96f1(0x225)](_0x3cef68=>{const _0x39e980=_0x5d96f1,_0x2e0b23=new Set();_0x3cef68[_0x39e980(0x1f8)](_0x20cf2e=>{const _0x253361=_0x39e980;switch(_0x20cf2e['type']){case _0x253361(0x215):{const _0x5c43f4=_0x20cf2e['payload'][_0x253361(0x1d8)];_0x2e0b23[_0x253361(0x215)](_0x5c43f4);break;}}}),B(this['_injector'],_0x2e0b23);}));}[_0x30354b(0x1fb)](){const _0x223fc0=_0x30354b;this[_0x223fc0(0x21f)](this[_0x223fc0(0x1f1)][_0x223fc0(0x1c1)][_0x223fc0(0x225)](async _0x306253=>{const _0x189772=_0x223fc0;var _0xb394a0,_0x2503e5,_0x5a8b8e,_0xa435aa;const _0x2b3317=(_0xb394a0=this['_threadCommentModel']['getUnit'](_0x306253['unitId'])[_0x189772(0x219)](_0x5c3c51=>_0x5c3c51[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xb394a0[_0x189772(0x1df)];if(!_0x2b3317)return;const {unitId:_0x4f9c5f,subUnitId:_0x5e762c}=_0x2b3317;switch(_0x306253['user']&&this[_0x189772(0x21a)]['addUser'](_0x306253[_0x189772(0x1ca)]),_0x306253[_0x189772(0x223)]){case v[_0x189772(0x1eb)]:break;case v[_0x189772(0x206)]:{this['_threadCommentModel'][_0x189772(0x1e4)](_0x4f9c5f,_0x5e762c,{'unitId':_0x4f9c5f,'subUnitId':_0x5e762c,'ref':'','id':_0x306253[_0x189772(0x1d9)],'dT':y(+_0x306253['createTimestamp']),'threadId':_0x306253['threadId'],'personId':(_0x5a8b8e=(_0x2503e5=_0x306253[_0x189772(0x1ca)])==null?void 0x0:_0x2503e5['userID'])!=null?_0x5a8b8e:_0x306253[_0x189772(0x1c3)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)]),'parentId':_0x2b3317['id']});break;}case v[_0x189772(0x21c)]:{const _0x54e3ac=this['_threadCommentModel'][_0x189772(0x1e2)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);_0x54e3ac&&_0x54e3ac[_0x189772(0x20a)]&&this[_0x189772(0x207)][_0x189772(0x210)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);break;}case v[_0x189772(0x1e6)]:{this[_0x189772(0x207)][_0x189772(0x1c2)](_0x4f9c5f,_0x5e762c,{'commentId':_0x306253[_0x189772(0x1d9)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)])});break;}case v[_0x189772(0x1f9)]:{const _0x1dfc6d=(_0xa435aa=this['_threadCommentModel'][_0x189772(0x1e9)](_0x306253[_0x189772(0x209)])[_0x189772(0x219)](_0xc6f364=>_0xc6f364[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xa435aa[_0x189772(0x1df)];_0x1dfc6d&&this[_0x189772(0x207)][_0x189772(0x226)](_0x4f9c5f,_0x5e762c,_0x1dfc6d['id'],_0x306253[_0x189772(0x1e5)]===I[_0x189772(0x1c9)]);break;}}}));}};_=V([p(0x0,_0x5d6dec(_0x3237e5)),p(0x1,_0x5d6dec(_0x59f117)),p(0x2,_0x5d6dec(_0x3579fd)),p(0x3,_0x5d6dec(_0x5eef6b))],_);const z=_0x30354b(0x21d),O={};var k=Object[_0x30354b(0x1cf)],Q=(_0x19cddd,_0x41e075,_0x110441,_0x40c97a)=>{for(var _0x5f18a9=_0x40c97a>0x1?void 0x0:_0x40c97a?k(_0x41e075,_0x110441):_0x41e075,_0xb79e8d=_0x19cddd['length']-0x1,_0x339154;_0xb79e8d>=0x0;_0xb79e8d--)(_0x339154=_0x19cddd[_0xb79e8d])&&(_0x5f18a9=_0x339154(_0x5f18a9)||_0x5f18a9);return _0x5f18a9;},b=(_0x5a3fb1,_0xa9a51c)=>(_0x4b0db5,_0xefe791)=>_0xa9a51c(_0x4b0db5,_0xefe791,_0x5a3fb1);function X(_0x36f817,_0x281e45){const _0x55f41a=_0x30354b,_0x1c0013=_0x36f817[_0x55f41a(0x1d5)][0x0];return{..._0x281e45,'id':_0x1c0013[_0x55f41a(0x1d9)],'resolved':_0x36f817[_0x55f41a(0x1e5)]===0x1,'dT':y(_0x1c0013[_0x55f41a(0x204)]),'personId':_0x1c0013[_0x55f41a(0x1c3)],'threadId':_0x1c0013[_0x55f41a(0x1f7)]};}function ee(_0x3eaaa7,_0x343457,_0x2dea6a){const _0x1e3ae5=_0x30354b;var _0x32a9d1,_0x13361f;if(((_0x13361f=(_0x32a9d1=_0x3eaaa7==null?void 0x0:_0x3eaaa7[_0x1e3ae5(0x1d5)])==null?void 0x0:_0x32a9d1[_0x1e3ae5(0x218)])!=null?_0x13361f:0x0)>0x0){const _0x55c69a=(_0x12250c,_0x17f27b)=>({'id':_0x12250c['replyId'],'threadId':_0x12250c[_0x1e3ae5(0x1f7)],'dT':y(_0x12250c['createTimestamp']),'personId':_0x12250c[_0x1e3ae5(0x1c3)],'resolved':_0x3eaaa7[_0x1e3ae5(0x1e5)]===I[_0x1e3ae5(0x1c9)],'unitId':_0x343457,'subUnitId':_0x2dea6a,'text':JSON[_0x1e3ae5(0x1c7)](_0x12250c[_0x1e3ae5(0x221)]),'parentId':_0x17f27b}),_0x3beb10=_0x55c69a(_0x3eaaa7[_0x1e3ae5(0x1d5)][0x0]);return{..._0x3beb10,'children':_0x3eaaa7[_0x1e3ae5(0x1d5)][_0x1e3ae5(0x1ee)](0x1)[_0x1e3ae5(0x20f)](_0x16f8d6=>_0x55c69a(_0x16f8d6,_0x3beb10['id']))};}return null;}let S=class{constructor(_0x9ec1cb,_0x27ca8d,_0x27c967){const _0x232620=_0x30354b;this[_0x232620(0x1d1)]=_0x9ec1cb,this[_0x232620(0x21a)]=_0x27ca8d,this[_0x232620(0x1f6)]=_0x27c967;}async['addComment'](_0x4b86a9){const _0x4ef882=_0x30354b;var _0x1a9947,_0x4e5133;const {parentId:_0x9ad8ae,unitId:_0x3c85c6,text:_0x10e433,threadId:_0xf825cc}=_0x4b86a9,_0x10154d=(_0x4e5133=(_0x1a9947=_0x10e433['customRanges'])==null?void 0x0:_0x1a9947[_0x4ef882(0x1fc)](_0x527b20=>_0x527b20[_0x4ef882(0x1bf)]===_0x300af4[_0x4ef882(0x224)])[_0x4ef882(0x20f)](_0x3f9ab0=>_0x3f9ab0[_0x4ef882(0x1d3)]))!=null?_0x4e5133:[],_0x159a50=JSON[_0x4ef882(0x1e0)](_0x10e433),_0x350a15=(await this[_0x4ef882(0x1f6)]['requireSession'](_0x3c85c6))[_0x4ef882(0x1ce)]();if(_0x9ad8ae){const _0xba2370={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d,'threadId':_0xf825cc},_0x558d6a=(await this[_0x4ef882(0x1d1)]['post'](_0x4ef882(0x1d2)+_0x3c85c6+_0x4ef882(0x1c6),{'body':_0xba2370}))[_0x4ef882(0x1fe)]['reply'];return{..._0x4b86a9,'id':_0x558d6a['replyId'],'dT':_0x4a080f(+_0x558d6a['createTimestamp'])[_0x4ef882(0x1dc)](_0x4ef882(0x1ea)),'personId':_0x558d6a[_0x4ef882(0x1c3)]};}else{const _0xa33ed1={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d},_0xab587f=await this[_0x4ef882(0x1d1)]['post']('/universer-api/comment/unit/'+_0x3c85c6+'/add',{'body':_0xa33ed1});return X(_0xab587f['body'][_0x4ef882(0x1ef)],_0x4b86a9);}}async[_0x30354b(0x1c2)](_0x570878){const _0x49df70=_0x30354b;var _0x22914d,_0x1f5466;const {text:_0x22ac6f,unitId:_0x2adb4a}=_0x570878,_0x10cf20=(_0x1f5466=(_0x22914d=_0x22ac6f[_0x49df70(0x220)])==null?void 0x0:_0x22914d[_0x49df70(0x1fc)](_0x5b765f=>_0x5b765f[_0x49df70(0x1bf)]===_0x300af4['COMMENT'])['map'](_0xd3e42c=>_0xd3e42c[_0x49df70(0x1d3)]))!=null?_0x1f5466:[],_0x432927=JSON['stringify'](_0x22ac6f),_0x483e67=_0x570878[_0x49df70(0x1f7)],_0x6e2278=_0x570878['id'],_0x1ff66b={'memberId':(await this[_0x49df70(0x1f6)][_0x49df70(0x217)](_0x2adb4a))[_0x49df70(0x1ce)](),'unitId':_0x2adb4a,'threadId':_0x483e67,'mention':_0x10cf20,'content':_0x432927,'replyId':_0x6e2278},_0x381ad0=await this[_0x49df70(0x1d1)][_0x49df70(0x20b)](_0x49df70(0x1d2)+_0x2adb4a+_0x49df70(0x211),{'body':_0x1ff66b});return!_0x381ad0[_0x49df70(0x1fe)]['error']||_0x381ad0[_0x49df70(0x1fe)]['error']['code']===0x1;}async[_0x30354b(0x226)](_0x176f6d){const _0x505721=_0x30354b,{unitId:_0x31bafc}=_0x176f6d,_0x2b72da=_0x176f6d[_0x505721(0x1f7)],_0xbe1d01={'memberId':this['_userService']['getCurrentUser']()[_0x505721(0x229)],'unitId':_0x31bafc,'threadId':_0x2b72da,'solved':_0x176f6d[_0x505721(0x1e3)]?I[_0x505721(0x1c9)]:I['OpenOrReOpen']},_0x201375=await this[_0x505721(0x1d1)][_0x505721(0x20b)](_0x505721(0x1d2)+_0x31bafc+'/solved',{'body':_0xbe1d01});return!_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]||_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]['code']===0x1;}async[_0x30354b(0x210)](_0x219348,_0x1d741d,_0x11aeff,_0x1a4e81){const _0x2e3dc2=_0x30354b,_0x972fec={'memberId':(await this[_0x2e3dc2(0x1f6)][_0x2e3dc2(0x217)](_0x219348))[_0x2e3dc2(0x1ce)](),'threadId':_0x11aeff,'replyId':_0x1a4e81,'unitId':_0x219348},_0x1ec068=await this[_0x2e3dc2(0x1d1)][_0x2e3dc2(0x20b)]('/universer-api/comment/unit/'+_0x219348+'/delete',{'body':_0x972fec});return!_0x1ec068[_0x2e3dc2(0x1fe)]['error']||_0x1ec068[_0x2e3dc2(0x1fe)][_0x2e3dc2(0x1d4)][_0x2e3dc2(0x216)]===0x1;}async[_0x30354b(0x214)](_0x3f44f7,_0x5dbb05,_0x103c7f){const _0x10726b=_0x30354b,_0x59a161={'unitId':_0x3f44f7,'threadId':_0x103c7f},_0x4fb4b0=await this[_0x10726b(0x1d1)][_0x10726b(0x20b)]('/universer-api/comment/unit/'+_0x3f44f7+_0x10726b(0x201),{'body':_0x59a161}),_0x18b87d=_0x103c7f[_0x10726b(0x20f)](_0x2805f5=>ee(_0x4fb4b0['body'][_0x10726b(0x1fd)][_0x2805f5],_0x3f44f7,_0x5dbb05))[_0x10726b(0x1fc)](Boolean);return Object[_0x10726b(0x1fa)](_0x4fb4b0[_0x10726b(0x1fe)][_0x10726b(0x1c0)])[_0x10726b(0x1f8)](_0x185d84=>{const _0x2dd430=_0x10726b;this['_userService'][_0x2dd430(0x1f0)](_0x185d84);}),_0x18b87d;}[_0x30354b(0x212)](_0x1321ad){const _0x524d75=_0x30354b;return{'id':_0x1321ad['id'],'threadId':_0x1321ad['threadId'],'ref':_0x1321ad[_0x524d75(0x1e8)]};}};S=Q([b(0x0,_0x5d6dec(_0x365edd)),b(0x1,_0x5d6dec(_0x3579fd)),b(0x2,_0x5d6dec(_0x4c60bb))],S);var re=Object[_0x30354b(0x1cf)],te=(_0x598a40,_0x24d176,_0x30431d,_0x536549)=>{const _0x4d4601=_0x30354b;for(var _0x186ba7=_0x536549>0x1?void 0x0:_0x536549?re(_0x24d176,_0x30431d):_0x24d176,_0x39725a=_0x598a40[_0x4d4601(0x218)]-0x1,_0x502def;_0x39725a>=0x0;_0x39725a--)(_0x502def=_0x598a40[_0x39725a])&&(_0x186ba7=_0x502def(_0x186ba7)||_0x186ba7);return _0x186ba7;},M=(_0x5405cc,_0x46c260)=>(_0x570dc2,_0x2de495)=>_0x46c260(_0x570dc2,_0x2de495,_0x5405cc);let f=class extends _0x5da71c{constructor(_0xf831b5,_0x275fe9){const _0xe016af=_0x30354b;super(),this['_threadCommentDataSourceService']=_0xf831b5,this[_0xe016af(0x1e7)]=_0x275fe9,this['_initDataSource']();}['_initDataSource'](){const _0x57b166=_0x30354b;this[_0x57b166(0x1de)][_0x57b166(0x1d0)]=this[_0x57b166(0x1e7)],this[_0x57b166(0x1de)][_0x57b166(0x1cc)]=!0x1;}};f=te([M(0x0,_0x5a2639),M(0x1,_0x5d6dec(S))],f);var se=Object[_0x30354b(0x1ec)],oe=Object[_0x30354b(0x1cf)],ne=(_0x31307d,_0x3a4205,_0x29fd13)=>_0x3a4205 in _0x31307d?se(_0x31307d,_0x3a4205,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29fd13}):_0x31307d[_0x3a4205]=_0x29fd13,ie=(_0x3daa40,_0x3a5048,_0xc3a9e1,_0x321717)=>{const _0x2932ce=_0x30354b;for(var _0x1d8deb=_0x321717>0x1?void 0x0:_0x321717?oe(_0x3a5048,_0xc3a9e1):_0x3a5048,_0x631672=_0x3daa40[_0x2932ce(0x218)]-0x1,_0x3ed4cb;_0x631672>=0x0;_0x631672--)(_0x3ed4cb=_0x3daa40[_0x631672])&&(_0x1d8deb=_0x3ed4cb(_0x1d8deb)||_0x1d8deb);return _0x1d8deb;},N=(_0x1b11cc,_0x397cea)=>(_0x325806,_0xdd6ee)=>_0x397cea(_0x325806,_0xdd6ee,_0x1b11cc),$=(_0x2078fb,_0x4ab36d,_0x41b772)=>ne(_0x2078fb,typeof _0x4ab36d!=_0x30354b(0x1cb)?_0x4ab36d+'':_0x4ab36d,_0x41b772);let g=class extends _0x3bc542{constructor(_0x28d035=O,_0x2c859d,_0x303f96){const _0x555333=_0x30354b;super(),this['_config']=_0x28d035,this[_0x555333(0x21b)]=_0x2c859d,this[_0x555333(0x1ff)]=_0x303f96;const {..._0x46bfd8}=_0x3f3339({},O,this[_0x555333(0x1d7)]);this[_0x555333(0x1ff)][_0x555333(0x1c8)](z,_0x46bfd8);}[_0x30354b(0x203)](){const _0x33a6c4=_0x30354b;[[S],[f],[_]][_0x33a6c4(0x1f8)](_0x44dd8f=>{const _0x31a5bf=_0x33a6c4;this['_injector'][_0x31a5bf(0x215)](_0x44dd8f);});}[_0x30354b(0x202)](){const _0xfc040=_0x30354b;this[_0xfc040(0x21b)][_0xfc040(0x1f2)](f),this[_0xfc040(0x21b)][_0xfc040(0x1f2)](_);}};$(g,_0x30354b(0x1c4),W),$(g,'type',_0x3bb98c[_0x30354b(0x1c5)]),g=ie([_0x413398(_0x32a910,_0x516653,_0x2125bb),N(0x1,_0x5d6dec(_0x5eef6b)),N(0x2,_0x195d4b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0xb18176=_0x3124;(function(_0x465bba,_0x2bbaa0){const _0x1f11a0=_0x3124,_0x259cd4=_0x465bba();while(!![]){try{const _0x2c6177=-parseInt(_0x1f11a0(0x19b))/0x1+parseInt(_0x1f11a0(0x1b5))/0x2*(-parseInt(_0x1f11a0(0x177))/0x3)+-parseInt(_0x1f11a0(0x1ae))/0x4*(parseInt(_0x1f11a0(0x15c))/0x5)+-parseInt(_0x1f11a0(0x198))/0x6*(-parseInt(_0x1f11a0(0x156))/0x7)+parseInt(_0x1f11a0(0x175))/0x8*(parseInt(_0x1f11a0(0x18f))/0x9)+parseInt(_0x1f11a0(0x1a4))/0xa+parseInt(_0x1f11a0(0x1a6))/0xb*(-parseInt(_0x1f11a0(0x1b2))/0xc);if(_0x2c6177===_0x2bbaa0)break;else _0x259cd4['push'](_0x259cd4['shift']());}catch(_0x25b606){_0x259cd4['push'](_0x259cd4['shift']());}}}(_0x1b07,0xdb42b));import{CommentService as _0x56f935,CollaborationSessionService as _0x4f26c9,UniverCollaborationClientPlugin as _0x2c8c03}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2491e5}from'@univerjs-pro/license';import{dayjs as _0x1f6619,UserManagerService as _0x2e7610,Inject as _0x42a167,Injector as _0x2faf0e,Disposable as _0x47c608,CustomRangeType as _0x395d63,UniverInstanceType as _0x369e42,DependentOn as _0x21c16a,IConfigService as _0x5f2d20,Plugin as _0x1bbe28,merge as _0x52ed40}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2b2098}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3daa09,IThreadCommentDataSourceService as _0x481685}from'@univerjs/thread-comment';import{bufferTime as _0x156334}from'rxjs';import{HTTPService as _0x5108a4}from'@univerjs/network';const W=_0xb18176(0x182);function _0x3124(_0x1c967f,_0xf2904){const _0x1b0718=_0x1b07();return _0x3124=function(_0x31248f,_0x6581ee){_0x31248f=_0x31248f-0x154;let _0x42fdcc=_0x1b0718[_0x31248f];return _0x42fdcc;},_0x3124(_0x1c967f,_0xf2904);}var I=(_0x3b94cc=>(_0x3b94cc[_0x3b94cc['OpenOrReOpen']=0x0]=_0xb18176(0x19c),_0x3b94cc[_0x3b94cc['Solved']=0x1]=_0xb18176(0x18b),_0x3b94cc[_0x3b94cc[_0xb18176(0x1a0)]=-0x1]=_0xb18176(0x1a0),_0x3b94cc))(I||{}),v=(_0x1ef831=>(_0x1ef831[_0x1ef831[_0xb18176(0x159)]=0x0]=_0xb18176(0x159),_0x1ef831[_0x1ef831[_0xb18176(0x172)]=0x1]=_0xb18176(0x172),_0x1ef831[_0x1ef831[_0xb18176(0x171)]=0x2]=_0xb18176(0x171),_0x1ef831[_0x1ef831[_0xb18176(0x181)]=0x3]=_0xb18176(0x181),_0x1ef831[_0x1ef831['Delete']=0x4]=_0xb18176(0x1ac),_0x1ef831[_0x1ef831['Solve']=0x5]=_0xb18176(0x1a5),_0x1ef831[_0x1ef831[_0xb18176(0x1a0)]=-0x1]='UNRECOGNIZED',_0x1ef831))(v||{});const y=_0x68f3f0=>_0x1f6619(new Date(+_0x68f3f0))[_0xb18176(0x184)](_0xb18176(0x158)),B=async(_0x224f22,_0xec13bc)=>{const _0x3e7527=_0xb18176,_0x26053d=_0x224f22[_0x3e7527(0x1b7)](_0x2e7610),_0x4ed527=_0x224f22[_0x3e7527(0x1b7)](_0x5108a4);_0xec13bc[_0x3e7527(0x19e)](_0x222a26=>{const _0x50b095=_0x3e7527;_0x26053d[_0x50b095(0x1a3)](_0x222a26)&&_0xec13bc[_0x50b095(0x17c)](_0x222a26);}),_0xec13bc['size']&&(await _0x4ed527[_0x3e7527(0x1b7)](_0x3e7527(0x187),{'params':{'userIDs':[..._0xec13bc]}}))[_0x3e7527(0x17b)][_0x3e7527(0x179)][_0x3e7527(0x19e)](_0x538608=>{const _0x1aaf04=_0x3e7527;_0x538608&&_0x26053d[_0x1aaf04(0x15f)](_0x538608);});};var K=Object[_0xb18176(0x15d)],V=(_0x2b8184,_0x27c6fb,_0x709812,_0x180959)=>{const _0x608e39=_0xb18176;for(var _0x36ca98=_0x180959>0x1?void 0x0:_0x180959?K(_0x27c6fb,_0x709812):_0x27c6fb,_0x5785a3=_0x2b8184[_0x608e39(0x185)]-0x1,_0x34af0c;_0x5785a3>=0x0;_0x5785a3--)(_0x34af0c=_0x2b8184[_0x5785a3])&&(_0x36ca98=_0x34af0c(_0x36ca98)||_0x36ca98);return _0x36ca98;},p=(_0x57ad59,_0x52ef02)=>(_0x5ac057,_0x2899a6)=>_0x52ef02(_0x5ac057,_0x2899a6,_0x57ad59);let _=class extends _0x47c608{constructor(_0x24b08a,_0x1574d0,_0x1e3fce,_0x2f6ad1){const _0x1d50af=_0xb18176;super(),this[_0x1d50af(0x196)]=_0x24b08a,this['_threadCommentModel']=_0x1574d0,this['_userService']=_0x1e3fce,this[_0x1d50af(0x18c)]=_0x2f6ad1,this[_0x1d50af(0x1ad)](),this[_0x1d50af(0x16a)]();}[_0xb18176(0x16a)](){const _0x429353=_0xb18176;this[_0x429353(0x16b)](this['_threadCommentModel'][_0x429353(0x163)][_0x429353(0x1b0)](_0x156334(0x10))[_0x429353(0x1b9)](_0x478888=>{const _0x2a85d0=_0x429353,_0x619748=new Set();_0x478888[_0x2a85d0(0x19e)](_0x3bf33b=>{const _0x20d883=_0x2a85d0;switch(_0x3bf33b[_0x20d883(0x1b8)]){case'add':{const _0x3dd168=_0x3bf33b[_0x20d883(0x188)][_0x20d883(0x1ab)];_0x619748[_0x20d883(0x169)](_0x3dd168);break;}}}),B(this[_0x2a85d0(0x18c)],_0x619748);}));}[_0xb18176(0x1ad)](){const _0x488778=_0xb18176;this['disposeWithMe'](this[_0x488778(0x196)]['commentUpdate$'][_0x488778(0x1b9)](async _0x243df4=>{const _0x50b355=_0x488778;var _0xdd9fbb,_0x1a357b,_0x21f22d,_0xf6371a;const _0x3348ea=(_0xdd9fbb=this['_threadCommentModel'][_0x50b355(0x161)](_0x243df4[_0x50b355(0x1a2)])[_0x50b355(0x1b1)](_0x16fbe9=>_0x16fbe9['threadId']===_0x243df4[_0x50b355(0x16c)]))==null?void 0x0:_0xdd9fbb[_0x50b355(0x199)];if(!_0x3348ea)return;const {unitId:_0xfcbf6a,subUnitId:_0x5e8847}=_0x3348ea;switch(_0x243df4[_0x50b355(0x18a)]&&this['_userService'][_0x50b355(0x15f)](_0x243df4[_0x50b355(0x18a)]),_0x243df4[_0x50b355(0x1b8)]){case v[_0x50b355(0x172)]:break;case v[_0x50b355(0x171)]:{this[_0x50b355(0x173)][_0x50b355(0x1af)](_0xfcbf6a,_0x5e8847,{'unitId':_0xfcbf6a,'subUnitId':_0x5e8847,'ref':'','id':_0x243df4[_0x50b355(0x192)],'dT':y(+_0x243df4[_0x50b355(0x186)]),'threadId':_0x243df4[_0x50b355(0x16c)],'personId':(_0x21f22d=(_0x1a357b=_0x243df4[_0x50b355(0x18a)])==null?void 0x0:_0x1a357b[_0x50b355(0x15b)])!=null?_0x21f22d:_0x243df4[_0x50b355(0x165)],'text':JSON['parse'](_0x243df4[_0x50b355(0x183)]),'parentId':_0x3348ea['id']});break;}case v[_0x50b355(0x1ac)]:{const _0xc214ce=this['_threadCommentModel']['getComment'](_0xfcbf6a,_0x5e8847,_0x243df4['replyId']);_0xc214ce&&_0xc214ce[_0x50b355(0x155)]&&this[_0x50b355(0x173)][_0x50b355(0x191)](_0xfcbf6a,_0x5e8847,_0x243df4[_0x50b355(0x192)]);break;}case v['Edit']:{this[_0x50b355(0x173)][_0x50b355(0x1b6)](_0xfcbf6a,_0x5e8847,{'commentId':_0x243df4[_0x50b355(0x192)],'text':JSON[_0x50b355(0x197)](_0x243df4[_0x50b355(0x183)])});break;}case v['Solve']:{const _0x1d2f16=(_0xf6371a=this[_0x50b355(0x173)][_0x50b355(0x161)](_0x243df4[_0x50b355(0x1a2)])[_0x50b355(0x1b1)](_0x1514b3=>_0x1514b3[_0x50b355(0x16c)]===_0x243df4[_0x50b355(0x16c)]))==null?void 0x0:_0xf6371a[_0x50b355(0x199)];_0x1d2f16&&this[_0x50b355(0x173)]['resolveComment'](_0xfcbf6a,_0x5e8847,_0x1d2f16['id'],_0x243df4['solved']===I[_0x50b355(0x18b)]);break;}}}));}};_=V([p(0x0,_0x42a167(_0x56f935)),p(0x1,_0x42a167(_0x3daa09)),p(0x2,_0x42a167(_0x2e7610)),p(0x3,_0x42a167(_0x2faf0e))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17c4e6,_0x55925c,_0x5146f7,_0x30d701)=>{for(var _0x5504df=_0x30d701>0x1?void 0x0:_0x30d701?k(_0x55925c,_0x5146f7):_0x55925c,_0x482889=_0x17c4e6['length']-0x1,_0x402071;_0x482889>=0x0;_0x482889--)(_0x402071=_0x17c4e6[_0x482889])&&(_0x5504df=_0x402071(_0x5504df)||_0x5504df);return _0x5504df;},b=(_0x45e320,_0x503df0)=>(_0x2cfdec,_0x2f055c)=>_0x503df0(_0x2cfdec,_0x2f055c,_0x45e320);function _0x1b07(){const _0x268913=['2444HzXPRj','updateComment','get','type','subscribe','symbol','parentId','44562ZohQqS','/solved','YYYY/MM/DD\x20HH:mm','Unknown','reply','userID','23740lmsySx','getOwnPropertyDescriptor','solved','addUser','pluginName','getUnit','_initDataSource','commentUpdate$','/edit','userId','_threadCommentDataSource','/delete','values','add','_initUserSync','disposeWithMe','threadId','onReady','onStarting','getCurrentUser','_configService','Reply','Add','_threadCommentModel','rangeId','40KBudoV','saveCommentToSnapshot','4341DFBEVR','_httpService','users','getMemberID','body','delete','setConfig','post','_userService','_sessionService','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','content','format','length','createTimestamp','/universer-api/user/list','payload','map','user','Solved','_injector','filter','resolved','2371401ajxMDJ','/add','deleteComment','replyId','COMMENT','error','rangeType','_commentService','parse','486glSAWF','root','ref','63369hyMgqg','OpenOrReOpen','code','forEach','UNIVER_UNKNOWN','UNRECOGNIZED','replies','unitId','getUser','16806960VHTDSn','Solve','165cQQdjT','/universer-api/comment/unit/','comments','_threadCommentDataSourceService','syncUpdateMutationToColla','personId','Delete','_init','44FkGFal','addComment','pipe','find','585492FYjyhK','requireSession','slice'];_0x1b07=function(){return _0x268913;};return _0x1b07();}function X(_0x43e197,_0x47fded){const _0x5c97c3=_0xb18176,_0x3c2f1a=_0x43e197[_0x5c97c3(0x1a1)][0x0];return{..._0x47fded,'id':_0x3c2f1a['replyId'],'resolved':_0x43e197[_0x5c97c3(0x15e)]===0x1,'dT':y(_0x3c2f1a['createTimestamp']),'personId':_0x3c2f1a[_0x5c97c3(0x165)],'threadId':_0x3c2f1a[_0x5c97c3(0x16c)]};}function ee(_0xc485c9,_0x14dc30,_0x5e0796){const _0x2e6e00=_0xb18176;var _0x42d239,_0xc438ae;if(((_0xc438ae=(_0x42d239=_0xc485c9==null?void 0x0:_0xc485c9[_0x2e6e00(0x1a1)])==null?void 0x0:_0x42d239['length'])!=null?_0xc438ae:0x0)>0x0){const _0x1c0be1=(_0x477dad,_0x116014)=>({'id':_0x477dad[_0x2e6e00(0x192)],'threadId':_0x477dad[_0x2e6e00(0x16c)],'dT':y(_0x477dad[_0x2e6e00(0x186)]),'personId':_0x477dad['userId'],'resolved':_0xc485c9[_0x2e6e00(0x15e)]===I[_0x2e6e00(0x18b)],'unitId':_0x14dc30,'subUnitId':_0x5e0796,'text':JSON[_0x2e6e00(0x197)](_0x477dad[_0x2e6e00(0x183)]),'parentId':_0x116014}),_0x6a6f32=_0x1c0be1(_0xc485c9['replies'][0x0]);return{..._0x6a6f32,'children':_0xc485c9[_0x2e6e00(0x1a1)][_0x2e6e00(0x1b4)](0x1)[_0x2e6e00(0x189)](_0x342b6d=>_0x1c0be1(_0x342b6d,_0x6a6f32['id']))};}return null;}let S=class{constructor(_0xce770f,_0x471032,_0x361464){const _0xab367e=_0xb18176;this[_0xab367e(0x178)]=_0xce770f,this[_0xab367e(0x17f)]=_0x471032,this[_0xab367e(0x180)]=_0x361464;}async[_0xb18176(0x1af)](_0x1d2416){const _0x149f2b=_0xb18176;var _0x2625a5,_0x2c81c6;const {parentId:_0x59dc36,unitId:_0x20a4e8,text:_0x2a7e0d,threadId:_0x343da6}=_0x1d2416,_0x2604ad=(_0x2c81c6=(_0x2625a5=_0x2a7e0d['customRanges'])==null?void 0x0:_0x2625a5[_0x149f2b(0x18d)](_0x5e222c=>_0x5e222c[_0x149f2b(0x195)]===_0x395d63[_0x149f2b(0x193)])[_0x149f2b(0x189)](_0x254765=>_0x254765[_0x149f2b(0x174)]))!=null?_0x2c81c6:[],_0x2f8b5b=JSON['stringify'](_0x2a7e0d),_0x5d7790=(await this[_0x149f2b(0x180)]['requireSession'](_0x20a4e8))[_0x149f2b(0x17a)]();if(_0x59dc36){const _0x3d32ad={'memberId':_0x5d7790,'unitId':_0x20a4e8,'content':_0x2f8b5b,'mention':_0x2604ad,'threadId':_0x343da6},_0x40faf8=(await this[_0x149f2b(0x178)]['post'](_0x149f2b(0x1a7)+_0x20a4e8+'/reply',{'body':_0x3d32ad}))['body'][_0x149f2b(0x15a)];return{..._0x1d2416,'id':_0x40faf8['replyId'],'dT':_0x1f6619(+_0x40faf8['createTimestamp'])[_0x149f2b(0x184)](_0x149f2b(0x158)),'personId':_0x40faf8[_0x149f2b(0x165)]};}else{const _0x540a15={'memberId':_0x5d7790,'unitId':_0x20a4e8,'content':_0x2f8b5b,'mention':_0x2604ad},_0x4d8c9b=await this[_0x149f2b(0x178)][_0x149f2b(0x17e)](_0x149f2b(0x1a7)+_0x20a4e8+_0x149f2b(0x190),{'body':_0x540a15});return X(_0x4d8c9b[_0x149f2b(0x17b)]['comment'],_0x1d2416);}}async['updateComment'](_0x266583){const _0x47c5e4=_0xb18176;var _0x7ac632,_0x454ace;const {text:_0x3fa0ad,unitId:_0x207134}=_0x266583,_0x4f315f=(_0x454ace=(_0x7ac632=_0x3fa0ad['customRanges'])==null?void 0x0:_0x7ac632[_0x47c5e4(0x18d)](_0x410e5c=>_0x410e5c[_0x47c5e4(0x195)]===_0x395d63[_0x47c5e4(0x193)])['map'](_0x29220d=>_0x29220d['rangeId']))!=null?_0x454ace:[],_0x32b6f8=JSON['stringify'](_0x3fa0ad),_0x14fc76=_0x266583[_0x47c5e4(0x16c)],_0x439bb3=_0x266583['id'],_0x4581dd={'memberId':(await this[_0x47c5e4(0x180)][_0x47c5e4(0x1b3)](_0x207134))['getMemberID'](),'unitId':_0x207134,'threadId':_0x14fc76,'mention':_0x4f315f,'content':_0x32b6f8,'replyId':_0x439bb3},_0x312d7b=await this['_httpService']['post'](_0x47c5e4(0x1a7)+_0x207134+_0x47c5e4(0x164),{'body':_0x4581dd});return!_0x312d7b[_0x47c5e4(0x17b)]['error']||_0x312d7b[_0x47c5e4(0x17b)]['error'][_0x47c5e4(0x19d)]===0x1;}async['resolveComment'](_0xfb80d8){const _0xf8aec1=_0xb18176,{unitId:_0x24602e}=_0xfb80d8,_0x5da0f8=_0xfb80d8[_0xf8aec1(0x16c)],_0x1064c2={'memberId':this['_userService'][_0xf8aec1(0x16f)]()[_0xf8aec1(0x15b)],'unitId':_0x24602e,'threadId':_0x5da0f8,'solved':_0xfb80d8[_0xf8aec1(0x18e)]?I[_0xf8aec1(0x18b)]:I[_0xf8aec1(0x19c)]},_0x13c079=await this[_0xf8aec1(0x178)][_0xf8aec1(0x17e)]('/universer-api/comment/unit/'+_0x24602e+_0xf8aec1(0x157),{'body':_0x1064c2});return!_0x13c079['body'][_0xf8aec1(0x194)]||_0x13c079[_0xf8aec1(0x17b)][_0xf8aec1(0x194)][_0xf8aec1(0x19d)]===0x1;}async['deleteComment'](_0xf8f946,_0x3d2a98,_0xde695b,_0x442709){const _0x44dc17=_0xb18176,_0x240123={'memberId':(await this[_0x44dc17(0x180)][_0x44dc17(0x1b3)](_0xf8f946))[_0x44dc17(0x17a)](),'threadId':_0xde695b,'replyId':_0x442709,'unitId':_0xf8f946},_0x15d0b7=await this[_0x44dc17(0x178)][_0x44dc17(0x17e)](_0x44dc17(0x1a7)+_0xf8f946+_0x44dc17(0x167),{'body':_0x240123});return!_0x15d0b7[_0x44dc17(0x17b)]['error']||_0x15d0b7['body'][_0x44dc17(0x194)][_0x44dc17(0x19d)]===0x1;}async['listComments'](_0x3d40f8,_0x5d38fb,_0x2ce677){const _0xf632f3=_0xb18176,_0x2a9b91={'unitId':_0x3d40f8,'threadId':_0x2ce677},_0x23d258=await this['_httpService']['post'](_0xf632f3(0x1a7)+_0x3d40f8+'/list',{'body':_0x2a9b91}),_0xac3570=_0x2ce677['map'](_0x144abf=>ee(_0x23d258[_0xf632f3(0x17b)][_0xf632f3(0x1a8)][_0x144abf],_0x3d40f8,_0x5d38fb))[_0xf632f3(0x18d)](Boolean);return Object[_0xf632f3(0x168)](_0x23d258[_0xf632f3(0x17b)][_0xf632f3(0x179)])[_0xf632f3(0x19e)](_0x1c132f=>{const _0x2752ce=_0xf632f3;this[_0x2752ce(0x17f)][_0x2752ce(0x15f)](_0x1c132f);}),_0xac3570;}[_0xb18176(0x176)](_0x3de6e4){const _0xd0a8d9=_0xb18176;return{'id':_0x3de6e4['id'],'threadId':_0x3de6e4['threadId'],'ref':_0x3de6e4[_0xd0a8d9(0x19a)]};}};S=Q([b(0x0,_0x42a167(_0x5108a4)),b(0x1,_0x42a167(_0x2e7610)),b(0x2,_0x42a167(_0x4f26c9))],S);var re=Object[_0xb18176(0x15d)],te=(_0x5b14ac,_0x3db8d4,_0x2dfc25,_0x474397)=>{const _0x1e94a2=_0xb18176;for(var _0x4dd0e8=_0x474397>0x1?void 0x0:_0x474397?re(_0x3db8d4,_0x2dfc25):_0x3db8d4,_0x2253f5=_0x5b14ac[_0x1e94a2(0x185)]-0x1,_0x5c2a56;_0x2253f5>=0x0;_0x2253f5--)(_0x5c2a56=_0x5b14ac[_0x2253f5])&&(_0x4dd0e8=_0x5c2a56(_0x4dd0e8)||_0x4dd0e8);return _0x4dd0e8;},M=(_0x53bcce,_0x2bbd62)=>(_0x13a92d,_0x54b2f9)=>_0x2bbd62(_0x13a92d,_0x54b2f9,_0x53bcce);let f=class extends _0x47c608{constructor(_0x9fd847,_0x677d16){const _0xcd23ae=_0xb18176;super(),this[_0xcd23ae(0x1a9)]=_0x9fd847,this[_0xcd23ae(0x166)]=_0x677d16,this['_initDataSource']();}[_0xb18176(0x162)](){const _0x21f1b8=_0xb18176;this['_threadCommentDataSourceService']['dataSource']=this[_0x21f1b8(0x166)],this['_threadCommentDataSourceService'][_0x21f1b8(0x1aa)]=!0x1;}};f=te([M(0x0,_0x481685),M(0x1,_0x42a167(S))],f);var se=Object['defineProperty'],oe=Object[_0xb18176(0x15d)],ne=(_0x1e2701,_0x14aecb,_0x273c31)=>_0x14aecb in _0x1e2701?se(_0x1e2701,_0x14aecb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x273c31}):_0x1e2701[_0x14aecb]=_0x273c31,ie=(_0x3a9795,_0x5d1db5,_0x2eb15a,_0x25e591)=>{const _0x1a70f4=_0xb18176;for(var _0x57640a=_0x25e591>0x1?void 0x0:_0x25e591?oe(_0x5d1db5,_0x2eb15a):_0x5d1db5,_0x261f91=_0x3a9795[_0x1a70f4(0x185)]-0x1,_0x4c9132;_0x261f91>=0x0;_0x261f91--)(_0x4c9132=_0x3a9795[_0x261f91])&&(_0x57640a=_0x4c9132(_0x57640a)||_0x57640a);return _0x57640a;},N=(_0x197790,_0x1a448a)=>(_0x13d906,_0x286a33)=>_0x1a448a(_0x13d906,_0x286a33,_0x197790),$=(_0x411316,_0x4bdb5b,_0x950d79)=>ne(_0x411316,typeof _0x4bdb5b!=_0xb18176(0x154)?_0x4bdb5b+'':_0x4bdb5b,_0x950d79);let g=class extends _0x1bbe28{constructor(_0x2389c8=O,_0x1a02d5,_0x38e300){const _0x17d4c2=_0xb18176;super(),this['_config']=_0x2389c8,this['_injector']=_0x1a02d5,this[_0x17d4c2(0x170)]=_0x38e300;const {..._0x372acf}=_0x52ed40({},O,this['_config']);this[_0x17d4c2(0x170)][_0x17d4c2(0x17d)](z,_0x372acf);}[_0xb18176(0x16e)](){const _0x4f332e=_0xb18176;[[S],[f],[_]][_0x4f332e(0x19e)](_0x46a1bf=>{const _0x1252d1=_0x4f332e;this[_0x1252d1(0x18c)][_0x1252d1(0x169)](_0x46a1bf);});}[_0xb18176(0x16d)](){const _0x524ced=_0xb18176;this[_0x524ced(0x18c)]['get'](f),this[_0x524ced(0x18c)][_0x524ced(0x1b7)](_);}};$(g,_0xb18176(0x160),W),$(g,_0xb18176(0x1b8),_0x369e42[_0xb18176(0x19f)]),g=ie([_0x21c16a(_0x2b2098,_0x2c8c03,_0x2491e5),N(0x1,_0x42a167(_0x2faf0e)),N(0x2,_0x5f2d20)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x30354b=_0x6b72;(function(_0x19d239,_0x4952ed){const _0x4ca1fb=_0x6b72,_0x19fe23=_0x19d239();while(!![]){try{const _0x3084f5=-parseInt(_0x4ca1fb(0x1f4))/0x1+parseInt(_0x4ca1fb(0x208))/0x2*(parseInt(_0x4ca1fb(0x1da))/0x3)+-parseInt(_0x4ca1fb(0x1db))/0x4*(parseInt(_0x4ca1fb(0x1ed))/0x5)+parseInt(_0x4ca1fb(0x200))/0x6*(parseInt(_0x4ca1fb(0x205))/0x7)+parseInt(_0x4ca1fb(0x1dd))/0x8*(parseInt(_0x4ca1fb(0x222))/0x9)+parseInt(_0x4ca1fb(0x1e1))/0xa*(-parseInt(_0x4ca1fb(0x20d))/0xb)+-parseInt(_0x4ca1fb(0x21e))/0xc*(-parseInt(_0x4ca1fb(0x1d6))/0xd);if(_0x3084f5===_0x4952ed)break;else _0x19fe23['push'](_0x19fe23['shift']());}catch(_0x39d700){_0x19fe23['push'](_0x19fe23['shift']());}}}(_0x403e,0x81e18));import{CommentService as _0x3237e5,CollaborationSessionService as _0x4c60bb,UniverCollaborationClientPlugin as _0x516653}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2125bb}from'@univerjs-pro/license';import{dayjs as _0x4a080f,UserManagerService as _0x3579fd,Inject as _0x5d6dec,Injector as _0x5eef6b,Disposable as _0x5da71c,CustomRangeType as _0x300af4,UniverInstanceType as _0x3bb98c,DependentOn as _0x413398,IConfigService as _0x195d4b,Plugin as _0x3bc542,merge as _0x3f3339}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x32a910}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59f117,IThreadCommentDataSourceService as _0x5a2639}from'@univerjs/thread-comment';import{bufferTime as _0x298b90}from'rxjs';import{HTTPService as _0x365edd}from'@univerjs/network';const W=_0x30354b(0x213);var I=(_0x42d073=>(_0x42d073[_0x42d073['OpenOrReOpen']=0x0]=_0x30354b(0x20c),_0x42d073[_0x42d073[_0x30354b(0x1c9)]=0x1]=_0x30354b(0x1c9),_0x42d073[_0x42d073[_0x30354b(0x228)]=-0x1]=_0x30354b(0x228),_0x42d073))(I||{}),v=(_0xdac16d=>(_0xdac16d[_0xdac16d[_0x30354b(0x227)]=0x0]=_0x30354b(0x227),_0xdac16d[_0xdac16d[_0x30354b(0x1eb)]=0x1]=_0x30354b(0x1eb),_0xdac16d[_0xdac16d['Reply']=0x2]=_0x30354b(0x206),_0xdac16d[_0xdac16d[_0x30354b(0x1e6)]=0x3]=_0x30354b(0x1e6),_0xdac16d[_0xdac16d[_0x30354b(0x21c)]=0x4]=_0x30354b(0x21c),_0xdac16d[_0xdac16d[_0x30354b(0x1f9)]=0x5]=_0x30354b(0x1f9),_0xdac16d[_0xdac16d[_0x30354b(0x228)]=-0x1]='UNRECOGNIZED',_0xdac16d))(v||{});function _0x6b72(_0x14a30b,_0x560ebb){const _0x403ee1=_0x403e();return _0x6b72=function(_0x6b7255,_0x530bbb){_0x6b7255=_0x6b7255-0x1bf;let _0x1ed82a=_0x403ee1[_0x6b7255];return _0x1ed82a;},_0x6b72(_0x14a30b,_0x560ebb);}const y=_0x20d043=>_0x4a080f(new Date(+_0x20d043))[_0x30354b(0x1dc)](_0x30354b(0x1ea)),B=async(_0x8aafcb,_0x268328)=>{const _0x272da7=_0x30354b,_0x5a6e33=_0x8aafcb[_0x272da7(0x1f2)](_0x3579fd),_0x4580be=_0x8aafcb['get'](_0x365edd);_0x268328[_0x272da7(0x1f8)](_0x5b728e=>{const _0x20658e=_0x272da7;_0x5a6e33['getUser'](_0x5b728e)&&_0x268328[_0x20658e(0x1cd)](_0x5b728e);}),_0x268328[_0x272da7(0x20e)]&&(await _0x4580be[_0x272da7(0x1f2)]('/universer-api/user/list',{'params':{'userIDs':[..._0x268328]}}))['body'][_0x272da7(0x1c0)][_0x272da7(0x1f8)](_0x3d3b14=>{_0x3d3b14&&_0x5a6e33['addUser'](_0x3d3b14);});};var K=Object[_0x30354b(0x1cf)],V=(_0x21890e,_0x355929,_0x52281e,_0x33a0bb)=>{for(var _0x2d5ee7=_0x33a0bb>0x1?void 0x0:_0x33a0bb?K(_0x355929,_0x52281e):_0x355929,_0x64e2f4=_0x21890e['length']-0x1,_0x187cda;_0x64e2f4>=0x0;_0x64e2f4--)(_0x187cda=_0x21890e[_0x64e2f4])&&(_0x2d5ee7=_0x187cda(_0x2d5ee7)||_0x2d5ee7);return _0x2d5ee7;},p=(_0x32e8d0,_0x11768a)=>(_0xb1bcde,_0x41d10e)=>_0x11768a(_0xb1bcde,_0x41d10e,_0x32e8d0);function _0x403e(){const _0x9332c1=['383411wVdAmB','Reply','_threadCommentModel','973118bKoQQJ','unitId','parentId','post','OpenOrReOpen','8591EPYukU','size','map','deleteComment','/edit','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','listComments','add','code','requireSession','length','find','_userService','_injector','Delete','thread-comment-data-source.config','12RTfxpP','disposeWithMe','customRanges','content','3332061xALvhp','type','COMMENT','subscribe','resolveComment','Unknown','UNRECOGNIZED','userID','rangeType','users','commentUpdate$','updateComment','userId','pluginName','UNIVER_UNKNOWN','/reply','parse','setConfig','Solved','user','symbol','syncUpdateMutationToColla','delete','getMemberID','getOwnPropertyDescriptor','dataSource','_httpService','/universer-api/comment/unit/','rangeId','error','replies','8514857XxTsix','_config','personId','replyId','3enWGLm','2360572tLMfeG','format','16yJVYPp','_threadCommentDataSourceService','root','stringify','12940bAyFEK','getComment','resolved','addComment','solved','Edit','_threadCommentDataSource','ref','getUnit','YYYY/MM/DD\x20HH:mm','Add','defineProperty','5tfTzCe','slice','comment','addUser','_commentService','get','_initUserSync','789944uVQuGT','pipe','_sessionService','threadId','forEach','Solve','values','_init','filter','comments','body','_configService','114URdPkj','/list','onReady','onStarting','createTimestamp'];_0x403e=function(){return _0x9332c1;};return _0x403e();}let _=class extends _0x5da71c{constructor(_0x5774e9,_0xcf3eec,_0x1b0940,_0x585d2e){const _0xaf08c6=_0x30354b;super(),this[_0xaf08c6(0x1f1)]=_0x5774e9,this[_0xaf08c6(0x207)]=_0xcf3eec,this[_0xaf08c6(0x21a)]=_0x1b0940,this['_injector']=_0x585d2e,this[_0xaf08c6(0x1fb)](),this[_0xaf08c6(0x1f3)]();}[_0x30354b(0x1f3)](){const _0x5d96f1=_0x30354b;this[_0x5d96f1(0x21f)](this[_0x5d96f1(0x207)]['commentUpdate$'][_0x5d96f1(0x1f5)](_0x298b90(0x10))[_0x5d96f1(0x225)](_0x3cef68=>{const _0x39e980=_0x5d96f1,_0x2e0b23=new Set();_0x3cef68[_0x39e980(0x1f8)](_0x20cf2e=>{const _0x253361=_0x39e980;switch(_0x20cf2e['type']){case _0x253361(0x215):{const _0x5c43f4=_0x20cf2e['payload'][_0x253361(0x1d8)];_0x2e0b23[_0x253361(0x215)](_0x5c43f4);break;}}}),B(this['_injector'],_0x2e0b23);}));}[_0x30354b(0x1fb)](){const _0x223fc0=_0x30354b;this[_0x223fc0(0x21f)](this[_0x223fc0(0x1f1)][_0x223fc0(0x1c1)][_0x223fc0(0x225)](async _0x306253=>{const _0x189772=_0x223fc0;var _0xb394a0,_0x2503e5,_0x5a8b8e,_0xa435aa;const _0x2b3317=(_0xb394a0=this['_threadCommentModel']['getUnit'](_0x306253['unitId'])[_0x189772(0x219)](_0x5c3c51=>_0x5c3c51[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xb394a0[_0x189772(0x1df)];if(!_0x2b3317)return;const {unitId:_0x4f9c5f,subUnitId:_0x5e762c}=_0x2b3317;switch(_0x306253['user']&&this[_0x189772(0x21a)]['addUser'](_0x306253[_0x189772(0x1ca)]),_0x306253[_0x189772(0x223)]){case v[_0x189772(0x1eb)]:break;case v[_0x189772(0x206)]:{this['_threadCommentModel'][_0x189772(0x1e4)](_0x4f9c5f,_0x5e762c,{'unitId':_0x4f9c5f,'subUnitId':_0x5e762c,'ref':'','id':_0x306253[_0x189772(0x1d9)],'dT':y(+_0x306253['createTimestamp']),'threadId':_0x306253['threadId'],'personId':(_0x5a8b8e=(_0x2503e5=_0x306253[_0x189772(0x1ca)])==null?void 0x0:_0x2503e5['userID'])!=null?_0x5a8b8e:_0x306253[_0x189772(0x1c3)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)]),'parentId':_0x2b3317['id']});break;}case v[_0x189772(0x21c)]:{const _0x54e3ac=this['_threadCommentModel'][_0x189772(0x1e2)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);_0x54e3ac&&_0x54e3ac[_0x189772(0x20a)]&&this[_0x189772(0x207)][_0x189772(0x210)](_0x4f9c5f,_0x5e762c,_0x306253[_0x189772(0x1d9)]);break;}case v[_0x189772(0x1e6)]:{this[_0x189772(0x207)][_0x189772(0x1c2)](_0x4f9c5f,_0x5e762c,{'commentId':_0x306253[_0x189772(0x1d9)],'text':JSON[_0x189772(0x1c7)](_0x306253[_0x189772(0x221)])});break;}case v[_0x189772(0x1f9)]:{const _0x1dfc6d=(_0xa435aa=this['_threadCommentModel'][_0x189772(0x1e9)](_0x306253[_0x189772(0x209)])[_0x189772(0x219)](_0xc6f364=>_0xc6f364[_0x189772(0x1f7)]===_0x306253[_0x189772(0x1f7)]))==null?void 0x0:_0xa435aa[_0x189772(0x1df)];_0x1dfc6d&&this[_0x189772(0x207)][_0x189772(0x226)](_0x4f9c5f,_0x5e762c,_0x1dfc6d['id'],_0x306253[_0x189772(0x1e5)]===I[_0x189772(0x1c9)]);break;}}}));}};_=V([p(0x0,_0x5d6dec(_0x3237e5)),p(0x1,_0x5d6dec(_0x59f117)),p(0x2,_0x5d6dec(_0x3579fd)),p(0x3,_0x5d6dec(_0x5eef6b))],_);const z=_0x30354b(0x21d),O={};var k=Object[_0x30354b(0x1cf)],Q=(_0x19cddd,_0x41e075,_0x110441,_0x40c97a)=>{for(var _0x5f18a9=_0x40c97a>0x1?void 0x0:_0x40c97a?k(_0x41e075,_0x110441):_0x41e075,_0xb79e8d=_0x19cddd['length']-0x1,_0x339154;_0xb79e8d>=0x0;_0xb79e8d--)(_0x339154=_0x19cddd[_0xb79e8d])&&(_0x5f18a9=_0x339154(_0x5f18a9)||_0x5f18a9);return _0x5f18a9;},b=(_0x5a3fb1,_0xa9a51c)=>(_0x4b0db5,_0xefe791)=>_0xa9a51c(_0x4b0db5,_0xefe791,_0x5a3fb1);function X(_0x36f817,_0x281e45){const _0x55f41a=_0x30354b,_0x1c0013=_0x36f817[_0x55f41a(0x1d5)][0x0];return{..._0x281e45,'id':_0x1c0013[_0x55f41a(0x1d9)],'resolved':_0x36f817[_0x55f41a(0x1e5)]===0x1,'dT':y(_0x1c0013[_0x55f41a(0x204)]),'personId':_0x1c0013[_0x55f41a(0x1c3)],'threadId':_0x1c0013[_0x55f41a(0x1f7)]};}function ee(_0x3eaaa7,_0x343457,_0x2dea6a){const _0x1e3ae5=_0x30354b;var _0x32a9d1,_0x13361f;if(((_0x13361f=(_0x32a9d1=_0x3eaaa7==null?void 0x0:_0x3eaaa7[_0x1e3ae5(0x1d5)])==null?void 0x0:_0x32a9d1[_0x1e3ae5(0x218)])!=null?_0x13361f:0x0)>0x0){const _0x55c69a=(_0x12250c,_0x17f27b)=>({'id':_0x12250c['replyId'],'threadId':_0x12250c[_0x1e3ae5(0x1f7)],'dT':y(_0x12250c['createTimestamp']),'personId':_0x12250c[_0x1e3ae5(0x1c3)],'resolved':_0x3eaaa7[_0x1e3ae5(0x1e5)]===I[_0x1e3ae5(0x1c9)],'unitId':_0x343457,'subUnitId':_0x2dea6a,'text':JSON[_0x1e3ae5(0x1c7)](_0x12250c[_0x1e3ae5(0x221)]),'parentId':_0x17f27b}),_0x3beb10=_0x55c69a(_0x3eaaa7[_0x1e3ae5(0x1d5)][0x0]);return{..._0x3beb10,'children':_0x3eaaa7[_0x1e3ae5(0x1d5)][_0x1e3ae5(0x1ee)](0x1)[_0x1e3ae5(0x20f)](_0x16f8d6=>_0x55c69a(_0x16f8d6,_0x3beb10['id']))};}return null;}let S=class{constructor(_0x9ec1cb,_0x27ca8d,_0x27c967){const _0x232620=_0x30354b;this[_0x232620(0x1d1)]=_0x9ec1cb,this[_0x232620(0x21a)]=_0x27ca8d,this[_0x232620(0x1f6)]=_0x27c967;}async['addComment'](_0x4b86a9){const _0x4ef882=_0x30354b;var _0x1a9947,_0x4e5133;const {parentId:_0x9ad8ae,unitId:_0x3c85c6,text:_0x10e433,threadId:_0xf825cc}=_0x4b86a9,_0x10154d=(_0x4e5133=(_0x1a9947=_0x10e433['customRanges'])==null?void 0x0:_0x1a9947[_0x4ef882(0x1fc)](_0x527b20=>_0x527b20[_0x4ef882(0x1bf)]===_0x300af4[_0x4ef882(0x224)])[_0x4ef882(0x20f)](_0x3f9ab0=>_0x3f9ab0[_0x4ef882(0x1d3)]))!=null?_0x4e5133:[],_0x159a50=JSON[_0x4ef882(0x1e0)](_0x10e433),_0x350a15=(await this[_0x4ef882(0x1f6)]['requireSession'](_0x3c85c6))[_0x4ef882(0x1ce)]();if(_0x9ad8ae){const _0xba2370={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d,'threadId':_0xf825cc},_0x558d6a=(await this[_0x4ef882(0x1d1)]['post'](_0x4ef882(0x1d2)+_0x3c85c6+_0x4ef882(0x1c6),{'body':_0xba2370}))[_0x4ef882(0x1fe)]['reply'];return{..._0x4b86a9,'id':_0x558d6a['replyId'],'dT':_0x4a080f(+_0x558d6a['createTimestamp'])[_0x4ef882(0x1dc)](_0x4ef882(0x1ea)),'personId':_0x558d6a[_0x4ef882(0x1c3)]};}else{const _0xa33ed1={'memberId':_0x350a15,'unitId':_0x3c85c6,'content':_0x159a50,'mention':_0x10154d},_0xab587f=await this[_0x4ef882(0x1d1)]['post']('/universer-api/comment/unit/'+_0x3c85c6+'/add',{'body':_0xa33ed1});return X(_0xab587f['body'][_0x4ef882(0x1ef)],_0x4b86a9);}}async[_0x30354b(0x1c2)](_0x570878){const _0x49df70=_0x30354b;var _0x22914d,_0x1f5466;const {text:_0x22ac6f,unitId:_0x2adb4a}=_0x570878,_0x10cf20=(_0x1f5466=(_0x22914d=_0x22ac6f[_0x49df70(0x220)])==null?void 0x0:_0x22914d[_0x49df70(0x1fc)](_0x5b765f=>_0x5b765f[_0x49df70(0x1bf)]===_0x300af4['COMMENT'])['map'](_0xd3e42c=>_0xd3e42c[_0x49df70(0x1d3)]))!=null?_0x1f5466:[],_0x432927=JSON['stringify'](_0x22ac6f),_0x483e67=_0x570878[_0x49df70(0x1f7)],_0x6e2278=_0x570878['id'],_0x1ff66b={'memberId':(await this[_0x49df70(0x1f6)][_0x49df70(0x217)](_0x2adb4a))[_0x49df70(0x1ce)](),'unitId':_0x2adb4a,'threadId':_0x483e67,'mention':_0x10cf20,'content':_0x432927,'replyId':_0x6e2278},_0x381ad0=await this[_0x49df70(0x1d1)][_0x49df70(0x20b)](_0x49df70(0x1d2)+_0x2adb4a+_0x49df70(0x211),{'body':_0x1ff66b});return!_0x381ad0[_0x49df70(0x1fe)]['error']||_0x381ad0[_0x49df70(0x1fe)]['error']['code']===0x1;}async[_0x30354b(0x226)](_0x176f6d){const _0x505721=_0x30354b,{unitId:_0x31bafc}=_0x176f6d,_0x2b72da=_0x176f6d[_0x505721(0x1f7)],_0xbe1d01={'memberId':this['_userService']['getCurrentUser']()[_0x505721(0x229)],'unitId':_0x31bafc,'threadId':_0x2b72da,'solved':_0x176f6d[_0x505721(0x1e3)]?I[_0x505721(0x1c9)]:I['OpenOrReOpen']},_0x201375=await this[_0x505721(0x1d1)][_0x505721(0x20b)](_0x505721(0x1d2)+_0x31bafc+'/solved',{'body':_0xbe1d01});return!_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]||_0x201375[_0x505721(0x1fe)][_0x505721(0x1d4)]['code']===0x1;}async[_0x30354b(0x210)](_0x219348,_0x1d741d,_0x11aeff,_0x1a4e81){const _0x2e3dc2=_0x30354b,_0x972fec={'memberId':(await this[_0x2e3dc2(0x1f6)][_0x2e3dc2(0x217)](_0x219348))[_0x2e3dc2(0x1ce)](),'threadId':_0x11aeff,'replyId':_0x1a4e81,'unitId':_0x219348},_0x1ec068=await this[_0x2e3dc2(0x1d1)][_0x2e3dc2(0x20b)]('/universer-api/comment/unit/'+_0x219348+'/delete',{'body':_0x972fec});return!_0x1ec068[_0x2e3dc2(0x1fe)]['error']||_0x1ec068[_0x2e3dc2(0x1fe)][_0x2e3dc2(0x1d4)][_0x2e3dc2(0x216)]===0x1;}async[_0x30354b(0x214)](_0x3f44f7,_0x5dbb05,_0x103c7f){const _0x10726b=_0x30354b,_0x59a161={'unitId':_0x3f44f7,'threadId':_0x103c7f},_0x4fb4b0=await this[_0x10726b(0x1d1)][_0x10726b(0x20b)]('/universer-api/comment/unit/'+_0x3f44f7+_0x10726b(0x201),{'body':_0x59a161}),_0x18b87d=_0x103c7f[_0x10726b(0x20f)](_0x2805f5=>ee(_0x4fb4b0['body'][_0x10726b(0x1fd)][_0x2805f5],_0x3f44f7,_0x5dbb05))[_0x10726b(0x1fc)](Boolean);return Object[_0x10726b(0x1fa)](_0x4fb4b0[_0x10726b(0x1fe)][_0x10726b(0x1c0)])[_0x10726b(0x1f8)](_0x185d84=>{const _0x2dd430=_0x10726b;this['_userService'][_0x2dd430(0x1f0)](_0x185d84);}),_0x18b87d;}[_0x30354b(0x212)](_0x1321ad){const _0x524d75=_0x30354b;return{'id':_0x1321ad['id'],'threadId':_0x1321ad['threadId'],'ref':_0x1321ad[_0x524d75(0x1e8)]};}};S=Q([b(0x0,_0x5d6dec(_0x365edd)),b(0x1,_0x5d6dec(_0x3579fd)),b(0x2,_0x5d6dec(_0x4c60bb))],S);var re=Object[_0x30354b(0x1cf)],te=(_0x598a40,_0x24d176,_0x30431d,_0x536549)=>{const _0x4d4601=_0x30354b;for(var _0x186ba7=_0x536549>0x1?void 0x0:_0x536549?re(_0x24d176,_0x30431d):_0x24d176,_0x39725a=_0x598a40[_0x4d4601(0x218)]-0x1,_0x502def;_0x39725a>=0x0;_0x39725a--)(_0x502def=_0x598a40[_0x39725a])&&(_0x186ba7=_0x502def(_0x186ba7)||_0x186ba7);return _0x186ba7;},M=(_0x5405cc,_0x46c260)=>(_0x570dc2,_0x2de495)=>_0x46c260(_0x570dc2,_0x2de495,_0x5405cc);let f=class extends _0x5da71c{constructor(_0xf831b5,_0x275fe9){const _0xe016af=_0x30354b;super(),this['_threadCommentDataSourceService']=_0xf831b5,this[_0xe016af(0x1e7)]=_0x275fe9,this['_initDataSource']();}['_initDataSource'](){const _0x57b166=_0x30354b;this[_0x57b166(0x1de)][_0x57b166(0x1d0)]=this[_0x57b166(0x1e7)],this[_0x57b166(0x1de)][_0x57b166(0x1cc)]=!0x1;}};f=te([M(0x0,_0x5a2639),M(0x1,_0x5d6dec(S))],f);var se=Object[_0x30354b(0x1ec)],oe=Object[_0x30354b(0x1cf)],ne=(_0x31307d,_0x3a4205,_0x29fd13)=>_0x3a4205 in _0x31307d?se(_0x31307d,_0x3a4205,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x29fd13}):_0x31307d[_0x3a4205]=_0x29fd13,ie=(_0x3daa40,_0x3a5048,_0xc3a9e1,_0x321717)=>{const _0x2932ce=_0x30354b;for(var _0x1d8deb=_0x321717>0x1?void 0x0:_0x321717?oe(_0x3a5048,_0xc3a9e1):_0x3a5048,_0x631672=_0x3daa40[_0x2932ce(0x218)]-0x1,_0x3ed4cb;_0x631672>=0x0;_0x631672--)(_0x3ed4cb=_0x3daa40[_0x631672])&&(_0x1d8deb=_0x3ed4cb(_0x1d8deb)||_0x1d8deb);return _0x1d8deb;},N=(_0x1b11cc,_0x397cea)=>(_0x325806,_0xdd6ee)=>_0x397cea(_0x325806,_0xdd6ee,_0x1b11cc),$=(_0x2078fb,_0x4ab36d,_0x41b772)=>ne(_0x2078fb,typeof _0x4ab36d!=_0x30354b(0x1cb)?_0x4ab36d+'':_0x4ab36d,_0x41b772);let g=class extends _0x3bc542{constructor(_0x28d035=O,_0x2c859d,_0x303f96){const _0x555333=_0x30354b;super(),this['_config']=_0x28d035,this[_0x555333(0x21b)]=_0x2c859d,this[_0x555333(0x1ff)]=_0x303f96;const {..._0x46bfd8}=_0x3f3339({},O,this[_0x555333(0x1d7)]);this[_0x555333(0x1ff)][_0x555333(0x1c8)](z,_0x46bfd8);}[_0x30354b(0x203)](){const _0x33a6c4=_0x30354b;[[S],[f],[_]][_0x33a6c4(0x1f8)](_0x44dd8f=>{const _0x31a5bf=_0x33a6c4;this['_injector'][_0x31a5bf(0x215)](_0x44dd8f);});}[_0x30354b(0x202)](){const _0xfc040=_0x30354b;this[_0xfc040(0x21b)][_0xfc040(0x1f2)](f),this[_0xfc040(0x21b)][_0xfc040(0x1f2)](_);}};$(g,_0x30354b(0x1c4),W),$(g,'type',_0x3bb98c[_0x30354b(0x1c5)]),g=ie([_0x413398(_0x32a910,_0x516653,_0x2125bb),N(0x1,_0x5d6dec(_0x5eef6b)),N(0x2,_0x195d4b)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x8bd348,_0x12e2ac){const _0x558de9=_0x179d,_0x156c26=_0x8bd348();while(!![]){try{const _0x4f5b9d=-parseInt(_0x558de9(0x1d6))/0x1*(-parseInt(_0x558de9(0x1e3))/0x2)+-parseInt(_0x558de9(0x17e))/0x3*(-parseInt(_0x558de9(0x1cb))/0x4)+-parseInt(_0x558de9(0x1d8))/0x5+-parseInt(_0x558de9(0x1d3))/0x6+parseInt(_0x558de9(0x1b1))/0x7*(parseInt(_0x558de9(0x177))/0x8)+parseInt(_0x558de9(0x1a3))/0x9*(parseInt(_0x558de9(0x1c8))/0xa)+-parseInt(_0x558de9(0x1d0))/0xb*(-parseInt(_0x558de9(0x1ad))/0xc);if(_0x4f5b9d===_0x12e2ac)break;else _0x156c26['push'](_0x156c26['shift']());}catch(_0xae0d1){_0x156c26['push'](_0x156c26['shift']());}}}(_0x500b,0x51f57),function(_0x28a0f2,_0x461ffd){const _0x1d1591=_0x179d;typeof exports==_0x1d1591(0x187)&&typeof module<'u'?_0x461ffd(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1d1591(0x1f4)&&define['amd']?define([_0x1d1591(0x1de),_0x1d1591(0x1b2),_0x1d1591(0x17b),_0x1d1591(0x19a),_0x1d1591(0x1b4),'@univerjs/thread-comment',_0x1d1591(0x18f),_0x1d1591(0x1ec)],_0x461ffd):(_0x28a0f2=typeof globalThis<'u'?globalThis:_0x28a0f2||self,_0x461ffd(_0x28a0f2['UniverProThreadCommentDatasource']={},_0x28a0f2[_0x1d1591(0x1cd)],_0x28a0f2[_0x1d1591(0x1aa)],_0x28a0f2[_0x1d1591(0x19b)],_0x28a0f2[_0x1d1591(0x194)],_0x28a0f2[_0x1d1591(0x1fd)],_0x28a0f2['rxjs'],_0x28a0f2[_0x1d1591(0x1a8)]));}(this,function(_0x3322e8,_0x59d384,_0x1b662c,_0x103b71,_0x2cda3d,_0xfae4d1,_0x51e7e9,_0x161ded){'use strict';const _0x2b48fb=_0x179d;const _0xec0ce0=_0x2b48fb(0x1ac);var _0x3e8cc9=(_0x4d4721=>(_0x4d4721[_0x4d4721['OpenOrReOpen']=0x0]=_0x2b48fb(0x1be),_0x4d4721[_0x4d4721['Solved']=0x1]='Solved',_0x4d4721[_0x4d4721[_0x2b48fb(0x1b8)]=-0x1]='UNRECOGNIZED',_0x4d4721))(_0x3e8cc9||{}),_0xc556b0=(_0x23cde4=>(_0x23cde4[_0x23cde4[_0x2b48fb(0x1f3)]=0x0]=_0x2b48fb(0x1f3),_0x23cde4[_0x23cde4[_0x2b48fb(0x188)]=0x1]=_0x2b48fb(0x188),_0x23cde4[_0x23cde4[_0x2b48fb(0x1f0)]=0x2]='Reply',_0x23cde4[_0x23cde4['Edit']=0x3]=_0x2b48fb(0x1c0),_0x23cde4[_0x23cde4[_0x2b48fb(0x1fa)]=0x4]=_0x2b48fb(0x1fa),_0x23cde4[_0x23cde4[_0x2b48fb(0x1b0)]=0x5]='Solve',_0x23cde4[_0x23cde4['UNRECOGNIZED']=-0x1]=_0x2b48fb(0x1b8),_0x23cde4))(_0xc556b0||{});const _0x49f3fb=_0x133bcf=>_0x103b71[_0x2b48fb(0x1ba)](new Date(+_0x133bcf))[_0x2b48fb(0x179)]('YYYY/MM/DD\x20HH:mm'),_0x19bb97=async(_0x57cc3f,_0x2a97ba)=>{const _0x24e463=_0x2b48fb,_0x23622a=_0x57cc3f['get'](_0x103b71[_0x24e463(0x1db)]),_0x1c6be2=_0x57cc3f['get'](_0x161ded[_0x24e463(0x1a7)]);_0x2a97ba[_0x24e463(0x176)](_0x1c8789=>{const _0xa77103=_0x24e463;_0x23622a[_0xa77103(0x190)](_0x1c8789)&&_0x2a97ba[_0xa77103(0x1d4)](_0x1c8789);}),_0x2a97ba['size']&&(await _0x1c6be2[_0x24e463(0x1cc)](_0x24e463(0x1a4),{'params':{'userIDs':[..._0x2a97ba]}}))[_0x24e463(0x185)][_0x24e463(0x1e1)]['forEach'](_0x5bd8e4=>{_0x5bd8e4&&_0x23622a['addUser'](_0x5bd8e4);});};var _0x4f276c=Object['getOwnPropertyDescriptor'],_0x192a67=(_0x1c5512,_0x399fa8,_0xdf0462,_0x37f90b)=>{const _0x28ea20=_0x2b48fb;for(var _0x2a81d8=_0x37f90b>0x1?void 0x0:_0x37f90b?_0x4f276c(_0x399fa8,_0xdf0462):_0x399fa8,_0x14e717=_0x1c5512[_0x28ea20(0x1f7)]-0x1,_0xd598f;_0x14e717>=0x0;_0x14e717--)(_0xd598f=_0x1c5512[_0x14e717])&&(_0x2a81d8=_0xd598f(_0x2a81d8)||_0x2a81d8);return _0x2a81d8;},_0x408730=(_0x2c4ca3,_0x92285e)=>(_0x5e53f5,_0x3a3cbd)=>_0x92285e(_0x5e53f5,_0x3a3cbd,_0x2c4ca3);let _0x36d340=class extends _0x103b71[_0x2b48fb(0x1a2)]{constructor(_0x3a008e,_0x2bc5b6,_0x17e9a1,_0x34a69a){const _0x3a0934=_0x2b48fb;super(),this['_commentService']=_0x3a008e,this[_0x3a0934(0x1ea)]=_0x2bc5b6,this[_0x3a0934(0x18e)]=_0x17e9a1,this[_0x3a0934(0x1e5)]=_0x34a69a,this['_init'](),this[_0x3a0934(0x17f)]();}['_initUserSync'](){const _0x5586c3=_0x2b48fb;this['disposeWithMe'](this[_0x5586c3(0x1ea)]['commentUpdate$'][_0x5586c3(0x1a5)](_0x51e7e9[_0x5586c3(0x173)](0x10))[_0x5586c3(0x192)](_0x51f3f0=>{const _0x25ee77=_0x5586c3,_0x515d2d=new Set();_0x51f3f0[_0x25ee77(0x176)](_0xf994d4=>{const _0x308f29=_0x25ee77;switch(_0xf994d4['type']){case _0x308f29(0x1ee):{const _0x504f53=_0xf994d4['payload'][_0x308f29(0x1c1)];_0x515d2d[_0x308f29(0x1ee)](_0x504f53);break;}}}),_0x19bb97(this[_0x25ee77(0x1e5)],_0x515d2d);}));}['_init'](){const _0x4a2852=_0x2b48fb;this[_0x4a2852(0x1c6)](this[_0x4a2852(0x1f9)]['commentUpdate$'][_0x4a2852(0x192)](async _0x59108a=>{const _0x422cc4=_0x4a2852;var _0x499f50,_0x4b5532,_0xc14dfa,_0x290c86;const _0x2b49cc=(_0x499f50=this[_0x422cc4(0x1ea)][_0x422cc4(0x1c9)](_0x59108a[_0x422cc4(0x184)])[_0x422cc4(0x1d1)](_0x10e619=>_0x10e619[_0x422cc4(0x183)]===_0x59108a[_0x422cc4(0x183)]))==null?void 0x0:_0x499f50[_0x422cc4(0x1cf)];if(!_0x2b49cc)return;const {unitId:_0x269581,subUnitId:_0x3e98ee}=_0x2b49cc;switch(_0x59108a[_0x422cc4(0x1e6)]&&this[_0x422cc4(0x18e)][_0x422cc4(0x1dd)](_0x59108a['user']),_0x59108a[_0x422cc4(0x182)]){case _0xc556b0[_0x422cc4(0x188)]:break;case _0xc556b0['Reply']:{this['_threadCommentModel'][_0x422cc4(0x1d5)](_0x269581,_0x3e98ee,{'unitId':_0x269581,'subUnitId':_0x3e98ee,'ref':'','id':_0x59108a[_0x422cc4(0x1b3)],'dT':_0x49f3fb(+_0x59108a['createTimestamp']),'threadId':_0x59108a['threadId'],'personId':(_0xc14dfa=(_0x4b5532=_0x59108a[_0x422cc4(0x1e6)])==null?void 0x0:_0x4b5532[_0x422cc4(0x174)])!=null?_0xc14dfa:_0x59108a['userId'],'text':JSON['parse'](_0x59108a[_0x422cc4(0x1e4)]),'parentId':_0x2b49cc['id']});break;}case _0xc556b0['Delete']:{const _0x3c89d3=this[_0x422cc4(0x1ea)]['getComment'](_0x269581,_0x3e98ee,_0x59108a[_0x422cc4(0x1b3)]);_0x3c89d3&&_0x3c89d3[_0x422cc4(0x1bb)]&&this[_0x422cc4(0x1ea)]['deleteComment'](_0x269581,_0x3e98ee,_0x59108a['replyId']);break;}case _0xc556b0[_0x422cc4(0x1c0)]:{this[_0x422cc4(0x1ea)][_0x422cc4(0x1da)](_0x269581,_0x3e98ee,{'commentId':_0x59108a[_0x422cc4(0x1b3)],'text':JSON[_0x422cc4(0x1a6)](_0x59108a[_0x422cc4(0x1e4)])});break;}case _0xc556b0['Solve']:{const _0x2eef9f=(_0x290c86=this['_threadCommentModel'][_0x422cc4(0x1c9)](_0x59108a[_0x422cc4(0x184)])[_0x422cc4(0x1d1)](_0x4f5773=>_0x4f5773[_0x422cc4(0x183)]===_0x59108a[_0x422cc4(0x183)]))==null?void 0x0:_0x290c86['root'];_0x2eef9f&&this[_0x422cc4(0x1ea)][_0x422cc4(0x1ef)](_0x269581,_0x3e98ee,_0x2eef9f['id'],_0x59108a['solved']===_0x3e8cc9[_0x422cc4(0x1ae)]);break;}}}));}};_0x36d340=_0x192a67([_0x408730(0x0,_0x103b71['Inject'](_0x59d384[_0x2b48fb(0x1b6)])),_0x408730(0x1,_0x103b71[_0x2b48fb(0x1e2)](_0xfae4d1[_0x2b48fb(0x17d)])),_0x408730(0x2,_0x103b71['Inject'](_0x103b71[_0x2b48fb(0x1db)])),_0x408730(0x3,_0x103b71[_0x2b48fb(0x1e2)](_0x103b71['Injector']))],_0x36d340);const _0x52e4ae=_0x2b48fb(0x1bf),_0x2ed7e3={};var _0x283fab=Object[_0x2b48fb(0x1a0)],_0x4c53ac=(_0x1baaf5,_0x103c6a,_0x1ac6f5,_0x1762e3)=>{const _0x5eadda=_0x2b48fb;for(var _0x5e1735=_0x1762e3>0x1?void 0x0:_0x1762e3?_0x283fab(_0x103c6a,_0x1ac6f5):_0x103c6a,_0x2db6d7=_0x1baaf5[_0x5eadda(0x1f7)]-0x1,_0x5e3fb1;_0x2db6d7>=0x0;_0x2db6d7--)(_0x5e3fb1=_0x1baaf5[_0x2db6d7])&&(_0x5e1735=_0x5e3fb1(_0x5e1735)||_0x5e1735);return _0x5e1735;},_0x363d45=(_0x527b38,_0x2ad9f4)=>(_0x1c6e27,_0x32dae3)=>_0x2ad9f4(_0x1c6e27,_0x32dae3,_0x527b38);function _0x349549(_0x28639b,_0x50b3c5){const _0x1e5b83=_0x2b48fb,_0x574373=_0x28639b[_0x1e5b83(0x17c)][0x0];return{..._0x50b3c5,'id':_0x574373[_0x1e5b83(0x1b3)],'resolved':_0x28639b[_0x1e5b83(0x191)]===0x1,'dT':_0x49f3fb(_0x574373[_0x1e5b83(0x1fc)]),'personId':_0x574373[_0x1e5b83(0x19f)],'threadId':_0x574373[_0x1e5b83(0x183)]};}function _0x29b5ac(_0x1cd325,_0x55adb8,_0xeeac8c){const _0x24b811=_0x2b48fb;var _0x46369,_0x2b9b3c;if(((_0x2b9b3c=(_0x46369=_0x1cd325==null?void 0x0:_0x1cd325['replies'])==null?void 0x0:_0x46369[_0x24b811(0x1f7)])!=null?_0x2b9b3c:0x0)>0x0){const _0x28cd0d=(_0x22efd3,_0x55fc93)=>({'id':_0x22efd3['replyId'],'threadId':_0x22efd3[_0x24b811(0x183)],'dT':_0x49f3fb(_0x22efd3[_0x24b811(0x1fc)]),'personId':_0x22efd3[_0x24b811(0x19f)],'resolved':_0x1cd325[_0x24b811(0x191)]===_0x3e8cc9['Solved'],'unitId':_0x55adb8,'subUnitId':_0xeeac8c,'text':JSON[_0x24b811(0x1a6)](_0x22efd3[_0x24b811(0x1e4)]),'parentId':_0x55fc93}),_0x3831f5=_0x28cd0d(_0x1cd325[_0x24b811(0x17c)][0x0]);return{..._0x3831f5,'children':_0x1cd325[_0x24b811(0x17c)][_0x24b811(0x1fb)](0x1)[_0x24b811(0x18d)](_0x532f6d=>_0x28cd0d(_0x532f6d,_0x3831f5['id']))};}return null;}let _0x39803a=class{constructor(_0x142487,_0x3c2eee,_0x2ced65){const _0x536d56=_0x2b48fb;this[_0x536d56(0x19c)]=_0x142487,this[_0x536d56(0x18e)]=_0x3c2eee,this['_sessionService']=_0x2ced65;}async[_0x2b48fb(0x1d5)](_0x49e6b5){const _0x43cf14=_0x2b48fb;var _0x3ec4e1,_0x1d1a59;const {parentId:_0x168344,unitId:_0x19dd20,text:_0x256325,threadId:_0x280aa0}=_0x49e6b5,_0x3a52e5=(_0x1d1a59=(_0x3ec4e1=_0x256325[_0x43cf14(0x193)])==null?void 0x0:_0x3ec4e1[_0x43cf14(0x178)](_0x4904a6=>_0x4904a6[_0x43cf14(0x1f1)]===_0x103b71[_0x43cf14(0x1c3)]['COMMENT'])[_0x43cf14(0x18d)](_0x4850c0=>_0x4850c0['rangeId']))!=null?_0x1d1a59:[],_0x247b18=JSON[_0x43cf14(0x198)](_0x256325),_0x48356c=(await this[_0x43cf14(0x180)][_0x43cf14(0x1ed)](_0x19dd20))[_0x43cf14(0x1b7)]();if(_0x168344){const _0x7d8424={'memberId':_0x48356c,'unitId':_0x19dd20,'content':_0x247b18,'mention':_0x3a52e5,'threadId':_0x280aa0},_0x16a133=(await this['_httpService']['post'](_0x43cf14(0x1df)+_0x19dd20+_0x43cf14(0x1c4),{'body':_0x7d8424}))[_0x43cf14(0x185)][_0x43cf14(0x1e8)];return{..._0x49e6b5,'id':_0x16a133[_0x43cf14(0x1b3)],'dT':_0x103b71[_0x43cf14(0x1ba)](+_0x16a133['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x16a133['userId']};}else{const _0x22d027={'memberId':_0x48356c,'unitId':_0x19dd20,'content':_0x247b18,'mention':_0x3a52e5},_0x10bb01=await this[_0x43cf14(0x19c)][_0x43cf14(0x1b9)](_0x43cf14(0x1df)+_0x19dd20+_0x43cf14(0x1f5),{'body':_0x22d027});return _0x349549(_0x10bb01[_0x43cf14(0x185)][_0x43cf14(0x19e)],_0x49e6b5);}}async['updateComment'](_0x3b32d4){const _0x2d8b69=_0x2b48fb;var _0x468ed2,_0xfbdf19;const {text:_0x50b2c2,unitId:_0x4a42ec}=_0x3b32d4,_0x517df5=(_0xfbdf19=(_0x468ed2=_0x50b2c2[_0x2d8b69(0x193)])==null?void 0x0:_0x468ed2[_0x2d8b69(0x178)](_0x33714d=>_0x33714d[_0x2d8b69(0x1f1)]===_0x103b71[_0x2d8b69(0x1c3)]['COMMENT'])[_0x2d8b69(0x18d)](_0x5454fa=>_0x5454fa[_0x2d8b69(0x189)]))!=null?_0xfbdf19:[],_0x5a2d6d=JSON[_0x2d8b69(0x198)](_0x50b2c2),_0x34fc88=_0x3b32d4[_0x2d8b69(0x183)],_0x263be1=_0x3b32d4['id'],_0x475d74={'memberId':(await this[_0x2d8b69(0x180)][_0x2d8b69(0x1ed)](_0x4a42ec))['getMemberID'](),'unitId':_0x4a42ec,'threadId':_0x34fc88,'mention':_0x517df5,'content':_0x5a2d6d,'replyId':_0x263be1},_0x59ef43=await this[_0x2d8b69(0x19c)][_0x2d8b69(0x1b9)]('/universer-api/comment/unit/'+_0x4a42ec+'/edit',{'body':_0x475d74});return!_0x59ef43['body'][_0x2d8b69(0x1f8)]||_0x59ef43[_0x2d8b69(0x185)][_0x2d8b69(0x1f8)]['code']===0x1;}async[_0x2b48fb(0x1ef)](_0x572980){const _0xd2025c=_0x2b48fb,{unitId:_0x5dc79a}=_0x572980,_0x3e2414=_0x572980[_0xd2025c(0x183)],_0x38ff91={'memberId':this[_0xd2025c(0x18e)]['getCurrentUser']()[_0xd2025c(0x174)],'unitId':_0x5dc79a,'threadId':_0x3e2414,'solved':_0x572980['resolved']?_0x3e8cc9[_0xd2025c(0x1ae)]:_0x3e8cc9['OpenOrReOpen']},_0x3a4d0b=await this[_0xd2025c(0x19c)][_0xd2025c(0x1b9)](_0xd2025c(0x1df)+_0x5dc79a+_0xd2025c(0x19d),{'body':_0x38ff91});return!_0x3a4d0b[_0xd2025c(0x185)][_0xd2025c(0x1f8)]||_0x3a4d0b[_0xd2025c(0x185)][_0xd2025c(0x1f8)][_0xd2025c(0x1e7)]===0x1;}async[_0x2b48fb(0x1a1)](_0x1bd1a4,_0x3b4186,_0x2c666c,_0x5cb414){const _0x2cf342=_0x2b48fb,_0x27a5a5={'memberId':(await this[_0x2cf342(0x180)][_0x2cf342(0x1ed)](_0x1bd1a4))[_0x2cf342(0x1b7)](),'threadId':_0x2c666c,'replyId':_0x5cb414,'unitId':_0x1bd1a4},_0x8e2e7c=await this[_0x2cf342(0x19c)][_0x2cf342(0x1b9)]('/universer-api/comment/unit/'+_0x1bd1a4+_0x2cf342(0x1f6),{'body':_0x27a5a5});return!_0x8e2e7c[_0x2cf342(0x185)][_0x2cf342(0x1f8)]||_0x8e2e7c[_0x2cf342(0x185)]['error'][_0x2cf342(0x1e7)]===0x1;}async[_0x2b48fb(0x196)](_0x9548b0,_0x41b165,_0x541e99){const _0x278023=_0x2b48fb,_0x5adfc1={'unitId':_0x9548b0,'threadId':_0x541e99},_0x3e9515=await this[_0x278023(0x19c)][_0x278023(0x1b9)](_0x278023(0x1df)+_0x9548b0+_0x278023(0x199),{'body':_0x5adfc1}),_0x3ecd27=_0x541e99[_0x278023(0x18d)](_0xdd0633=>_0x29b5ac(_0x3e9515[_0x278023(0x185)][_0x278023(0x1ab)][_0xdd0633],_0x9548b0,_0x41b165))[_0x278023(0x178)](Boolean);return Object[_0x278023(0x1b5)](_0x3e9515[_0x278023(0x185)][_0x278023(0x1e1)])[_0x278023(0x176)](_0x373753=>{this['_userService']['addUser'](_0x373753);}),_0x3ecd27;}[_0x2b48fb(0x1c7)](_0x4c48ed){const _0x343911=_0x2b48fb;return{'id':_0x4c48ed['id'],'threadId':_0x4c48ed[_0x343911(0x183)],'ref':_0x4c48ed[_0x343911(0x1dc)]};}};_0x39803a=_0x4c53ac([_0x363d45(0x0,_0x103b71[_0x2b48fb(0x1e2)](_0x161ded[_0x2b48fb(0x1a7)])),_0x363d45(0x1,_0x103b71['Inject'](_0x103b71[_0x2b48fb(0x1db)])),_0x363d45(0x2,_0x103b71[_0x2b48fb(0x1e2)](_0x59d384['CollaborationSessionService']))],_0x39803a);var _0x53b2cb=Object[_0x2b48fb(0x1a0)],_0x1eef12=(_0x1681c6,_0x4fb12c,_0x31b305,_0x337dfc)=>{for(var _0x49b106=_0x337dfc>0x1?void 0x0:_0x337dfc?_0x53b2cb(_0x4fb12c,_0x31b305):_0x4fb12c,_0x3e7299=_0x1681c6['length']-0x1,_0x4d4163;_0x3e7299>=0x0;_0x3e7299--)(_0x4d4163=_0x1681c6[_0x3e7299])&&(_0x49b106=_0x4d4163(_0x49b106)||_0x49b106);return _0x49b106;},_0x472c9d=(_0x36fb1f,_0x25f064)=>(_0x316bbf,_0x4da007)=>_0x25f064(_0x316bbf,_0x4da007,_0x36fb1f);let _0x3aeb59=class extends _0x103b71['Disposable']{constructor(_0x82182,_0x5e73a9){const _0xf9ac09=_0x2b48fb;super(),this[_0xf9ac09(0x1e9)]=_0x82182,this[_0xf9ac09(0x18a)]=_0x5e73a9,this[_0xf9ac09(0x1d7)]();}['_initDataSource'](){const _0x5315de=_0x2b48fb;this[_0x5315de(0x1e9)][_0x5315de(0x1c5)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x5315de(0x1bc)]=!0x1;}};_0x3aeb59=_0x1eef12([_0x472c9d(0x0,_0xfae4d1[_0x2b48fb(0x1ca)]),_0x472c9d(0x1,_0x103b71[_0x2b48fb(0x1e2)](_0x39803a))],_0x3aeb59);var _0x5075b2=Object[_0x2b48fb(0x1d2)],_0x1f6ccb=Object[_0x2b48fb(0x1a0)],_0x5a868d=(_0x538e27,_0x2919cd,_0x175495)=>_0x2919cd in _0x538e27?_0x5075b2(_0x538e27,_0x2919cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x175495}):_0x538e27[_0x2919cd]=_0x175495,_0x3d1941=(_0x253b38,_0x5e0a82,_0x409c12,_0x34bb9e)=>{for(var _0xf57037=_0x34bb9e>0x1?void 0x0:_0x34bb9e?_0x1f6ccb(_0x5e0a82,_0x409c12):_0x5e0a82,_0x758ffd=_0x253b38['length']-0x1,_0x291288;_0x758ffd>=0x0;_0x758ffd--)(_0x291288=_0x253b38[_0x758ffd])&&(_0xf57037=_0x291288(_0xf57037)||_0xf57037);return _0xf57037;},_0x44c498=(_0x2ba6b6,_0x3bbadb)=>(_0x2c8b05,_0x5a99e8)=>_0x3bbadb(_0x2c8b05,_0x5a99e8,_0x2ba6b6),_0x272167=(_0x320c5a,_0x154022,_0x5dd033)=>_0x5a868d(_0x320c5a,typeof _0x154022!=_0x2b48fb(0x18b)?_0x154022+'':_0x154022,_0x5dd033);_0x3322e8[_0x2b48fb(0x1eb)]=class extends _0x103b71['Plugin']{constructor(_0x1bf2da=_0x2ed7e3,_0x5953bf,_0x6d65e2){const _0x4a6524=_0x2b48fb;super(),this[_0x4a6524(0x1a9)]=_0x1bf2da,this[_0x4a6524(0x1e5)]=_0x5953bf,this[_0x4a6524(0x1e0)]=_0x6d65e2;const {..._0x405cc5}=_0x103b71[_0x4a6524(0x18c)]({},_0x2ed7e3,this[_0x4a6524(0x1a9)]);this['_configService'][_0x4a6524(0x181)](_0x52e4ae,_0x405cc5);}[_0x2b48fb(0x197)](){const _0x2c83a0=_0x2b48fb;[[_0x39803a],[_0x3aeb59],[_0x36d340]][_0x2c83a0(0x176)](_0x3ab0f0=>{const _0x5f4d13=_0x2c83a0;this[_0x5f4d13(0x1e5)][_0x5f4d13(0x1ee)](_0x3ab0f0);});}[_0x2b48fb(0x175)](){const _0x2d6b2a=_0x2b48fb;this[_0x2d6b2a(0x1e5)][_0x2d6b2a(0x1cc)](_0x3aeb59),this[_0x2d6b2a(0x1e5)][_0x2d6b2a(0x1cc)](_0x36d340);}},_0x272167(_0x3322e8[_0x2b48fb(0x1eb)],_0x2b48fb(0x1d9),_0xec0ce0),_0x272167(_0x3322e8[_0x2b48fb(0x1eb)],_0x2b48fb(0x182),_0x103b71[_0x2b48fb(0x1af)][_0x2b48fb(0x195)]),_0x3322e8[_0x2b48fb(0x1eb)]=_0x3d1941([_0x103b71[_0x2b48fb(0x186)](_0x2cda3d[_0x2b48fb(0x1f2)],_0x59d384['UniverCollaborationClientPlugin'],_0x1b662c[_0x2b48fb(0x17a)]),_0x44c498(0x1,_0x103b71[_0x2b48fb(0x1e2)](_0x103b71[_0x2b48fb(0x1ce)])),_0x44c498(0x2,_0x103b71['IConfigService'])],_0x3322e8[_0x2b48fb(0x1eb)]),Object[_0x2b48fb(0x1d2)](_0x3322e8,Symbol[_0x2b48fb(0x1c2)],{'value':_0x2b48fb(0x1bd)});}));function _0x179d(_0x10d494,_0x3df04f){const _0x500b08=_0x500b();return _0x179d=function(_0x179dab,_0x39bc1d){_0x179dab=_0x179dab-0x173;let _0x10e092=_0x500b08[_0x179dab];return _0x10e092;},_0x179d(_0x10d494,_0x3df04f);}function _0x500b(){const _0x131d5e=['forEach','8iWkETe','filter','format','UniverLicensePlugin','@univerjs-pro/license','replies','ThreadCommentModel','1299CdoyOh','_initUserSync','_sessionService','setConfig','type','threadId','unitId','body','DependentOn','object','Add','rangeId','_threadCommentDataSource','symbol','merge','map','_userService','rxjs','getUser','solved','subscribe','customRanges','UniverThreadCommentUi','UNIVER_UNKNOWN','listComments','onStarting','stringify','/list','@univerjs/core','UniverCore','_httpService','/solved','comment','userId','getOwnPropertyDescriptor','deleteComment','Disposable','1878597dibaMy','/universer-api/user/list','pipe','parse','HTTPService','UniverNetwork','_config','UniverProLicense','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','84CdnZND','Solved','UniverInstanceType','Solve','2711541gDJAHH','@univerjs-pro/collaboration-client','replyId','@univerjs/thread-comment-ui','values','CommentService','getMemberID','UNRECOGNIZED','post','dayjs','parentId','syncUpdateMutationToColla','Module','OpenOrReOpen','thread-comment-data-source.config','Edit','personId','toStringTag','CustomRangeType','/reply','dataSource','disposeWithMe','saveCommentToSnapshot','10TdaHRT','getUnit','IThreadCommentDataSourceService','4348XZLcED','get','UniverProCollaborationClient','Injector','root','158477ibLGpv','find','defineProperty','3271200mXIGXe','delete','addComment','8197vJtdQE','_initDataSource','3195920gthGhg','pluginName','updateComment','UserManagerService','ref','addUser','exports','/universer-api/comment/unit/','_configService','users','Inject','86nZbuvi','content','_injector','user','code','reply','_threadCommentDataSourceService','_threadCommentModel','UniverThreadCommentDataSourcePlugin','@univerjs/network','requireSession','add','resolveComment','Reply','rangeType','UniverThreadCommentUIPlugin','Unknown','function','/add','/delete','length','error','_commentService','Delete','slice','createTimestamp','UniverThreadComment','bufferTime','userID','onReady'];_0x500b=function(){return _0x131d5e;};return _0x500b();}
|
|
1
|
+
(function(_0x36a560,_0x1448b8){const _0x3f406e=_0x2a56,_0x43d4c2=_0x36a560();while(!![]){try{const _0x3c0763=-parseInt(_0x3f406e(0x1ab))/0x1+parseInt(_0x3f406e(0x1a2))/0x2*(-parseInt(_0x3f406e(0x17e))/0x3)+-parseInt(_0x3f406e(0x1c8))/0x4*(parseInt(_0x3f406e(0x189))/0x5)+parseInt(_0x3f406e(0x1aa))/0x6*(-parseInt(_0x3f406e(0x1de))/0x7)+-parseInt(_0x3f406e(0x1c7))/0x8*(-parseInt(_0x3f406e(0x1cd))/0x9)+parseInt(_0x3f406e(0x188))/0xa+parseInt(_0x3f406e(0x182))/0xb*(parseInt(_0x3f406e(0x1e7))/0xc);if(_0x3c0763===_0x1448b8)break;else _0x43d4c2['push'](_0x43d4c2['shift']());}catch(_0xf6a4e8){_0x43d4c2['push'](_0x43d4c2['shift']());}}}(_0x3f33,0xa1205),function(_0x2304d8,_0x234b4c){const _0x21e0e5=_0x2a56;typeof exports==_0x21e0e5(0x187)&&typeof module<'u'?_0x234b4c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x21e0e5(0x1bc),_0x21e0e5(0x190),_0x21e0e5(0x1f2),_0x21e0e5(0x19d),_0x21e0e5(0x1eb),_0x21e0e5(0x1c3),_0x21e0e5(0x1ba),_0x21e0e5(0x201)],_0x234b4c):(_0x2304d8=typeof globalThis<'u'?globalThis:_0x2304d8||self,_0x234b4c(_0x2304d8['UniverProThreadCommentDatasource']={},_0x2304d8['UniverProCollaborationClient'],_0x2304d8[_0x21e0e5(0x1d4)],_0x2304d8[_0x21e0e5(0x1db)],_0x2304d8[_0x21e0e5(0x1b9)],_0x2304d8[_0x21e0e5(0x1bb)],_0x2304d8['rxjs'],_0x2304d8[_0x21e0e5(0x1a4)]));}(this,function(_0x535030,_0x504b97,_0x51a395,_0x20d5f0,_0x4da799,_0x4f9e71,_0x4cfb65,_0x20277a){'use strict';const _0x14ef60=_0x2a56;const _0x3e569=_0x14ef60(0x1a9);var _0x56e0b5=(_0x4134ca=>(_0x4134ca[_0x4134ca[_0x14ef60(0x19f)]=0x0]='OpenOrReOpen',_0x4134ca[_0x4134ca[_0x14ef60(0x1c1)]=0x1]=_0x14ef60(0x1c1),_0x4134ca[_0x4134ca[_0x14ef60(0x186)]=-0x1]=_0x14ef60(0x186),_0x4134ca))(_0x56e0b5||{}),_0x4ceb98=(_0x5c9de0=>(_0x5c9de0[_0x5c9de0[_0x14ef60(0x1a0)]=0x0]=_0x14ef60(0x1a0),_0x5c9de0[_0x5c9de0[_0x14ef60(0x1ad)]=0x1]=_0x14ef60(0x1ad),_0x5c9de0[_0x5c9de0[_0x14ef60(0x19c)]=0x2]=_0x14ef60(0x19c),_0x5c9de0[_0x5c9de0['Edit']=0x3]=_0x14ef60(0x1bf),_0x5c9de0[_0x5c9de0[_0x14ef60(0x1d3)]=0x4]=_0x14ef60(0x1d3),_0x5c9de0[_0x5c9de0[_0x14ef60(0x18c)]=0x5]=_0x14ef60(0x18c),_0x5c9de0[_0x5c9de0[_0x14ef60(0x186)]=-0x1]=_0x14ef60(0x186),_0x5c9de0))(_0x4ceb98||{});const _0x3be4ab=_0x59d21e=>_0x20d5f0[_0x14ef60(0x1f3)](new Date(+_0x59d21e))[_0x14ef60(0x199)]('YYYY/MM/DD\x20HH:mm'),_0x261b7d=async(_0x61ba65,_0x24ed99)=>{const _0x41c7bd=_0x14ef60,_0x23a40d=_0x61ba65[_0x41c7bd(0x1e6)](_0x20d5f0[_0x41c7bd(0x1b2)]),_0x3c3ef9=_0x61ba65['get'](_0x20277a[_0x41c7bd(0x1fb)]);_0x24ed99[_0x41c7bd(0x1ff)](_0x906125=>{const _0x428a7f=_0x41c7bd;_0x23a40d[_0x428a7f(0x19b)](_0x906125)&&_0x24ed99[_0x428a7f(0x1fc)](_0x906125);}),_0x24ed99[_0x41c7bd(0x183)]&&(await _0x3c3ef9[_0x41c7bd(0x1e6)](_0x41c7bd(0x1e8),{'params':{'userIDs':[..._0x24ed99]}}))[_0x41c7bd(0x1b7)][_0x41c7bd(0x1f4)][_0x41c7bd(0x1ff)](_0x900540=>{const _0x525866=_0x41c7bd;_0x900540&&_0x23a40d[_0x525866(0x1dc)](_0x900540);});};var _0xdb31d2=Object[_0x14ef60(0x1ea)],_0x5c6129=(_0x1fd339,_0x5039c0,_0x32ff59,_0x51153e)=>{const _0x3377f5=_0x14ef60;for(var _0x4ce63e=_0x51153e>0x1?void 0x0:_0x51153e?_0xdb31d2(_0x5039c0,_0x32ff59):_0x5039c0,_0x8628b4=_0x1fd339[_0x3377f5(0x1cb)]-0x1,_0x30be70;_0x8628b4>=0x0;_0x8628b4--)(_0x30be70=_0x1fd339[_0x8628b4])&&(_0x4ce63e=_0x30be70(_0x4ce63e)||_0x4ce63e);return _0x4ce63e;},_0xf68539=(_0x4719b8,_0x3570c6)=>(_0x27b974,_0x41b0f9)=>_0x3570c6(_0x27b974,_0x41b0f9,_0x4719b8);let _0x45c70f=class extends _0x20d5f0[_0x14ef60(0x1f0)]{constructor(_0x37f313,_0xd75420,_0x5ad218,_0x253f6c){const _0x575b2c=_0x14ef60;super(),this[_0x575b2c(0x1ee)]=_0x37f313,this[_0x575b2c(0x1be)]=_0xd75420,this[_0x575b2c(0x18a)]=_0x5ad218,this[_0x575b2c(0x1d9)]=_0x253f6c,this[_0x575b2c(0x1f9)](),this[_0x575b2c(0x1da)]();}[_0x14ef60(0x1da)](){const _0x112538=_0x14ef60;this[_0x112538(0x1c5)](this[_0x112538(0x1be)][_0x112538(0x1df)]['pipe'](_0x4cfb65[_0x112538(0x1d7)](0x10))['subscribe'](_0x353421=>{const _0x2f24a8=_0x112538,_0x4e92a7=new Set();_0x353421[_0x2f24a8(0x1ff)](_0x436c6e=>{const _0x34b3f6=_0x2f24a8;switch(_0x436c6e[_0x34b3f6(0x1dd)]){case'add':{const _0x18b007=_0x436c6e['payload']['personId'];_0x4e92a7[_0x34b3f6(0x1d2)](_0x18b007);break;}}}),_0x261b7d(this[_0x2f24a8(0x1d9)],_0x4e92a7);}));}['_init'](){const _0x25daed=_0x14ef60;this['disposeWithMe'](this['_commentService'][_0x25daed(0x1df)][_0x25daed(0x184)](async _0x16102b=>{const _0x22d827=_0x25daed;var _0x4574f2,_0x340084,_0x32951e,_0x3a5dd5;const _0x52ef4f=(_0x4574f2=this[_0x22d827(0x1be)][_0x22d827(0x1cf)](_0x16102b[_0x22d827(0x181)])['find'](_0x1938a2=>_0x1938a2[_0x22d827(0x1ef)]===_0x16102b[_0x22d827(0x1ef)]))==null?void 0x0:_0x4574f2['root'];if(!_0x52ef4f)return;const {unitId:_0x397485,subUnitId:_0x3b2163}=_0x52ef4f;switch(_0x16102b['user']&&this[_0x22d827(0x18a)][_0x22d827(0x1dc)](_0x16102b['user']),_0x16102b[_0x22d827(0x1dd)]){case _0x4ceb98[_0x22d827(0x1ad)]:break;case _0x4ceb98[_0x22d827(0x19c)]:{this['_threadCommentModel'][_0x22d827(0x1ae)](_0x397485,_0x3b2163,{'unitId':_0x397485,'subUnitId':_0x3b2163,'ref':'','id':_0x16102b['replyId'],'dT':_0x3be4ab(+_0x16102b['createTimestamp']),'threadId':_0x16102b[_0x22d827(0x1ef)],'personId':(_0x32951e=(_0x340084=_0x16102b['user'])==null?void 0x0:_0x340084[_0x22d827(0x1e4)])!=null?_0x32951e:_0x16102b[_0x22d827(0x1e5)],'text':JSON[_0x22d827(0x1d0)](_0x16102b['content']),'parentId':_0x52ef4f['id']});break;}case _0x4ceb98[_0x22d827(0x1d3)]:{const _0x2a1318=this[_0x22d827(0x1be)][_0x22d827(0x17c)](_0x397485,_0x3b2163,_0x16102b[_0x22d827(0x1c2)]);_0x2a1318&&_0x2a1318[_0x22d827(0x1e9)]&&this[_0x22d827(0x1be)][_0x22d827(0x1a7)](_0x397485,_0x3b2163,_0x16102b[_0x22d827(0x1c2)]);break;}case _0x4ceb98['Edit']:{this[_0x22d827(0x1be)]['updateComment'](_0x397485,_0x3b2163,{'commentId':_0x16102b[_0x22d827(0x1c2)],'text':JSON[_0x22d827(0x1d0)](_0x16102b['content'])});break;}case _0x4ceb98[_0x22d827(0x18c)]:{const _0x81a0b3=(_0x3a5dd5=this[_0x22d827(0x1be)][_0x22d827(0x1cf)](_0x16102b[_0x22d827(0x181)])['find'](_0x3f9f17=>_0x3f9f17['threadId']===_0x16102b[_0x22d827(0x1ef)]))==null?void 0x0:_0x3a5dd5[_0x22d827(0x1d5)];_0x81a0b3&&this[_0x22d827(0x1be)]['resolveComment'](_0x397485,_0x3b2163,_0x81a0b3['id'],_0x16102b[_0x22d827(0x19a)]===_0x56e0b5[_0x22d827(0x1c1)]);break;}}}));}};_0x45c70f=_0x5c6129([_0xf68539(0x0,_0x20d5f0[_0x14ef60(0x185)](_0x504b97[_0x14ef60(0x1b3)])),_0xf68539(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x4f9e71['ThreadCommentModel'])),_0xf68539(0x2,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b2)])),_0xf68539(0x3,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b1)]))],_0x45c70f);const _0xb8d4e6=_0x14ef60(0x1e1),_0xd9a410={};var _0x1fa2c5=Object['getOwnPropertyDescriptor'],_0x57837b=(_0x3e3de0,_0x4acd88,_0x26c302,_0x49ade4)=>{for(var _0x1afa03=_0x49ade4>0x1?void 0x0:_0x49ade4?_0x1fa2c5(_0x4acd88,_0x26c302):_0x4acd88,_0x1e9ce7=_0x3e3de0['length']-0x1,_0x116748;_0x1e9ce7>=0x0;_0x1e9ce7--)(_0x116748=_0x3e3de0[_0x1e9ce7])&&(_0x1afa03=_0x116748(_0x1afa03)||_0x1afa03);return _0x1afa03;},_0xdf1a53=(_0x4f6751,_0x333761)=>(_0x40d651,_0x49ab7c)=>_0x333761(_0x40d651,_0x49ab7c,_0x4f6751);function _0x4210ec(_0x398b33,_0x53635f){const _0x24b6ab=_0x14ef60,_0x598325=_0x398b33[_0x24b6ab(0x1d6)][0x0];return{..._0x53635f,'id':_0x598325[_0x24b6ab(0x1c2)],'resolved':_0x398b33[_0x24b6ab(0x19a)]===0x1,'dT':_0x3be4ab(_0x598325[_0x24b6ab(0x19e)]),'personId':_0x598325[_0x24b6ab(0x1e5)],'threadId':_0x598325[_0x24b6ab(0x1ef)]};}function _0x20e294(_0x493e61,_0x8f3454,_0x4f2644){const _0x42f3db=_0x14ef60;var _0xa17888,_0x29f452;if(((_0x29f452=(_0xa17888=_0x493e61==null?void 0x0:_0x493e61[_0x42f3db(0x1d6)])==null?void 0x0:_0xa17888[_0x42f3db(0x1cb)])!=null?_0x29f452:0x0)>0x0){const _0xc9bf8f=(_0x3207e0,_0x3ec936)=>({'id':_0x3207e0[_0x42f3db(0x1c2)],'threadId':_0x3207e0[_0x42f3db(0x1ef)],'dT':_0x3be4ab(_0x3207e0[_0x42f3db(0x19e)]),'personId':_0x3207e0[_0x42f3db(0x1e5)],'resolved':_0x493e61[_0x42f3db(0x19a)]===_0x56e0b5[_0x42f3db(0x1c1)],'unitId':_0x8f3454,'subUnitId':_0x4f2644,'text':JSON[_0x42f3db(0x1d0)](_0x3207e0['content']),'parentId':_0x3ec936}),_0x45ceb1=_0xc9bf8f(_0x493e61[_0x42f3db(0x1d6)][0x0]);return{..._0x45ceb1,'children':_0x493e61[_0x42f3db(0x1d6)]['slice'](0x1)['map'](_0x809842=>_0xc9bf8f(_0x809842,_0x45ceb1['id']))};}return null;}let _0x1c2270=class{constructor(_0x192204,_0x17a22d,_0x1bf634){const _0x40e04e=_0x14ef60;this['_httpService']=_0x192204,this['_userService']=_0x17a22d,this[_0x40e04e(0x200)]=_0x1bf634;}async['addComment'](_0x5ec81c){const _0x3d6334=_0x14ef60;var _0xebeacb,_0x150096;const {parentId:_0x24d073,unitId:_0x4cd849,text:_0x4be7c3,threadId:_0x17c73f}=_0x5ec81c,_0x52a81f=(_0x150096=(_0xebeacb=_0x4be7c3['customRanges'])==null?void 0x0:_0xebeacb[_0x3d6334(0x1d8)](_0x2a0c5e=>_0x2a0c5e[_0x3d6334(0x180)]===_0x20d5f0['CustomRangeType'][_0x3d6334(0x1c9)])[_0x3d6334(0x1a3)](_0x4729c9=>_0x4729c9['rangeId']))!=null?_0x150096:[],_0x58276d=JSON[_0x3d6334(0x202)](_0x4be7c3),_0xdef7e0=(await this[_0x3d6334(0x200)]['requireSession'](_0x4cd849))[_0x3d6334(0x1e2)]();if(_0x24d073){const _0x291bb7={'memberId':_0xdef7e0,'unitId':_0x4cd849,'content':_0x58276d,'mention':_0x52a81f,'threadId':_0x17c73f},_0x17967c=(await this[_0x3d6334(0x18f)][_0x3d6334(0x1bd)](_0x3d6334(0x1cc)+_0x4cd849+_0x3d6334(0x191),{'body':_0x291bb7}))[_0x3d6334(0x1b7)]['reply'];return{..._0x5ec81c,'id':_0x17967c['replyId'],'dT':_0x20d5f0['dayjs'](+_0x17967c['createTimestamp'])[_0x3d6334(0x199)](_0x3d6334(0x1b5)),'personId':_0x17967c[_0x3d6334(0x1e5)]};}else{const _0x1afb4b={'memberId':_0xdef7e0,'unitId':_0x4cd849,'content':_0x58276d,'mention':_0x52a81f},_0x22aeb7=await this['_httpService'][_0x3d6334(0x1bd)](_0x3d6334(0x1cc)+_0x4cd849+_0x3d6334(0x1fe),{'body':_0x1afb4b});return _0x4210ec(_0x22aeb7[_0x3d6334(0x1b7)][_0x3d6334(0x1b8)],_0x5ec81c);}}async[_0x14ef60(0x1ac)](_0xac5a65){const _0x12fd20=_0x14ef60;var _0x99d20c,_0x963293;const {text:_0xb718dd,unitId:_0x2008d6}=_0xac5a65,_0x193854=(_0x963293=(_0x99d20c=_0xb718dd['customRanges'])==null?void 0x0:_0x99d20c[_0x12fd20(0x1d8)](_0x12bbae=>_0x12bbae['rangeType']===_0x20d5f0[_0x12fd20(0x193)][_0x12fd20(0x1c9)])[_0x12fd20(0x1a3)](_0x5227e8=>_0x5227e8[_0x12fd20(0x17d)]))!=null?_0x963293:[],_0x226b12=JSON['stringify'](_0xb718dd),_0x1b0ef5=_0xac5a65[_0x12fd20(0x1ef)],_0x4ca824=_0xac5a65['id'],_0x3d9eb3={'memberId':(await this[_0x12fd20(0x200)][_0x12fd20(0x1ca)](_0x2008d6))[_0x12fd20(0x1e2)](),'unitId':_0x2008d6,'threadId':_0x1b0ef5,'mention':_0x193854,'content':_0x226b12,'replyId':_0x4ca824},_0x4c7957=await this[_0x12fd20(0x18f)][_0x12fd20(0x1bd)](_0x12fd20(0x1cc)+_0x2008d6+'/edit',{'body':_0x3d9eb3});return!_0x4c7957[_0x12fd20(0x1b7)][_0x12fd20(0x1ec)]||_0x4c7957[_0x12fd20(0x1b7)][_0x12fd20(0x1ec)]['code']===0x1;}async[_0x14ef60(0x1a8)](_0x1ca494){const _0x146be8=_0x14ef60,{unitId:_0x2b046e}=_0x1ca494,_0x479e8d=_0x1ca494[_0x146be8(0x1ef)],_0xd9d473={'memberId':this['_userService'][_0x146be8(0x195)]()[_0x146be8(0x1e4)],'unitId':_0x2b046e,'threadId':_0x479e8d,'solved':_0x1ca494[_0x146be8(0x1a5)]?_0x56e0b5['Solved']:_0x56e0b5[_0x146be8(0x19f)]},_0x550662=await this[_0x146be8(0x18f)][_0x146be8(0x1bd)](_0x146be8(0x1cc)+_0x2b046e+_0x146be8(0x1af),{'body':_0xd9d473});return!_0x550662[_0x146be8(0x1b7)][_0x146be8(0x1ec)]||_0x550662[_0x146be8(0x1b7)]['error'][_0x146be8(0x1b6)]===0x1;}async[_0x14ef60(0x1a7)](_0xcfd029,_0x1c9d32,_0x65c5c0,_0x3ef9ed){const _0x3899af=_0x14ef60,_0xb7e7c1={'memberId':(await this[_0x3899af(0x200)][_0x3899af(0x1ca)](_0xcfd029))[_0x3899af(0x1e2)](),'threadId':_0x65c5c0,'replyId':_0x3ef9ed,'unitId':_0xcfd029},_0x2228dc=await this[_0x3899af(0x18f)][_0x3899af(0x1bd)](_0x3899af(0x1cc)+_0xcfd029+_0x3899af(0x18b),{'body':_0xb7e7c1});return!_0x2228dc['body']['error']||_0x2228dc['body'][_0x3899af(0x1ec)][_0x3899af(0x1b6)]===0x1;}async[_0x14ef60(0x197)](_0x44713f,_0x589de8,_0x5c32e3){const _0x3a92c0=_0x14ef60,_0x9fb50={'unitId':_0x44713f,'threadId':_0x5c32e3},_0x46b595=await this[_0x3a92c0(0x18f)][_0x3a92c0(0x1bd)](_0x3a92c0(0x1cc)+_0x44713f+_0x3a92c0(0x1c0),{'body':_0x9fb50}),_0x5e10a9=_0x5c32e3[_0x3a92c0(0x1a3)](_0x596548=>_0x20e294(_0x46b595[_0x3a92c0(0x1b7)]['comments'][_0x596548],_0x44713f,_0x589de8))[_0x3a92c0(0x1d8)](Boolean);return Object[_0x3a92c0(0x192)](_0x46b595['body'][_0x3a92c0(0x1f4)])[_0x3a92c0(0x1ff)](_0x284fee=>{const _0x1cda60=_0x3a92c0;this[_0x1cda60(0x18a)][_0x1cda60(0x1dc)](_0x284fee);}),_0x5e10a9;}[_0x14ef60(0x1b0)](_0x58caa0){const _0xe572da=_0x14ef60;return{'id':_0x58caa0['id'],'threadId':_0x58caa0[_0xe572da(0x1ef)],'ref':_0x58caa0[_0xe572da(0x1f1)]};}};_0x1c2270=_0x57837b([_0xdf1a53(0x0,_0x20d5f0['Inject'](_0x20277a[_0x14ef60(0x1fb)])),_0xdf1a53(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b2)])),_0xdf1a53(0x2,_0x20d5f0[_0x14ef60(0x185)](_0x504b97['CollaborationSessionService']))],_0x1c2270);var _0x37b86e=Object[_0x14ef60(0x1ea)],_0x2607f7=(_0x3d7bd0,_0x4d1fde,_0x1fb7a4,_0x5cc5e2)=>{const _0x2d5dea=_0x14ef60;for(var _0x44059d=_0x5cc5e2>0x1?void 0x0:_0x5cc5e2?_0x37b86e(_0x4d1fde,_0x1fb7a4):_0x4d1fde,_0x11d0e8=_0x3d7bd0[_0x2d5dea(0x1cb)]-0x1,_0x476ccd;_0x11d0e8>=0x0;_0x11d0e8--)(_0x476ccd=_0x3d7bd0[_0x11d0e8])&&(_0x44059d=_0x476ccd(_0x44059d)||_0x44059d);return _0x44059d;},_0x2b9720=(_0x424f39,_0x5cedb9)=>(_0x198c30,_0x17fc00)=>_0x5cedb9(_0x198c30,_0x17fc00,_0x424f39);let _0x3f708a=class extends _0x20d5f0[_0x14ef60(0x1f0)]{constructor(_0x343b7b,_0x2e581d){const _0x3894fd=_0x14ef60;super(),this[_0x3894fd(0x1f8)]=_0x343b7b,this[_0x3894fd(0x1e0)]=_0x2e581d,this[_0x3894fd(0x1c6)]();}['_initDataSource'](){const _0x161ddb=_0x14ef60;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x161ddb(0x1f8)][_0x161ddb(0x1a1)]=!0x1;}};_0x3f708a=_0x2607f7([_0x2b9720(0x0,_0x4f9e71['IThreadCommentDataSourceService']),_0x2b9720(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x1c2270))],_0x3f708a);var _0x1e0353=Object[_0x14ef60(0x194)],_0x1bdad6=Object['getOwnPropertyDescriptor'],_0x38c663=(_0x382086,_0x92551d,_0x2776fe)=>_0x92551d in _0x382086?_0x1e0353(_0x382086,_0x92551d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2776fe}):_0x382086[_0x92551d]=_0x2776fe,_0x123923=(_0x4fd3d5,_0x2d3419,_0x1b9ac2,_0x52565f)=>{const _0x4b2c95=_0x14ef60;for(var _0x1d9973=_0x52565f>0x1?void 0x0:_0x52565f?_0x1bdad6(_0x2d3419,_0x1b9ac2):_0x2d3419,_0x2fe876=_0x4fd3d5[_0x4b2c95(0x1cb)]-0x1,_0x3fe16e;_0x2fe876>=0x0;_0x2fe876--)(_0x3fe16e=_0x4fd3d5[_0x2fe876])&&(_0x1d9973=_0x3fe16e(_0x1d9973)||_0x1d9973);return _0x1d9973;},_0x32ff6e=(_0x452a8b,_0x778e76)=>(_0x20e0aa,_0x5a638a)=>_0x778e76(_0x20e0aa,_0x5a638a,_0x452a8b),_0x35e4b7=(_0x205621,_0x49ee7b,_0x97dac5)=>_0x38c663(_0x205621,typeof _0x49ee7b!=_0x14ef60(0x1c4)?_0x49ee7b+'':_0x49ee7b,_0x97dac5);_0x535030[_0x14ef60(0x1d1)]=class extends _0x20d5f0[_0x14ef60(0x1f5)]{constructor(_0x3cfbfc=_0xd9a410,_0x1f125a,_0x12feac){const _0x1ac444=_0x14ef60;super(),this[_0x1ac444(0x1f6)]=_0x3cfbfc,this[_0x1ac444(0x1d9)]=_0x1f125a,this[_0x1ac444(0x18d)]=_0x12feac;const {..._0x2ae3ed}=_0x20d5f0[_0x1ac444(0x1fd)]({},_0xd9a410,this['_config']);this[_0x1ac444(0x18d)][_0x1ac444(0x1e3)](_0xb8d4e6,_0x2ae3ed);}[_0x14ef60(0x1f7)](){const _0x57ea92=_0x14ef60;[[_0x1c2270],[_0x3f708a],[_0x45c70f]][_0x57ea92(0x1ff)](_0x4219cf=>{const _0x4f756b=_0x57ea92;this[_0x4f756b(0x1d9)][_0x4f756b(0x1d2)](_0x4219cf);});}[_0x14ef60(0x18e)](){const _0x205d8b=_0x14ef60;this[_0x205d8b(0x1d9)][_0x205d8b(0x1e6)](_0x3f708a),this[_0x205d8b(0x1d9)][_0x205d8b(0x1e6)](_0x45c70f);}},_0x35e4b7(_0x535030['UniverThreadCommentDataSourcePlugin'],_0x14ef60(0x1fa),_0x3e569),_0x35e4b7(_0x535030[_0x14ef60(0x1d1)],_0x14ef60(0x1dd),_0x20d5f0[_0x14ef60(0x17f)][_0x14ef60(0x198)]),_0x535030['UniverThreadCommentDataSourcePlugin']=_0x123923([_0x20d5f0['DependentOn'](_0x4da799[_0x14ef60(0x1ed)],_0x504b97[_0x14ef60(0x1ce)],_0x51a395[_0x14ef60(0x1a6)]),_0x32ff6e(0x1,_0x20d5f0[_0x14ef60(0x185)](_0x20d5f0[_0x14ef60(0x1b1)])),_0x32ff6e(0x2,_0x20d5f0[_0x14ef60(0x1b4)])],_0x535030[_0x14ef60(0x1d1)]),Object[_0x14ef60(0x194)](_0x535030,Symbol[_0x14ef60(0x196)],{'value':'Module'});}));function _0x2a56(_0x3d97ff,_0x101063){const _0x3f33df=_0x3f33();return _0x2a56=function(_0x2a5600,_0x212b50){_0x2a5600=_0x2a5600-0x17c;let _0x1edeb0=_0x3f33df[_0x2a5600];return _0x1edeb0;},_0x2a56(_0x3d97ff,_0x101063);}function _0x3f33(){const _0x392c89=['/add','forEach','_sessionService','@univerjs/network','stringify','getComment','rangeId','2459433gpupJK','UniverInstanceType','rangeType','unitId','11BoFAcc','size','subscribe','Inject','UNRECOGNIZED','object','4524270aoXvpF','241550dxmafn','_userService','/delete','Solve','_configService','onReady','_httpService','@univerjs-pro/collaboration-client','/reply','values','CustomRangeType','defineProperty','getCurrentUser','toStringTag','listComments','UNIVER_UNKNOWN','format','solved','getUser','Reply','@univerjs/core','createTimestamp','OpenOrReOpen','Unknown','syncUpdateMutationToColla','2HoERio','map','UniverNetwork','resolved','UniverLicensePlugin','deleteComment','resolveComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','529422tqVsAm','802238uQbZEX','updateComment','Add','addComment','/solved','saveCommentToSnapshot','Injector','UserManagerService','CommentService','IConfigService','YYYY/MM/DD\x20HH:mm','code','body','comment','UniverThreadCommentUi','rxjs','UniverThreadComment','exports','post','_threadCommentModel','Edit','/list','Solved','replyId','@univerjs/thread-comment','symbol','disposeWithMe','_initDataSource','9272504PMaINo','28VBXvEb','COMMENT','requireSession','length','/universer-api/comment/unit/','9FEGuPY','UniverCollaborationClientPlugin','getUnit','parse','UniverThreadCommentDataSourcePlugin','add','Delete','UniverProLicense','root','replies','bufferTime','filter','_injector','_initUserSync','UniverCore','addUser','type','77zfuByI','commentUpdate$','_threadCommentDataSource','thread-comment-data-source.config','getMemberID','setConfig','userID','userId','get','23751708dhRdsE','/universer-api/user/list','parentId','getOwnPropertyDescriptor','@univerjs/thread-comment-ui','error','UniverThreadCommentUIPlugin','_commentService','threadId','Disposable','ref','@univerjs-pro/license','dayjs','users','Plugin','_config','onStarting','_threadCommentDataSourceService','_init','pluginName','HTTPService','delete','merge'];_0x3f33=function(){return _0x392c89;};return _0x3f33();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.11.0",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.0",
|
|
49
|
+
"@univerjs-pro/license": "0.12.0",
|
|
50
|
+
"@univerjs/core": "0.12.0",
|
|
52
51
|
"@univerjs/protocol": "0.1.47",
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment
|
|
52
|
+
"@univerjs/network": "0.12.0",
|
|
53
|
+
"@univerjs/thread-comment": "0.12.0",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.12.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"vite": "^7.
|
|
59
|
+
"vite": "^7.2.2",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.
|
|
61
|
+
"@univerjs-infra/shared": "0.12.0"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|