@univerjs-pro/thread-comment-datasource 0.10.8-nightly.202509200616 → 0.10.9
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 +8 -8
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x34955c=_0x59b8;(function(_0x439ad5,_0x2e32fc){const _0x5b2852=_0x59b8,_0x47ecc2=_0x439ad5();while(!![]){try{const _0x2fdd4a=parseInt(_0x5b2852(0xb7))/0x1+parseInt(_0x5b2852(0x99))/0x2*(parseInt(_0x5b2852(0xb9))/0x3)+parseInt(_0x5b2852(0xe1))/0x4+parseInt(_0x5b2852(0xda))/0x5+-parseInt(_0x5b2852(0x103))/0x6*(-parseInt(_0x5b2852(0xd2))/0x7)+-parseInt(_0x5b2852(0xd0))/0x8*(-parseInt(_0x5b2852(0xcf))/0x9)+-parseInt(_0x5b2852(0xcd))/0xa*(parseInt(_0x5b2852(0xc8))/0xb);if(_0x2fdd4a===_0x2e32fc)break;else _0x47ecc2['push'](_0x47ecc2['shift']());}catch(_0x2564e6){_0x47ecc2['push'](_0x47ecc2['shift']());}}}(_0x4a8a,0x57fa1));Object['defineProperty'](exports,Symbol[_0x34955c(0x10c)],{'value':_0x34955c(0xa9)});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='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x35558d=>(_0x35558d[_0x35558d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x35558d[_0x35558d[_0x34955c(0xd5)]=0x1]='Solved',_0x35558d[_0x35558d[_0x34955c(0xce)]=-0x1]='UNRECOGNIZED',_0x35558d))(I||{}),v=(_0x36e5d4=>(_0x36e5d4[_0x36e5d4['Unknown']=0x0]=_0x34955c(0x9d),_0x36e5d4[_0x36e5d4[_0x34955c(0xbb)]=0x1]=_0x34955c(0xbb),_0x36e5d4[_0x36e5d4[_0x34955c(0xe8)]=0x2]=_0x34955c(0xe8),_0x36e5d4[_0x36e5d4['Edit']=0x3]=_0x34955c(0xfd),_0x36e5d4[_0x36e5d4[_0x34955c(0xf4)]=0x4]='Delete',_0x36e5d4[_0x36e5d4[_0x34955c(0xc4)]=0x5]=_0x34955c(0xc4),_0x36e5d4[_0x36e5d4[_0x34955c(0xce)]=-0x1]=_0x34955c(0xce),_0x36e5d4))(v||{});function _0x4a8a(){const _0x3d4d64=['Unknown','/add','values','CommentService','UniverLicensePlugin','rangeType','bufferTime','/reply','syncUpdateMutationToColla','getOwnPropertyDescriptor','personId','Inject','Module','pipe','deleteComment','add','_init','user','CollaborationSessionService','ref','getMemberID','replyId','resolveComment','CustomRangeType','UniverCollaborationClientPlugin','map','434698zfAykw','UniverThreadCommentUIPlugin','34377uJsfjM','UniverThreadCommentDataSourcePlugin','Add','body','customRanges','get','resolved','format','Plugin','delete','parentId','Solve','disposeWithMe','unitId','users','17430083tVjSwq','_userService','DependentOn','setConfig','error','10QcXhvT','UNRECOGNIZED','5931018YqZiOu','8ZLGWZK','_injector','6461wlAuRt','commentUpdate$','thread-comment-data-source.config','Solved','code','payload','getUnit','_initDataSource','1962125DnvkhC','_threadCommentDataSourceService','slice','dayjs','/delete','root','UNIVER_UNKNOWN','988752yUJJbA','content','OpenOrReOpen','length','createTimestamp','userId','_commentService','Reply','UserManagerService','onStarting','addUser','_httpService','filter','dataSource','/universer-api/comment/unit/','/edit','replies','_config','_configService','Delete','_sessionService','COMMENT','/universer-api/user/list','Injector','IThreadCommentDataSourceService','updateComment','rangeId','defineProperty','Edit','requireSession','post','comments','userID','_threadCommentModel','1152Gkzdjh','comment','listComments','YYYY/MM/DD\x20HH:mm','parse','Disposable','forEach','threadId','type','toStringTag','getComment','pluginName','solved','stringify','_threadCommentDataSource','6NMhEOt','HTTPService','reply','find'];_0x4a8a=function(){return _0x3d4d64;};return _0x4a8a();}const f=_0x2d483b=>c[_0x34955c(0xdd)](new Date(+_0x2d483b))[_0x34955c(0xc0)](_0x34955c(0x106)),R=async(_0x44f549,_0x5eaf13)=>{const _0x211005=_0x34955c,_0x160f17=_0x44f549[_0x211005(0xbe)](c[_0x211005(0xe9)]),_0x16668c=_0x44f549[_0x211005(0xbe)](P[_0x211005(0x9a)]);_0x5eaf13['forEach'](_0x9d2040=>{const _0x1bb689=_0x211005;_0x160f17['getUser'](_0x9d2040)&&_0x5eaf13[_0x1bb689(0xc2)](_0x9d2040);}),_0x5eaf13['size']&&(await _0x16668c[_0x211005(0xbe)](_0x211005(0xf7),{'params':{'userIDs':[..._0x5eaf13]}}))[_0x211005(0xbc)][_0x211005(0xc7)]['forEach'](_0xdce4f4=>{const _0x22c61b=_0x211005;_0xdce4f4&&_0x160f17[_0x22c61b(0xeb)](_0xdce4f4);});};var $=Object[_0x34955c(0xa6)],E=(_0x3697eb,_0x13d7c5,_0x3c4df2,_0x48caa8)=>{const _0x2e6e8e=_0x34955c;for(var _0x92a2c=_0x48caa8>0x1?void 0x0:_0x48caa8?$(_0x13d7c5,_0x3c4df2):_0x13d7c5,_0x18d92f=_0x3697eb[_0x2e6e8e(0xe4)]-0x1,_0x1d0207;_0x18d92f>=0x0;_0x18d92f--)(_0x1d0207=_0x3697eb[_0x18d92f])&&(_0x92a2c=_0x1d0207(_0x92a2c)||_0x92a2c);return _0x92a2c;},S=(_0x46c42,_0x28cdfe)=>(_0x38ff73,_0xb0c7bb)=>_0x28cdfe(_0x38ff73,_0xb0c7bb,_0x46c42);let _=class extends c[_0x34955c(0x108)]{constructor(_0x45fdc7,_0x4ae8dc,_0x1b5daa,_0x3d7811){const _0x1d7420=_0x34955c;super(),this[_0x1d7420(0xe7)]=_0x45fdc7,this[_0x1d7420(0x102)]=_0x4ae8dc,this[_0x1d7420(0xc9)]=_0x1b5daa,this[_0x1d7420(0xd1)]=_0x3d7811,this[_0x1d7420(0xad)](),this['_initUserSync']();}['_initUserSync'](){const _0x5778ad=_0x34955c;this[_0x5778ad(0xc5)](this[_0x5778ad(0x102)][_0x5778ad(0xd3)][_0x5778ad(0xaa)](j[_0x5778ad(0xa3)](0x10))['subscribe'](_0x507187=>{const _0x125c72=_0x5778ad,_0x2bfa4d=new Set();_0x507187[_0x125c72(0x109)](_0x21a6b1=>{const _0x3cd0c8=_0x125c72;switch(_0x21a6b1['type']){case _0x3cd0c8(0xac):{const _0x4aea26=_0x21a6b1[_0x3cd0c8(0xd7)][_0x3cd0c8(0xa7)];_0x2bfa4d[_0x3cd0c8(0xac)](_0x4aea26);break;}}}),R(this[_0x125c72(0xd1)],_0x2bfa4d);}));}['_init'](){const _0x2e38b0=_0x34955c;this['disposeWithMe'](this['_commentService'][_0x2e38b0(0xd3)]['subscribe'](async _0x122217=>{const _0x349898=_0x2e38b0;var _0x4739df,_0x42dbe4,_0xa6bbd3,_0x3f32ae;const _0x343bf7=(_0x4739df=this[_0x349898(0x102)][_0x349898(0xd8)](_0x122217[_0x349898(0xc6)])[_0x349898(0x9c)](_0x4388c2=>_0x4388c2['threadId']===_0x122217[_0x349898(0x10a)]))==null?void 0x0:_0x4739df[_0x349898(0xdf)];if(!_0x343bf7)return;const {unitId:_0x4c59c0,subUnitId:_0x250b4d}=_0x343bf7;switch(_0x122217[_0x349898(0xae)]&&this['_userService'][_0x349898(0xeb)](_0x122217[_0x349898(0xae)]),_0x122217[_0x349898(0x10b)]){case v[_0x349898(0xbb)]:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x4c59c0,_0x250b4d,{'unitId':_0x4c59c0,'subUnitId':_0x250b4d,'ref':'','id':_0x122217[_0x349898(0xb2)],'dT':f(+_0x122217[_0x349898(0xe5)]),'threadId':_0x122217[_0x349898(0x10a)],'personId':(_0xa6bbd3=(_0x42dbe4=_0x122217[_0x349898(0xae)])==null?void 0x0:_0x42dbe4[_0x349898(0x101)])!=null?_0xa6bbd3:_0x122217[_0x349898(0xe6)],'text':JSON['parse'](_0x122217['content']),'parentId':_0x343bf7['id']});break;}case v[_0x349898(0xf4)]:{const _0x1e2d48=this[_0x349898(0x102)][_0x349898(0x10d)](_0x4c59c0,_0x250b4d,_0x122217['replyId']);_0x1e2d48&&_0x1e2d48[_0x349898(0xc3)]&&this['_threadCommentModel']['deleteComment'](_0x4c59c0,_0x250b4d,_0x122217[_0x349898(0xb2)]);break;}case v[_0x349898(0xfd)]:{this[_0x349898(0x102)][_0x349898(0xfa)](_0x4c59c0,_0x250b4d,{'commentId':_0x122217[_0x349898(0xb2)],'text':JSON['parse'](_0x122217[_0x349898(0xe2)])});break;}case v[_0x349898(0xc4)]:{const _0xb2e67e=(_0x3f32ae=this[_0x349898(0x102)]['getUnit'](_0x122217['unitId'])[_0x349898(0x9c)](_0x2ad74c=>_0x2ad74c[_0x349898(0x10a)]===_0x122217['threadId']))==null?void 0x0:_0x3f32ae['root'];_0xb2e67e&&this[_0x349898(0x102)][_0x349898(0xb3)](_0x4c59c0,_0x250b4d,_0xb2e67e['id'],_0x122217[_0x349898(0x10f)]===I[_0x349898(0xd5)]);break;}}}));}};_=E([S(0x0,c[_0x34955c(0xa8)](b[_0x34955c(0xa0)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x34955c(0xa8)](c[_0x34955c(0xe9)])),S(0x3,c[_0x34955c(0xa8)](c[_0x34955c(0xf8)]))],_);const q=_0x34955c(0xd4),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4e65aa,_0x2d4a4f,_0x4ed690,_0x457eba)=>{const _0x1a5187=_0x34955c;for(var _0x4d576c=_0x457eba>0x1?void 0x0:_0x457eba?A(_0x2d4a4f,_0x4ed690):_0x2d4a4f,_0x2fafe8=_0x4e65aa[_0x1a5187(0xe4)]-0x1,_0x10644a;_0x2fafe8>=0x0;_0x2fafe8--)(_0x10644a=_0x4e65aa[_0x2fafe8])&&(_0x4d576c=_0x10644a(_0x4d576c)||_0x4d576c);return _0x4d576c;},C=(_0x1e5473,_0x20bede)=>(_0x498c4e,_0x2accd9)=>_0x20bede(_0x498c4e,_0x2accd9,_0x1e5473);function Y(_0x30905c,_0x3ece0a){const _0x1ab475=_0x34955c,_0x599cb4=_0x30905c['replies'][0x0];return{..._0x3ece0a,'id':_0x599cb4[_0x1ab475(0xb2)],'resolved':_0x30905c['solved']===0x1,'dT':f(_0x599cb4[_0x1ab475(0xe5)]),'personId':_0x599cb4[_0x1ab475(0xe6)],'threadId':_0x599cb4[_0x1ab475(0x10a)]};}function G(_0x233fc5,_0x123d09,_0x20e959){const _0x58df46=_0x34955c;var _0x6136fd,_0x5f5507;if(((_0x5f5507=(_0x6136fd=_0x233fc5==null?void 0x0:_0x233fc5['replies'])==null?void 0x0:_0x6136fd[_0x58df46(0xe4)])!=null?_0x5f5507:0x0)>0x0){const _0x231536=(_0x42f253,_0x58ebfc)=>({'id':_0x42f253['replyId'],'threadId':_0x42f253[_0x58df46(0x10a)],'dT':f(_0x42f253['createTimestamp']),'personId':_0x42f253[_0x58df46(0xe6)],'resolved':_0x233fc5[_0x58df46(0x10f)]===I[_0x58df46(0xd5)],'unitId':_0x123d09,'subUnitId':_0x20e959,'text':JSON[_0x58df46(0x107)](_0x42f253[_0x58df46(0xe2)]),'parentId':_0x58ebfc}),_0x54c080=_0x231536(_0x233fc5[_0x58df46(0xf1)][0x0]);return{..._0x54c080,'children':_0x233fc5[_0x58df46(0xf1)][_0x58df46(0xdc)](0x1)[_0x58df46(0xb6)](_0x1631e1=>_0x231536(_0x1631e1,_0x54c080['id']))};}return null;}let p=class{constructor(_0x19f52b,_0x174884,_0x4d8e89){const _0x2a6820=_0x34955c;this[_0x2a6820(0xec)]=_0x19f52b,this['_userService']=_0x174884,this[_0x2a6820(0xf5)]=_0x4d8e89;}async['addComment'](_0x3bcac6){const _0x36fa67=_0x34955c;var _0x37a8b8,_0x4e48aa;const {parentId:_0x11b28c,unitId:_0x456710,text:_0x29ae6a,threadId:_0xc49340}=_0x3bcac6,_0x2d597e=(_0x4e48aa=(_0x37a8b8=_0x29ae6a[_0x36fa67(0xbd)])==null?void 0x0:_0x37a8b8[_0x36fa67(0xed)](_0x47ebb1=>_0x47ebb1[_0x36fa67(0xa2)]===c[_0x36fa67(0xb4)][_0x36fa67(0xf6)])[_0x36fa67(0xb6)](_0x209b52=>_0x209b52[_0x36fa67(0xfb)]))!=null?_0x4e48aa:[],_0x327125=JSON[_0x36fa67(0x110)](_0x29ae6a),_0x2cedb3=(await this['_sessionService'][_0x36fa67(0xfe)](_0x456710))[_0x36fa67(0xb1)]();if(_0x11b28c){const _0x49fc04={'memberId':_0x2cedb3,'unitId':_0x456710,'content':_0x327125,'mention':_0x2d597e,'threadId':_0xc49340},_0x468717=(await this[_0x36fa67(0xec)][_0x36fa67(0xff)](_0x36fa67(0xef)+_0x456710+_0x36fa67(0xa4),{'body':_0x49fc04}))[_0x36fa67(0xbc)][_0x36fa67(0x9b)];return{..._0x3bcac6,'id':_0x468717[_0x36fa67(0xb2)],'dT':c[_0x36fa67(0xdd)](+_0x468717['createTimestamp'])[_0x36fa67(0xc0)](_0x36fa67(0x106)),'personId':_0x468717['userId']};}else{const _0x3d3c84={'memberId':_0x2cedb3,'unitId':_0x456710,'content':_0x327125,'mention':_0x2d597e},_0x37c864=await this[_0x36fa67(0xec)]['post'](_0x36fa67(0xef)+_0x456710+_0x36fa67(0x9e),{'body':_0x3d3c84});return Y(_0x37c864[_0x36fa67(0xbc)][_0x36fa67(0x104)],_0x3bcac6);}}async[_0x34955c(0xfa)](_0x444b2c){const _0x4ccd0c=_0x34955c;var _0x44e63a,_0xe14e3e;const {text:_0x3d330c,unitId:_0x3b7204}=_0x444b2c,_0x4c424a=(_0xe14e3e=(_0x44e63a=_0x3d330c['customRanges'])==null?void 0x0:_0x44e63a[_0x4ccd0c(0xed)](_0x3c387f=>_0x3c387f[_0x4ccd0c(0xa2)]===c['CustomRangeType']['COMMENT'])[_0x4ccd0c(0xb6)](_0x1e419c=>_0x1e419c[_0x4ccd0c(0xfb)]))!=null?_0xe14e3e:[],_0x529028=JSON[_0x4ccd0c(0x110)](_0x3d330c),_0x2343b3=_0x444b2c['threadId'],_0x14f672=_0x444b2c['id'],_0x34b514={'memberId':(await this[_0x4ccd0c(0xf5)]['requireSession'](_0x3b7204))['getMemberID'](),'unitId':_0x3b7204,'threadId':_0x2343b3,'mention':_0x4c424a,'content':_0x529028,'replyId':_0x14f672},_0xeefd80=await this[_0x4ccd0c(0xec)][_0x4ccd0c(0xff)]('/universer-api/comment/unit/'+_0x3b7204+_0x4ccd0c(0xf0),{'body':_0x34b514});return!_0xeefd80['body'][_0x4ccd0c(0xcc)]||_0xeefd80[_0x4ccd0c(0xbc)][_0x4ccd0c(0xcc)][_0x4ccd0c(0xd6)]===0x1;}async['resolveComment'](_0x3c1b20){const _0x5ef8d8=_0x34955c,{unitId:_0x39b889}=_0x3c1b20,_0x3ad79b=_0x3c1b20['threadId'],_0x3cb8e9={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x39b889,'threadId':_0x3ad79b,'solved':_0x3c1b20[_0x5ef8d8(0xbf)]?I[_0x5ef8d8(0xd5)]:I[_0x5ef8d8(0xe3)]},_0x5d6c72=await this['_httpService'][_0x5ef8d8(0xff)](_0x5ef8d8(0xef)+_0x39b889+'/solved',{'body':_0x3cb8e9});return!_0x5d6c72['body'][_0x5ef8d8(0xcc)]||_0x5d6c72[_0x5ef8d8(0xbc)][_0x5ef8d8(0xcc)]['code']===0x1;}async[_0x34955c(0xab)](_0xea968c,_0xacac14,_0x5bac48,_0x632bce){const _0x30987c=_0x34955c,_0x5a6dd4={'memberId':(await this['_sessionService'][_0x30987c(0xfe)](_0xea968c))['getMemberID'](),'threadId':_0x5bac48,'replyId':_0x632bce,'unitId':_0xea968c},_0x3bfa13=await this[_0x30987c(0xec)][_0x30987c(0xff)](_0x30987c(0xef)+_0xea968c+_0x30987c(0xde),{'body':_0x5a6dd4});return!_0x3bfa13[_0x30987c(0xbc)][_0x30987c(0xcc)]||_0x3bfa13[_0x30987c(0xbc)][_0x30987c(0xcc)][_0x30987c(0xd6)]===0x1;}async[_0x34955c(0x105)](_0x12a35b,_0x4e3f2c,_0x104850){const _0x26d406=_0x34955c,_0x4af286={'unitId':_0x12a35b,'threadId':_0x104850},_0x484d6b=await this['_httpService'][_0x26d406(0xff)](_0x26d406(0xef)+_0x12a35b+'/list',{'body':_0x4af286}),_0x2ecc4c=_0x104850[_0x26d406(0xb6)](_0x41cbbd=>G(_0x484d6b[_0x26d406(0xbc)][_0x26d406(0x100)][_0x41cbbd],_0x12a35b,_0x4e3f2c))[_0x26d406(0xed)](Boolean);return Object[_0x26d406(0x9f)](_0x484d6b[_0x26d406(0xbc)][_0x26d406(0xc7)])[_0x26d406(0x109)](_0x159134=>{const _0x139c79=_0x26d406;this[_0x139c79(0xc9)][_0x139c79(0xeb)](_0x159134);}),_0x2ecc4c;}['saveCommentToSnapshot'](_0x299db2){const _0x5d1b1d=_0x34955c;return{'id':_0x299db2['id'],'threadId':_0x299db2[_0x5d1b1d(0x10a)],'ref':_0x299db2[_0x5d1b1d(0xb0)]};}};p=x([C(0x0,c[_0x34955c(0xa8)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x34955c(0xa8)](b[_0x34955c(0xaf)]))],p);var H=Object[_0x34955c(0xa6)],J=(_0x3771b9,_0xf2e13e,_0x1844ca,_0x36c7c6)=>{const _0x1ef16c=_0x34955c;for(var _0x3771a0=_0x36c7c6>0x1?void 0x0:_0x36c7c6?H(_0xf2e13e,_0x1844ca):_0xf2e13e,_0x529443=_0x3771b9[_0x1ef16c(0xe4)]-0x1,_0x1f81ca;_0x529443>=0x0;_0x529443--)(_0x1f81ca=_0x3771b9[_0x529443])&&(_0x3771a0=_0x1f81ca(_0x3771a0)||_0x3771a0);return _0x3771a0;},y=(_0x5fbd76,_0x12bc9c)=>(_0x3e0c28,_0xbe02bc)=>_0x12bc9c(_0x3e0c28,_0xbe02bc,_0x5fbd76);let g=class extends c[_0x34955c(0x108)]{constructor(_0x484f28,_0x393e99){const _0x278b39=_0x34955c;super(),this[_0x278b39(0xdb)]=_0x484f28,this[_0x278b39(0x111)]=_0x393e99,this[_0x278b39(0xd9)]();}[_0x34955c(0xd9)](){const _0x28fa5b=_0x34955c;this['_threadCommentDataSourceService'][_0x28fa5b(0xee)]=this[_0x28fa5b(0x111)],this[_0x28fa5b(0xdb)][_0x28fa5b(0xa5)]=!0x1;}};g=J([y(0x0,M[_0x34955c(0xf9)]),y(0x1,c[_0x34955c(0xa8)](p))],g);function _0x59b8(_0x14d67d,_0x443846){const _0x4a8adc=_0x4a8a();return _0x59b8=function(_0x59b89a,_0x38f162){_0x59b89a=_0x59b89a-0x99;let _0x3950c3=_0x4a8adc[_0x59b89a];return _0x3950c3;},_0x59b8(_0x14d67d,_0x443846);}var F=Object[_0x34955c(0xfc)],L=Object[_0x34955c(0xa6)],Z=(_0x5e2480,_0x5d35e2,_0x400703)=>_0x5d35e2 in _0x5e2480?F(_0x5e2480,_0x5d35e2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x400703}):_0x5e2480[_0x5d35e2]=_0x400703,W=(_0x2c713b,_0x17643e,_0x357325,_0x11c724)=>{const _0x3f57f5=_0x34955c;for(var _0x17cd15=_0x11c724>0x1?void 0x0:_0x11c724?L(_0x17643e,_0x357325):_0x17643e,_0x14a68f=_0x2c713b[_0x3f57f5(0xe4)]-0x1,_0x28e038;_0x14a68f>=0x0;_0x14a68f--)(_0x28e038=_0x2c713b[_0x14a68f])&&(_0x17cd15=_0x28e038(_0x17cd15)||_0x17cd15);return _0x17cd15;},O=(_0x3acd0f,_0x7d9f44)=>(_0x52e922,_0x34332a)=>_0x7d9f44(_0x52e922,_0x34332a,_0x3acd0f),N=(_0x3e9b4c,_0x1d0bbb,_0x29bc16)=>Z(_0x3e9b4c,typeof _0x1d0bbb!='symbol'?_0x1d0bbb+'':_0x1d0bbb,_0x29bc16);exports[_0x34955c(0xba)]=class extends c[_0x34955c(0xc1)]{constructor(_0x545a86=D,_0x5ca42f,_0x48e880){const _0x41b017=_0x34955c;super(),this[_0x41b017(0xf2)]=_0x545a86,this['_injector']=_0x5ca42f,this['_configService']=_0x48e880;const {..._0x185e97}=c['merge']({},D,this[_0x41b017(0xf2)]);this[_0x41b017(0xf3)][_0x41b017(0xcb)](q,_0x185e97);}[_0x34955c(0xea)](){const _0x54917d=_0x34955c;[[p],[g],[_]][_0x54917d(0x109)](_0x3184b8=>{const _0x398803=_0x54917d;this['_injector'][_0x398803(0xac)](_0x3184b8);});}['onReady'](){const _0x31981e=_0x34955c;this[_0x31981e(0xd1)][_0x31981e(0xbe)](g),this[_0x31981e(0xd1)][_0x31981e(0xbe)](_);}},N(exports[_0x34955c(0xba)],_0x34955c(0x10e),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x34955c(0x10b),c['UniverInstanceType'][_0x34955c(0xe0)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x34955c(0xca)](w[_0x34955c(0xb8)],b[_0x34955c(0xb5)],T[_0x34955c(0xa1)]),O(0x1,c[_0x34955c(0xa8)](c['Injector'])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
|
1
|
+
'use strict';const _0x140c39=_0xf7fc;(function(_0x3f5e82,_0x328a6a){const _0x5c2b7d=_0xf7fc,_0x3d0db2=_0x3f5e82();while(!![]){try{const _0x57b67f=-parseInt(_0x5c2b7d(0x118))/0x1+parseInt(_0x5c2b7d(0xbd))/0x2*(parseInt(_0x5c2b7d(0xf7))/0x3)+-parseInt(_0x5c2b7d(0xfe))/0x4+parseInt(_0x5c2b7d(0xea))/0x5*(-parseInt(_0x5c2b7d(0x116))/0x6)+parseInt(_0x5c2b7d(0xd1))/0x7*(-parseInt(_0x5c2b7d(0xdd))/0x8)+-parseInt(_0x5c2b7d(0x120))/0x9+parseInt(_0x5c2b7d(0xfa))/0xa;if(_0x57b67f===_0x328a6a)break;else _0x3d0db2['push'](_0x3d0db2['shift']());}catch(_0x49e62d){_0x3d0db2['push'](_0x3d0db2['shift']());}}}(_0x4184,0x384f9));Object[_0x140c39(0x132)](exports,Symbol[_0x140c39(0xe1)],{'value':'Module'});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=_0x140c39(0xc8);var I=(_0x440229=>(_0x440229[_0x440229[_0x140c39(0x102)]=0x0]=_0x140c39(0x102),_0x440229[_0x440229[_0x140c39(0xe6)]=0x1]=_0x140c39(0xe6),_0x440229[_0x440229[_0x140c39(0x126)]=-0x1]=_0x140c39(0x126),_0x440229))(I||{}),v=(_0x67d963=>(_0x67d963[_0x67d963[_0x140c39(0xb9)]=0x0]='Unknown',_0x67d963[_0x67d963[_0x140c39(0x127)]=0x1]=_0x140c39(0x127),_0x67d963[_0x67d963[_0x140c39(0x12f)]=0x2]=_0x140c39(0x12f),_0x67d963[_0x67d963[_0x140c39(0xec)]=0x3]=_0x140c39(0xec),_0x67d963[_0x67d963[_0x140c39(0x105)]=0x4]='Delete',_0x67d963[_0x67d963[_0x140c39(0xfc)]=0x5]=_0x140c39(0xfc),_0x67d963[_0x67d963['UNRECOGNIZED']=-0x1]=_0x140c39(0x126),_0x67d963))(v||{});const f=_0x21e944=>c[_0x140c39(0xee)](new Date(+_0x21e944))[_0x140c39(0x108)](_0x140c39(0x111)),R=async(_0x3a18e0,_0x2b8b56)=>{const _0x48f85b=_0x140c39,_0x522508=_0x3a18e0[_0x48f85b(0xd3)](c[_0x48f85b(0xc1)]),_0x1fe19d=_0x3a18e0['get'](P[_0x48f85b(0x121)]);_0x2b8b56[_0x48f85b(0xc2)](_0x1daa51=>{const _0x479765=_0x48f85b;_0x522508[_0x479765(0xbe)](_0x1daa51)&&_0x2b8b56[_0x479765(0xbf)](_0x1daa51);}),_0x2b8b56[_0x48f85b(0xc3)]&&(await _0x1fe19d[_0x48f85b(0xd3)](_0x48f85b(0x107),{'params':{'userIDs':[..._0x2b8b56]}}))[_0x48f85b(0xce)][_0x48f85b(0x10f)][_0x48f85b(0xc2)](_0x11fe81=>{const _0x5a74f1=_0x48f85b;_0x11fe81&&_0x522508[_0x5a74f1(0xe3)](_0x11fe81);});};var $=Object[_0x140c39(0xb8)],E=(_0x5cdba8,_0x50f5dc,_0x10849a,_0x1ab291)=>{const _0x4865ed=_0x140c39;for(var _0x24485c=_0x1ab291>0x1?void 0x0:_0x1ab291?$(_0x50f5dc,_0x10849a):_0x50f5dc,_0x18f509=_0x5cdba8[_0x4865ed(0xf3)]-0x1,_0x24b02a;_0x18f509>=0x0;_0x18f509--)(_0x24b02a=_0x5cdba8[_0x18f509])&&(_0x24485c=_0x24b02a(_0x24485c)||_0x24485c);return _0x24485c;},S=(_0x49d0b0,_0x2ef362)=>(_0x248621,_0x4f575f)=>_0x2ef362(_0x248621,_0x4f575f,_0x49d0b0);let _=class extends c[_0x140c39(0xc0)]{constructor(_0x3bab75,_0x380808,_0x12a564,_0x5cd995){const _0x348af4=_0x140c39;super(),this[_0x348af4(0xf6)]=_0x3bab75,this[_0x348af4(0xfd)]=_0x380808,this[_0x348af4(0x113)]=_0x12a564,this[_0x348af4(0xf0)]=_0x5cd995,this[_0x348af4(0xf5)](),this[_0x348af4(0xfb)]();}[_0x140c39(0xfb)](){const _0x77c8b7=_0x140c39;this[_0x77c8b7(0xd7)](this[_0x77c8b7(0xfd)][_0x77c8b7(0x124)][_0x77c8b7(0xc9)](j[_0x77c8b7(0xbc)](0x10))[_0x77c8b7(0x119)](_0x3c3357=>{const _0x46b42c=_0x77c8b7,_0x38a6a2=new Set();_0x3c3357[_0x46b42c(0xc2)](_0x15b107=>{const _0x594bee=_0x46b42c;switch(_0x15b107[_0x594bee(0xde)]){case'add':{const _0x46d192=_0x15b107[_0x594bee(0x12d)][_0x594bee(0xb6)];_0x38a6a2['add'](_0x46d192);break;}}}),R(this['_injector'],_0x38a6a2);}));}[_0x140c39(0xf5)](){const _0x8d564=_0x140c39;this[_0x8d564(0xd7)](this[_0x8d564(0xf6)]['commentUpdate$'][_0x8d564(0x119)](async _0x304f6d=>{const _0x1a5ce9=_0x8d564;var _0x54a959,_0x57fe55,_0x1b59bf,_0x241fc4;const _0x3b76c0=(_0x54a959=this[_0x1a5ce9(0xfd)]['getUnit'](_0x304f6d['unitId'])[_0x1a5ce9(0xf4)](_0x30a16c=>_0x30a16c[_0x1a5ce9(0xcc)]===_0x304f6d[_0x1a5ce9(0xcc)]))==null?void 0x0:_0x54a959[_0x1a5ce9(0xdb)];if(!_0x3b76c0)return;const {unitId:_0x2d00b0,subUnitId:_0x3c369f}=_0x3b76c0;switch(_0x304f6d[_0x1a5ce9(0x114)]&&this[_0x1a5ce9(0x113)][_0x1a5ce9(0xe3)](_0x304f6d[_0x1a5ce9(0x114)]),_0x304f6d[_0x1a5ce9(0xde)]){case v['Add']:break;case v[_0x1a5ce9(0x12f)]:{this[_0x1a5ce9(0xfd)][_0x1a5ce9(0xda)](_0x2d00b0,_0x3c369f,{'unitId':_0x2d00b0,'subUnitId':_0x3c369f,'ref':'','id':_0x304f6d[_0x1a5ce9(0x104)],'dT':f(+_0x304f6d[_0x1a5ce9(0xd6)]),'threadId':_0x304f6d['threadId'],'personId':(_0x1b59bf=(_0x57fe55=_0x304f6d[_0x1a5ce9(0x114)])==null?void 0x0:_0x57fe55[_0x1a5ce9(0x10a)])!=null?_0x1b59bf:_0x304f6d[_0x1a5ce9(0xc5)],'text':JSON['parse'](_0x304f6d[_0x1a5ce9(0xdf)]),'parentId':_0x3b76c0['id']});break;}case v[_0x1a5ce9(0x105)]:{const _0x9a4fb2=this['_threadCommentModel'][_0x1a5ce9(0xc4)](_0x2d00b0,_0x3c369f,_0x304f6d[_0x1a5ce9(0x104)]);_0x9a4fb2&&_0x9a4fb2[_0x1a5ce9(0x130)]&&this[_0x1a5ce9(0xfd)][_0x1a5ce9(0xd8)](_0x2d00b0,_0x3c369f,_0x304f6d[_0x1a5ce9(0x104)]);break;}case v[_0x1a5ce9(0xec)]:{this[_0x1a5ce9(0xfd)]['updateComment'](_0x2d00b0,_0x3c369f,{'commentId':_0x304f6d[_0x1a5ce9(0x104)],'text':JSON['parse'](_0x304f6d['content'])});break;}case v[_0x1a5ce9(0xfc)]:{const _0x2dfa99=(_0x241fc4=this[_0x1a5ce9(0xfd)][_0x1a5ce9(0x131)](_0x304f6d[_0x1a5ce9(0xca)])[_0x1a5ce9(0xf4)](_0x33d788=>_0x33d788[_0x1a5ce9(0xcc)]===_0x304f6d[_0x1a5ce9(0xcc)]))==null?void 0x0:_0x241fc4[_0x1a5ce9(0xdb)];_0x2dfa99&&this[_0x1a5ce9(0xfd)]['resolveComment'](_0x2d00b0,_0x3c369f,_0x2dfa99['id'],_0x304f6d['solved']===I[_0x1a5ce9(0xe6)]);break;}}}));}};_=E([S(0x0,c[_0x140c39(0xc6)](b[_0x140c39(0xed)])),S(0x1,c[_0x140c39(0xc6)](M['ThreadCommentModel'])),S(0x2,c[_0x140c39(0xc6)](c[_0x140c39(0xc1)])),S(0x3,c['Inject'](c[_0x140c39(0x12a)]))],_);function _0xf7fc(_0x237b0f,_0x41765d){const _0x4184e0=_0x4184();return _0xf7fc=function(_0xf7fc48,_0x11ede7){_0xf7fc48=_0xf7fc48-0xb6;let _0xca7267=_0x4184e0[_0xf7fc48];return _0xca7267;},_0xf7fc(_0x237b0f,_0x41765d);}function _0x4184(){const _0x31788f=['rangeId','threadId','resolveComment','body','CollaborationSessionService','map','7QRpcmf','Plugin','get','resolved','parse','createTimestamp','disposeWithMe','deleteComment','symbol','addComment','root','rangeType','495416YPkbdT','type','content','syncUpdateMutationToColla','toStringTag','COMMENT','addUser','UNIVER_UNKNOWN','/universer-api/comment/unit/','Solved','_config','getMemberID','replies','1088065RbEPkJ','listComments','Edit','CommentService','dayjs','UniverThreadCommentUIPlugin','_injector','requireSession','_sessionService','length','find','_init','_commentService','3bTRQVW','/delete','/list','15048630wiqVUa','_initUserSync','Solve','_threadCommentModel','1763184BVNrLL','UniverCollaborationClientPlugin','/add','reply','OpenOrReOpen','dataSource','replyId','Delete','_configService','/universer-api/user/list','format','customRanges','userID','saveCommentToSnapshot','onReady','pluginName','/solved','users','updateComment','YYYY/MM/DD\x20HH:mm','UniverInstanceType','_userService','user','setConfig','12bFhWaI','/reply','78354uHSGCJ','subscribe','solved','stringify','UniverThreadCommentDataSourcePlugin','_initDataSource','code','_threadCommentDataSource','2875176XmzOsd','HTTPService','thread-comment-data-source.config','error','commentUpdate$','post','UNRECOGNIZED','Add','filter','_httpService','Injector','merge','add','payload','ref','Reply','parentId','getUnit','defineProperty','personId','onStarting','getOwnPropertyDescriptor','Unknown','IThreadCommentDataSourceService','_threadCommentDataSourceService','bufferTime','123106OwoGLn','getUser','delete','Disposable','UserManagerService','forEach','size','getComment','userId','Inject','CustomRangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','unitId'];_0x4184=function(){return _0x31788f;};return _0x4184();}const q=_0x140c39(0x122),D={};var A=Object[_0x140c39(0xb8)],x=(_0x3dfc1e,_0x1538f2,_0x373251,_0x16cbbd)=>{const _0xbbf0d7=_0x140c39;for(var _0x296a33=_0x16cbbd>0x1?void 0x0:_0x16cbbd?A(_0x1538f2,_0x373251):_0x1538f2,_0x16393e=_0x3dfc1e[_0xbbf0d7(0xf3)]-0x1,_0x25a754;_0x16393e>=0x0;_0x16393e--)(_0x25a754=_0x3dfc1e[_0x16393e])&&(_0x296a33=_0x25a754(_0x296a33)||_0x296a33);return _0x296a33;},C=(_0x4f46e2,_0xfff47d)=>(_0x2ec430,_0x56d297)=>_0xfff47d(_0x2ec430,_0x56d297,_0x4f46e2);function Y(_0x25c63b,_0x1509e1){const _0x2c4c4e=_0x140c39,_0x2a42e4=_0x25c63b['replies'][0x0];return{..._0x1509e1,'id':_0x2a42e4[_0x2c4c4e(0x104)],'resolved':_0x25c63b[_0x2c4c4e(0x11a)]===0x1,'dT':f(_0x2a42e4['createTimestamp']),'personId':_0x2a42e4[_0x2c4c4e(0xc5)],'threadId':_0x2a42e4[_0x2c4c4e(0xcc)]};}function G(_0x5bc565,_0x36be4e,_0x54de86){const _0x7aa4a=_0x140c39;var _0x1cbdb2,_0x1c9814;if(((_0x1c9814=(_0x1cbdb2=_0x5bc565==null?void 0x0:_0x5bc565[_0x7aa4a(0xe9)])==null?void 0x0:_0x1cbdb2['length'])!=null?_0x1c9814:0x0)>0x0){const _0x26edd4=(_0x27c898,_0x361bcc)=>({'id':_0x27c898['replyId'],'threadId':_0x27c898[_0x7aa4a(0xcc)],'dT':f(_0x27c898['createTimestamp']),'personId':_0x27c898[_0x7aa4a(0xc5)],'resolved':_0x5bc565[_0x7aa4a(0x11a)]===I[_0x7aa4a(0xe6)],'unitId':_0x36be4e,'subUnitId':_0x54de86,'text':JSON[_0x7aa4a(0xd5)](_0x27c898[_0x7aa4a(0xdf)]),'parentId':_0x361bcc}),_0x6a436a=_0x26edd4(_0x5bc565[_0x7aa4a(0xe9)][0x0]);return{..._0x6a436a,'children':_0x5bc565[_0x7aa4a(0xe9)]['slice'](0x1)[_0x7aa4a(0xd0)](_0x1fd19e=>_0x26edd4(_0x1fd19e,_0x6a436a['id']))};}return null;}let p=class{constructor(_0x563e62,_0x2b0f4c,_0x56d117){const _0x3f5a83=_0x140c39;this[_0x3f5a83(0x129)]=_0x563e62,this[_0x3f5a83(0x113)]=_0x2b0f4c,this[_0x3f5a83(0xf2)]=_0x56d117;}async[_0x140c39(0xda)](_0x51a913){const _0x1d7937=_0x140c39;var _0x2ff61a,_0x20f923;const {parentId:_0xc723d5,unitId:_0x271c20,text:_0x3b7369,threadId:_0x4feaa6}=_0x51a913,_0x567236=(_0x20f923=(_0x2ff61a=_0x3b7369[_0x1d7937(0x109)])==null?void 0x0:_0x2ff61a[_0x1d7937(0x128)](_0x5962f9=>_0x5962f9[_0x1d7937(0xdc)]===c[_0x1d7937(0xc7)]['COMMENT'])[_0x1d7937(0xd0)](_0x551617=>_0x551617[_0x1d7937(0xcb)]))!=null?_0x20f923:[],_0x368f3b=JSON[_0x1d7937(0x11b)](_0x3b7369),_0x4afb6f=(await this[_0x1d7937(0xf2)]['requireSession'](_0x271c20))[_0x1d7937(0xe8)]();if(_0xc723d5){const _0xc05dde={'memberId':_0x4afb6f,'unitId':_0x271c20,'content':_0x368f3b,'mention':_0x567236,'threadId':_0x4feaa6},_0x15f819=(await this['_httpService'][_0x1d7937(0x125)](_0x1d7937(0xe5)+_0x271c20+_0x1d7937(0x117),{'body':_0xc05dde}))[_0x1d7937(0xce)][_0x1d7937(0x101)];return{..._0x51a913,'id':_0x15f819['replyId'],'dT':c[_0x1d7937(0xee)](+_0x15f819[_0x1d7937(0xd6)])[_0x1d7937(0x108)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x15f819[_0x1d7937(0xc5)]};}else{const _0x3f088d={'memberId':_0x4afb6f,'unitId':_0x271c20,'content':_0x368f3b,'mention':_0x567236},_0x284b04=await this[_0x1d7937(0x129)]['post'](_0x1d7937(0xe5)+_0x271c20+_0x1d7937(0x100),{'body':_0x3f088d});return Y(_0x284b04[_0x1d7937(0xce)]['comment'],_0x51a913);}}async[_0x140c39(0x110)](_0x4e1faf){const _0x356b74=_0x140c39;var _0x554a16,_0x28c574;const {text:_0x4d8763,unitId:_0x30f84d}=_0x4e1faf,_0x2087f0=(_0x28c574=(_0x554a16=_0x4d8763[_0x356b74(0x109)])==null?void 0x0:_0x554a16['filter'](_0x16b4ba=>_0x16b4ba[_0x356b74(0xdc)]===c[_0x356b74(0xc7)][_0x356b74(0xe2)])[_0x356b74(0xd0)](_0x405c76=>_0x405c76[_0x356b74(0xcb)]))!=null?_0x28c574:[],_0x107e98=JSON[_0x356b74(0x11b)](_0x4d8763),_0x58ec09=_0x4e1faf[_0x356b74(0xcc)],_0x1c76fe=_0x4e1faf['id'],_0x388b13={'memberId':(await this[_0x356b74(0xf2)][_0x356b74(0xf1)](_0x30f84d))[_0x356b74(0xe8)](),'unitId':_0x30f84d,'threadId':_0x58ec09,'mention':_0x2087f0,'content':_0x107e98,'replyId':_0x1c76fe},_0x28dd53=await this[_0x356b74(0x129)]['post']('/universer-api/comment/unit/'+_0x30f84d+'/edit',{'body':_0x388b13});return!_0x28dd53[_0x356b74(0xce)][_0x356b74(0x123)]||_0x28dd53[_0x356b74(0xce)][_0x356b74(0x123)][_0x356b74(0x11e)]===0x1;}async[_0x140c39(0xcd)](_0x449f2b){const _0x52df53=_0x140c39,{unitId:_0x196cb6}=_0x449f2b,_0x53db86=_0x449f2b[_0x52df53(0xcc)],_0x1c8b5d={'memberId':this[_0x52df53(0x113)]['getCurrentUser']()['userID'],'unitId':_0x196cb6,'threadId':_0x53db86,'solved':_0x449f2b[_0x52df53(0xd4)]?I['Solved']:I[_0x52df53(0x102)]},_0x3aba22=await this[_0x52df53(0x129)][_0x52df53(0x125)]('/universer-api/comment/unit/'+_0x196cb6+_0x52df53(0x10e),{'body':_0x1c8b5d});return!_0x3aba22['body'][_0x52df53(0x123)]||_0x3aba22[_0x52df53(0xce)][_0x52df53(0x123)][_0x52df53(0x11e)]===0x1;}async[_0x140c39(0xd8)](_0x3ea31d,_0x35e778,_0x551453,_0xcbbfca){const _0xf08536=_0x140c39,_0x42f1fa={'memberId':(await this[_0xf08536(0xf2)][_0xf08536(0xf1)](_0x3ea31d))[_0xf08536(0xe8)](),'threadId':_0x551453,'replyId':_0xcbbfca,'unitId':_0x3ea31d},_0x19826f=await this[_0xf08536(0x129)][_0xf08536(0x125)](_0xf08536(0xe5)+_0x3ea31d+_0xf08536(0xf8),{'body':_0x42f1fa});return!_0x19826f['body'][_0xf08536(0x123)]||_0x19826f[_0xf08536(0xce)][_0xf08536(0x123)]['code']===0x1;}async[_0x140c39(0xeb)](_0x34e8fc,_0x328f36,_0x3b5b0a){const _0x14a7ad=_0x140c39,_0x391a47={'unitId':_0x34e8fc,'threadId':_0x3b5b0a},_0x20c26f=await this['_httpService'][_0x14a7ad(0x125)](_0x14a7ad(0xe5)+_0x34e8fc+_0x14a7ad(0xf9),{'body':_0x391a47}),_0x55564d=_0x3b5b0a[_0x14a7ad(0xd0)](_0x2e6217=>G(_0x20c26f['body']['comments'][_0x2e6217],_0x34e8fc,_0x328f36))[_0x14a7ad(0x128)](Boolean);return Object['values'](_0x20c26f[_0x14a7ad(0xce)]['users'])[_0x14a7ad(0xc2)](_0x51335c=>{const _0x2325f1=_0x14a7ad;this[_0x2325f1(0x113)]['addUser'](_0x51335c);}),_0x55564d;}[_0x140c39(0x10b)](_0x4101ba){const _0x383195=_0x140c39;return{'id':_0x4101ba['id'],'threadId':_0x4101ba['threadId'],'ref':_0x4101ba[_0x383195(0x12e)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x140c39(0xc6)](c[_0x140c39(0xc1)])),C(0x2,c[_0x140c39(0xc6)](b[_0x140c39(0xcf)]))],p);var H=Object[_0x140c39(0xb8)],J=(_0xcd280b,_0x13a4b5,_0x360f37,_0x690666)=>{const _0x5d06e9=_0x140c39;for(var _0x9d77e5=_0x690666>0x1?void 0x0:_0x690666?H(_0x13a4b5,_0x360f37):_0x13a4b5,_0x1b045a=_0xcd280b[_0x5d06e9(0xf3)]-0x1,_0x456e73;_0x1b045a>=0x0;_0x1b045a--)(_0x456e73=_0xcd280b[_0x1b045a])&&(_0x9d77e5=_0x456e73(_0x9d77e5)||_0x9d77e5);return _0x9d77e5;},y=(_0x50130e,_0x38ff17)=>(_0x231c95,_0x256075)=>_0x38ff17(_0x231c95,_0x256075,_0x50130e);let g=class extends c['Disposable']{constructor(_0x10abc4,_0x4c4f25){const _0x472496=_0x140c39;super(),this[_0x472496(0xbb)]=_0x10abc4,this[_0x472496(0x11f)]=_0x4c4f25,this['_initDataSource']();}[_0x140c39(0x11d)](){const _0x70c559=_0x140c39;this[_0x70c559(0xbb)][_0x70c559(0x103)]=this[_0x70c559(0x11f)],this['_threadCommentDataSourceService'][_0x70c559(0xe0)]=!0x1;}};g=J([y(0x0,M[_0x140c39(0xba)]),y(0x1,c[_0x140c39(0xc6)](p))],g);var F=Object[_0x140c39(0x132)],L=Object[_0x140c39(0xb8)],Z=(_0x21e035,_0x574c35,_0xf7dfaf)=>_0x574c35 in _0x21e035?F(_0x21e035,_0x574c35,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf7dfaf}):_0x21e035[_0x574c35]=_0xf7dfaf,W=(_0x5976c1,_0x2e9cbe,_0x3f8700,_0x427d50)=>{const _0x1777cb=_0x140c39;for(var _0x3ed45e=_0x427d50>0x1?void 0x0:_0x427d50?L(_0x2e9cbe,_0x3f8700):_0x2e9cbe,_0x2d3093=_0x5976c1[_0x1777cb(0xf3)]-0x1,_0xbbb452;_0x2d3093>=0x0;_0x2d3093--)(_0xbbb452=_0x5976c1[_0x2d3093])&&(_0x3ed45e=_0xbbb452(_0x3ed45e)||_0x3ed45e);return _0x3ed45e;},O=(_0x424c4c,_0x110d92)=>(_0xd9591e,_0x55ded2)=>_0x110d92(_0xd9591e,_0x55ded2,_0x424c4c),N=(_0x3119ea,_0x3b9688,_0x2f0a1e)=>Z(_0x3119ea,typeof _0x3b9688!=_0x140c39(0xd9)?_0x3b9688+'':_0x3b9688,_0x2f0a1e);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x140c39(0xd2)]{constructor(_0x341666=D,_0x19922d,_0x40bf06){const _0x1b1f6a=_0x140c39;super(),this['_config']=_0x341666,this[_0x1b1f6a(0xf0)]=_0x19922d,this[_0x1b1f6a(0x106)]=_0x40bf06;const {..._0x4372d4}=c[_0x1b1f6a(0x12b)]({},D,this[_0x1b1f6a(0xe7)]);this[_0x1b1f6a(0x106)][_0x1b1f6a(0x115)](q,_0x4372d4);}[_0x140c39(0xb7)](){const _0x2c8785=_0x140c39;[[p],[g],[_]][_0x2c8785(0xc2)](_0x9f5f6d=>{const _0x1b80ac=_0x2c8785;this[_0x1b80ac(0xf0)][_0x1b80ac(0x12c)](_0x9f5f6d);});}[_0x140c39(0x10c)](){const _0x37cd2c=_0x140c39;this['_injector']['get'](g),this['_injector'][_0x37cd2c(0xd3)](_);}},N(exports[_0x140c39(0x11c)],_0x140c39(0x10d),U),N(exports[_0x140c39(0x11c)],'type',c[_0x140c39(0x112)][_0x140c39(0xe4)]),exports[_0x140c39(0x11c)]=W([c['DependentOn'](w[_0x140c39(0xef)],b[_0x140c39(0xff)],T['UniverLicensePlugin']),O(0x1,c[_0x140c39(0xc6)](c[_0x140c39(0x12a)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x426fd8=_0x35e5;(function(_0x5da0cc,_0x1df22f){const _0x5a3916=_0x35e5,_0x2ac6b0=_0x5da0cc();while(!![]){try{const _0xfe74f0=parseInt(_0x5a3916(0x139))/0x1*(parseInt(_0x5a3916(0x116))/0x2)+-parseInt(_0x5a3916(0x179))/0x3*(-parseInt(_0x5a3916(0x16d))/0x4)+parseInt(_0x5a3916(0x17d))/0x5+-parseInt(_0x5a3916(0x158))/0x6+parseInt(_0x5a3916(0x14b))/0x7*(-parseInt(_0x5a3916(0x16b))/0x8)+parseInt(_0x5a3916(0x174))/0x9*(parseInt(_0x5a3916(0x154))/0xa)+parseInt(_0x5a3916(0x166))/0xb*(-parseInt(_0x5a3916(0x129))/0xc);if(_0xfe74f0===_0x1df22f)break;else _0x2ac6b0['push'](_0x2ac6b0['shift']());}catch(_0xb37a07){_0x2ac6b0['push'](_0x2ac6b0['shift']());}}}(_0x1048,0xdb308));import{CommentService as _0x3a15b6,CollaborationSessionService as _0x44c5cb,UniverCollaborationClientPlugin as _0x39432b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3618e3}from'@univerjs-pro/license';import{dayjs as _0xc6ba85,UserManagerService as _0x44cabc,Inject as _0x4ee146,Injector as _0x52b0e2,Disposable as _0x1cb851,CustomRangeType as _0x23dce0,UniverInstanceType as _0x29b4b7,DependentOn as _0x537f52,IConfigService as _0x4f31e8,Plugin as _0x42e39d,merge as _0x2d8dad}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42ba3c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xb8419e,IThreadCommentDataSourceService as _0x4fbd0e}from'@univerjs/thread-comment';import{bufferTime as _0x4e28a0}from'rxjs';import{HTTPService as _0x28ab9a}from'@univerjs/network';function _0x35e5(_0x48b50c,_0x6d8e72){const _0x1048ad=_0x1048();return _0x35e5=function(_0x35e517,_0x454aa4){_0x35e517=_0x35e517-0x116;let _0x109e93=_0x1048ad[_0x35e517];return _0x109e93;},_0x35e5(_0x48b50c,_0x6d8e72);}const W=_0x426fd8(0x125);var I=(_0x536bf7=>(_0x536bf7[_0x536bf7[_0x426fd8(0x153)]=0x0]=_0x426fd8(0x153),_0x536bf7[_0x536bf7[_0x426fd8(0x171)]=0x1]=_0x426fd8(0x171),_0x536bf7[_0x536bf7[_0x426fd8(0x168)]=-0x1]=_0x426fd8(0x168),_0x536bf7))(I||{}),v=(_0x4efc0e=>(_0x4efc0e[_0x4efc0e[_0x426fd8(0x160)]=0x0]=_0x426fd8(0x160),_0x4efc0e[_0x4efc0e[_0x426fd8(0x123)]=0x1]=_0x426fd8(0x123),_0x4efc0e[_0x4efc0e[_0x426fd8(0x164)]=0x2]='Reply',_0x4efc0e[_0x4efc0e[_0x426fd8(0x162)]=0x3]=_0x426fd8(0x162),_0x4efc0e[_0x4efc0e[_0x426fd8(0x17b)]=0x4]=_0x426fd8(0x17b),_0x4efc0e[_0x4efc0e[_0x426fd8(0x122)]=0x5]=_0x426fd8(0x122),_0x4efc0e[_0x4efc0e['UNRECOGNIZED']=-0x1]=_0x426fd8(0x168),_0x4efc0e))(v||{});const y=_0x1c4649=>_0xc6ba85(new Date(+_0x1c4649))[_0x426fd8(0x15c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3b0632,_0x5593e6)=>{const _0x2a22f4=_0x426fd8,_0x355534=_0x3b0632[_0x2a22f4(0x140)](_0x44cabc),_0x1f3894=_0x3b0632['get'](_0x28ab9a);_0x5593e6[_0x2a22f4(0x15a)](_0x2916f3=>{const _0x378335=_0x2a22f4;_0x355534[_0x378335(0x15e)](_0x2916f3)&&_0x5593e6[_0x378335(0x134)](_0x2916f3);}),_0x5593e6['size']&&(await _0x1f3894[_0x2a22f4(0x140)](_0x2a22f4(0x17c),{'params':{'userIDs':[..._0x5593e6]}}))[_0x2a22f4(0x12f)][_0x2a22f4(0x16a)]['forEach'](_0xd97f25=>{_0xd97f25&&_0x355534['addUser'](_0xd97f25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xe13614,_0xe94754,_0x5599bb,_0x109411)=>{for(var _0x4ad2e3=_0x109411>0x1?void 0x0:_0x109411?K(_0xe94754,_0x5599bb):_0xe94754,_0x439136=_0xe13614['length']-0x1,_0x36f027;_0x439136>=0x0;_0x439136--)(_0x36f027=_0xe13614[_0x439136])&&(_0x4ad2e3=_0x36f027(_0x4ad2e3)||_0x4ad2e3);return _0x4ad2e3;},p=(_0x3f9d2e,_0x554f36)=>(_0x1928b7,_0x186b62)=>_0x554f36(_0x1928b7,_0x186b62,_0x3f9d2e);let _=class extends _0x1cb851{constructor(_0xa2a973,_0x19b392,_0x45daf1,_0x7753c7){const _0x5db985=_0x426fd8;super(),this[_0x5db985(0x152)]=_0xa2a973,this[_0x5db985(0x16c)]=_0x19b392,this[_0x5db985(0x15f)]=_0x45daf1,this[_0x5db985(0x150)]=_0x7753c7,this[_0x5db985(0x149)](),this[_0x5db985(0x12b)]();}['_initUserSync'](){const _0x5d4068=_0x426fd8;this[_0x5d4068(0x151)](this[_0x5d4068(0x16c)][_0x5d4068(0x12e)][_0x5d4068(0x161)](_0x4e28a0(0x10))[_0x5d4068(0x127)](_0x44eeb5=>{const _0x561c0e=_0x5d4068,_0x2b6737=new Set();_0x44eeb5[_0x561c0e(0x15a)](_0xa04051=>{const _0x5d0426=_0x561c0e;switch(_0xa04051[_0x5d0426(0x159)]){case'add':{const _0x1afdf0=_0xa04051[_0x5d0426(0x155)]['personId'];_0x2b6737[_0x5d0426(0x15b)](_0x1afdf0);break;}}}),B(this['_injector'],_0x2b6737);}));}[_0x426fd8(0x149)](){const _0x2fa025=_0x426fd8;this[_0x2fa025(0x151)](this['_commentService']['commentUpdate$'][_0x2fa025(0x127)](async _0xa7df47=>{const _0x1210b6=_0x2fa025;var _0xfcfd8,_0x3f2b15,_0x5e3f48,_0x2174d2;const _0x3d74fe=(_0xfcfd8=this[_0x1210b6(0x16c)][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])['find'](_0x42a028=>_0x42a028[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0xfcfd8[_0x1210b6(0x133)];if(!_0x3d74fe)return;const {unitId:_0x4b6ce1,subUnitId:_0x572fdd}=_0x3d74fe;switch(_0xa7df47[_0x1210b6(0x136)]&&this['_userService']['addUser'](_0xa7df47[_0x1210b6(0x136)]),_0xa7df47[_0x1210b6(0x159)]){case v[_0x1210b6(0x123)]:break;case v['Reply']:{this[_0x1210b6(0x16c)][_0x1210b6(0x11b)](_0x4b6ce1,_0x572fdd,{'unitId':_0x4b6ce1,'subUnitId':_0x572fdd,'ref':'','id':_0xa7df47['replyId'],'dT':y(+_0xa7df47[_0x1210b6(0x14f)]),'threadId':_0xa7df47[_0x1210b6(0x173)],'personId':(_0x5e3f48=(_0x3f2b15=_0xa7df47[_0x1210b6(0x136)])==null?void 0x0:_0x3f2b15[_0x1210b6(0x14c)])!=null?_0x5e3f48:_0xa7df47['userId'],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content']),'parentId':_0x3d74fe['id']});break;}case v[_0x1210b6(0x17b)]:{const _0x432efd=this[_0x1210b6(0x16c)][_0x1210b6(0x128)](_0x4b6ce1,_0x572fdd,_0xa7df47['replyId']);_0x432efd&&_0x432efd[_0x1210b6(0x11e)]&&this['_threadCommentModel']['deleteComment'](_0x4b6ce1,_0x572fdd,_0xa7df47[_0x1210b6(0x148)]);break;}case v[_0x1210b6(0x162)]:{this[_0x1210b6(0x16c)][_0x1210b6(0x117)](_0x4b6ce1,_0x572fdd,{'commentId':_0xa7df47[_0x1210b6(0x148)],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content'])});break;}case v[_0x1210b6(0x122)]:{const _0x1bf870=(_0x2174d2=this['_threadCommentModel'][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])[_0x1210b6(0x118)](_0x318d13=>_0x318d13[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0x2174d2['root'];_0x1bf870&&this[_0x1210b6(0x16c)]['resolveComment'](_0x4b6ce1,_0x572fdd,_0x1bf870['id'],_0xa7df47['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4ee146(_0x3a15b6)),p(0x1,_0x4ee146(_0xb8419e)),p(0x2,_0x4ee146(_0x44cabc)),p(0x3,_0x4ee146(_0x52b0e2))],_);function _0x1048(){const _0x2f6de5=['_threadCommentModel','4TZGKIp','error','/solved','symbol','Solved','UNIVER_UNKNOWN','threadId','9uqpsag','COMMENT','slice','getOwnPropertyDescriptor','/edit','2092509afUKxH','solved','Delete','/universer-api/user/list','4804470WyjOex','requireSession','6sCWnfQ','updateComment','find','getCurrentUser','filter','addComment','addUser','length','parentId','rangeId','_httpService','thread-comment-data-source.config','Solve','Add','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','subscribe','getComment','5126496mVinYO','_config','_initUserSync','resolved','/add','commentUpdate$','body','parse','stringify','userId','root','delete','_sessionService','user','dataSource','ref','388667MJeums','setConfig','unitId','/universer-api/comment/unit/','_threadCommentDataSource','_initDataSource','code','get','YYYY/MM/DD\x20HH:mm','reply','deleteComment','defineProperty','getMemberID','map','onStarting','replyId','_init','rangeType','9427411QohKAT','userID','getUnit','post','createTimestamp','_injector','disposeWithMe','_commentService','OpenOrReOpen','1080110FjlzJi','payload','comment','replies','1563768diwUks','type','forEach','add','format','values','getUser','_userService','Unknown','pipe','Edit','_configService','Reply','_threadCommentDataSourceService','11rLNvVm','/delete','UNRECOGNIZED','/reply','users','8nrdXnY'];_0x1048=function(){return _0x2f6de5;};return _0x1048();}const z=_0x426fd8(0x121),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x4f5c1e,_0x3b8dfc,_0x404569,_0x34deb2)=>{const _0x291939=_0x426fd8;for(var _0x2855e8=_0x34deb2>0x1?void 0x0:_0x34deb2?k(_0x3b8dfc,_0x404569):_0x3b8dfc,_0x293ba3=_0x4f5c1e[_0x291939(0x11d)]-0x1,_0x1b68f3;_0x293ba3>=0x0;_0x293ba3--)(_0x1b68f3=_0x4f5c1e[_0x293ba3])&&(_0x2855e8=_0x1b68f3(_0x2855e8)||_0x2855e8);return _0x2855e8;},b=(_0x2d815e,_0x8cbb2)=>(_0x21a46c,_0x421439)=>_0x8cbb2(_0x21a46c,_0x421439,_0x2d815e);function X(_0x132ece,_0xa54595){const _0x1aa235=_0x426fd8,_0x1dca2c=_0x132ece[_0x1aa235(0x157)][0x0];return{..._0xa54595,'id':_0x1dca2c['replyId'],'resolved':_0x132ece[_0x1aa235(0x17a)]===0x1,'dT':y(_0x1dca2c[_0x1aa235(0x14f)]),'personId':_0x1dca2c[_0x1aa235(0x132)],'threadId':_0x1dca2c[_0x1aa235(0x173)]};}function ee(_0x46f5cd,_0x12f5d2,_0x2c5f2e){const _0xeedfeb=_0x426fd8;var _0x5a1c95,_0x4d1b5e;if(((_0x4d1b5e=(_0x5a1c95=_0x46f5cd==null?void 0x0:_0x46f5cd[_0xeedfeb(0x157)])==null?void 0x0:_0x5a1c95[_0xeedfeb(0x11d)])!=null?_0x4d1b5e:0x0)>0x0){const _0x465a71=(_0x1b385a,_0x33799c)=>({'id':_0x1b385a['replyId'],'threadId':_0x1b385a[_0xeedfeb(0x173)],'dT':y(_0x1b385a[_0xeedfeb(0x14f)]),'personId':_0x1b385a[_0xeedfeb(0x132)],'resolved':_0x46f5cd[_0xeedfeb(0x17a)]===I[_0xeedfeb(0x171)],'unitId':_0x12f5d2,'subUnitId':_0x2c5f2e,'text':JSON[_0xeedfeb(0x130)](_0x1b385a['content']),'parentId':_0x33799c}),_0x19e897=_0x465a71(_0x46f5cd[_0xeedfeb(0x157)][0x0]);return{..._0x19e897,'children':_0x46f5cd[_0xeedfeb(0x157)][_0xeedfeb(0x176)](0x1)[_0xeedfeb(0x146)](_0xe877b9=>_0x465a71(_0xe877b9,_0x19e897['id']))};}return null;}let S=class{constructor(_0x582d0c,_0x3ec22f,_0x38ac2){const _0x55bca0=_0x426fd8;this['_httpService']=_0x582d0c,this[_0x55bca0(0x15f)]=_0x3ec22f,this[_0x55bca0(0x135)]=_0x38ac2;}async['addComment'](_0x16f9fd){const _0x281596=_0x426fd8;var _0x17661d,_0x48e716;const {parentId:_0x13a13d,unitId:_0xd2379a,text:_0x28fbbf,threadId:_0x2eecf1}=_0x16f9fd,_0x103558=(_0x48e716=(_0x17661d=_0x28fbbf['customRanges'])==null?void 0x0:_0x17661d[_0x281596(0x11a)](_0x16bbf1=>_0x16bbf1[_0x281596(0x14a)]===_0x23dce0['COMMENT'])[_0x281596(0x146)](_0x5ad427=>_0x5ad427[_0x281596(0x11f)]))!=null?_0x48e716:[],_0x39d9cd=JSON[_0x281596(0x131)](_0x28fbbf),_0x5a320c=(await this[_0x281596(0x135)][_0x281596(0x17e)](_0xd2379a))[_0x281596(0x145)]();if(_0x13a13d){const _0x52122c={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558,'threadId':_0x2eecf1},_0x4dab53=(await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x169),{'body':_0x52122c}))[_0x281596(0x12f)][_0x281596(0x142)];return{..._0x16f9fd,'id':_0x4dab53[_0x281596(0x148)],'dT':_0xc6ba85(+_0x4dab53[_0x281596(0x14f)])[_0x281596(0x15c)](_0x281596(0x141)),'personId':_0x4dab53['userId']};}else{const _0x50cb7f={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558},_0x26c423=await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x12d),{'body':_0x50cb7f});return X(_0x26c423[_0x281596(0x12f)][_0x281596(0x156)],_0x16f9fd);}}async[_0x426fd8(0x117)](_0x289351){const _0x54a752=_0x426fd8;var _0x488b00,_0x4d462f;const {text:_0x2066ac,unitId:_0x3ec9cd}=_0x289351,_0x5ae0c3=(_0x4d462f=(_0x488b00=_0x2066ac['customRanges'])==null?void 0x0:_0x488b00[_0x54a752(0x11a)](_0x1243bb=>_0x1243bb[_0x54a752(0x14a)]===_0x23dce0[_0x54a752(0x175)])['map'](_0x315824=>_0x315824['rangeId']))!=null?_0x4d462f:[],_0x5068be=JSON[_0x54a752(0x131)](_0x2066ac),_0x3b1c54=_0x289351[_0x54a752(0x173)],_0x29bd71=_0x289351['id'],_0x4270a4={'memberId':(await this[_0x54a752(0x135)][_0x54a752(0x17e)](_0x3ec9cd))[_0x54a752(0x145)](),'unitId':_0x3ec9cd,'threadId':_0x3b1c54,'mention':_0x5ae0c3,'content':_0x5068be,'replyId':_0x29bd71},_0x407fe5=await this[_0x54a752(0x120)][_0x54a752(0x14e)](_0x54a752(0x13c)+_0x3ec9cd+_0x54a752(0x178),{'body':_0x4270a4});return!_0x407fe5[_0x54a752(0x12f)]['error']||_0x407fe5[_0x54a752(0x12f)][_0x54a752(0x16e)][_0x54a752(0x13f)]===0x1;}async['resolveComment'](_0x3b3c5d){const _0x1591d1=_0x426fd8,{unitId:_0x5dff18}=_0x3b3c5d,_0x54d35d=_0x3b3c5d['threadId'],_0xddd362={'memberId':this[_0x1591d1(0x15f)][_0x1591d1(0x119)]()[_0x1591d1(0x14c)],'unitId':_0x5dff18,'threadId':_0x54d35d,'solved':_0x3b3c5d[_0x1591d1(0x12c)]?I[_0x1591d1(0x171)]:I[_0x1591d1(0x153)]},_0x19b2bd=await this[_0x1591d1(0x120)][_0x1591d1(0x14e)]('/universer-api/comment/unit/'+_0x5dff18+_0x1591d1(0x16f),{'body':_0xddd362});return!_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)]||_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)][_0x1591d1(0x13f)]===0x1;}async[_0x426fd8(0x143)](_0x489852,_0x4def35,_0x11d4f9,_0x5bf2d7){const _0x35fc3d=_0x426fd8,_0x562f53={'memberId':(await this[_0x35fc3d(0x135)][_0x35fc3d(0x17e)](_0x489852))[_0x35fc3d(0x145)](),'threadId':_0x11d4f9,'replyId':_0x5bf2d7,'unitId':_0x489852},_0x320754=await this[_0x35fc3d(0x120)][_0x35fc3d(0x14e)](_0x35fc3d(0x13c)+_0x489852+_0x35fc3d(0x167),{'body':_0x562f53});return!_0x320754[_0x35fc3d(0x12f)]['error']||_0x320754[_0x35fc3d(0x12f)][_0x35fc3d(0x16e)]['code']===0x1;}async['listComments'](_0x2891af,_0x316a19,_0x219d18){const _0x149cc7=_0x426fd8,_0x2b59a5={'unitId':_0x2891af,'threadId':_0x219d18},_0x153a08=await this['_httpService'][_0x149cc7(0x14e)](_0x149cc7(0x13c)+_0x2891af+'/list',{'body':_0x2b59a5}),_0x478b45=_0x219d18[_0x149cc7(0x146)](_0x2035a3=>ee(_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x126)][_0x2035a3],_0x2891af,_0x316a19))['filter'](Boolean);return Object[_0x149cc7(0x15d)](_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x16a)])[_0x149cc7(0x15a)](_0x264ecd=>{const _0x1a0132=_0x149cc7;this[_0x1a0132(0x15f)][_0x1a0132(0x11c)](_0x264ecd);}),_0x478b45;}[_0x426fd8(0x124)](_0x18d8a2){const _0x433338=_0x426fd8;return{'id':_0x18d8a2['id'],'threadId':_0x18d8a2['threadId'],'ref':_0x18d8a2[_0x433338(0x138)]};}};S=Q([b(0x0,_0x4ee146(_0x28ab9a)),b(0x1,_0x4ee146(_0x44cabc)),b(0x2,_0x4ee146(_0x44c5cb))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x26f758,_0x106bb3,_0x45ea78,_0x2a3bfd)=>{const _0x118a55=_0x426fd8;for(var _0xf2e6cb=_0x2a3bfd>0x1?void 0x0:_0x2a3bfd?re(_0x106bb3,_0x45ea78):_0x106bb3,_0x3534cc=_0x26f758[_0x118a55(0x11d)]-0x1,_0x433e19;_0x3534cc>=0x0;_0x3534cc--)(_0x433e19=_0x26f758[_0x3534cc])&&(_0xf2e6cb=_0x433e19(_0xf2e6cb)||_0xf2e6cb);return _0xf2e6cb;},M=(_0x4e72bb,_0x1d0aa4)=>(_0x92c24d,_0x54b819)=>_0x1d0aa4(_0x92c24d,_0x54b819,_0x4e72bb);let f=class extends _0x1cb851{constructor(_0x534207,_0x3a2173){const _0x2de5a7=_0x426fd8;super(),this['_threadCommentDataSourceService']=_0x534207,this[_0x2de5a7(0x13d)]=_0x3a2173,this[_0x2de5a7(0x13e)]();}[_0x426fd8(0x13e)](){const _0x39a406=_0x426fd8;this[_0x39a406(0x165)][_0x39a406(0x137)]=this['_threadCommentDataSource'],this[_0x39a406(0x165)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4fbd0e),M(0x1,_0x4ee146(S))],f);var se=Object[_0x426fd8(0x144)],oe=Object[_0x426fd8(0x177)],ne=(_0x284618,_0xebc38f,_0x4ee5f9)=>_0xebc38f in _0x284618?se(_0x284618,_0xebc38f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5f9}):_0x284618[_0xebc38f]=_0x4ee5f9,ie=(_0x56b21e,_0x208850,_0x3fb898,_0x16d072)=>{for(var _0x2abac9=_0x16d072>0x1?void 0x0:_0x16d072?oe(_0x208850,_0x3fb898):_0x208850,_0x12b79f=_0x56b21e['length']-0x1,_0x51fb89;_0x12b79f>=0x0;_0x12b79f--)(_0x51fb89=_0x56b21e[_0x12b79f])&&(_0x2abac9=_0x51fb89(_0x2abac9)||_0x2abac9);return _0x2abac9;},N=(_0x23b47c,_0x4c5e7f)=>(_0x58ab05,_0x4c0313)=>_0x4c5e7f(_0x58ab05,_0x4c0313,_0x23b47c),$=(_0x4fdf5c,_0x18f4f6,_0x50dd21)=>ne(_0x4fdf5c,typeof _0x18f4f6!=_0x426fd8(0x170)?_0x18f4f6+'':_0x18f4f6,_0x50dd21);let g=class extends _0x42e39d{constructor(_0x4ce1c4=O,_0x55e41,_0x2666fe){const _0x5194c5=_0x426fd8;super(),this[_0x5194c5(0x12a)]=_0x4ce1c4,this['_injector']=_0x55e41,this[_0x5194c5(0x163)]=_0x2666fe;const {..._0x103b86}=_0x2d8dad({},O,this[_0x5194c5(0x12a)]);this[_0x5194c5(0x163)][_0x5194c5(0x13a)](z,_0x103b86);}[_0x426fd8(0x147)](){const _0x55db13=_0x426fd8;[[S],[f],[_]][_0x55db13(0x15a)](_0x21b936=>{const _0x18d1f0=_0x55db13;this[_0x18d1f0(0x150)][_0x18d1f0(0x15b)](_0x21b936);});}['onReady'](){const _0x588f58=_0x426fd8;this[_0x588f58(0x150)][_0x588f58(0x140)](f),this[_0x588f58(0x150)][_0x588f58(0x140)](_);}};$(g,'pluginName',W),$(g,_0x426fd8(0x159),_0x29b4b7[_0x426fd8(0x172)]),g=ie([_0x537f52(_0x42ba3c,_0x39432b,_0x3618e3),N(0x1,_0x4ee146(_0x52b0e2)),N(0x2,_0x4f31e8)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x34cd0f=_0x5aba;(function(_0x8545fb,_0x1ed292){const _0x264127=_0x5aba,_0x4d4067=_0x8545fb();while(!![]){try{const _0x1053f4=-parseInt(_0x264127(0x1dc))/0x1+parseInt(_0x264127(0x1cb))/0x2*(parseInt(_0x264127(0x198))/0x3)+parseInt(_0x264127(0x191))/0x4+-parseInt(_0x264127(0x184))/0x5*(-parseInt(_0x264127(0x1de))/0x6)+-parseInt(_0x264127(0x1be))/0x7*(parseInt(_0x264127(0x1b4))/0x8)+parseInt(_0x264127(0x1b0))/0x9*(-parseInt(_0x264127(0x1ab))/0xa)+-parseInt(_0x264127(0x1d1))/0xb*(-parseInt(_0x264127(0x17c))/0xc);if(_0x1053f4===_0x1ed292)break;else _0x4d4067['push'](_0x4d4067['shift']());}catch(_0x1240ae){_0x4d4067['push'](_0x4d4067['shift']());}}}(_0x1cd9,0xb8415));import{CommentService as _0x345965,CollaborationSessionService as _0x362bab,UniverCollaborationClientPlugin as _0x3b7d8f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x13449b}from'@univerjs-pro/license';import{dayjs as _0x1ef42e,UserManagerService as _0x47edab,Inject as _0x5f1365,Injector as _0xfec9d0,Disposable as _0x256cca,CustomRangeType as _0x26afc4,UniverInstanceType as _0x2c3502,DependentOn as _0x4bd4b8,IConfigService as _0x4b5188,Plugin as _0x4f1cb3,merge as _0x41f525}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40c8ff}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x536eda,IThreadCommentDataSourceService as _0x47b26d}from'@univerjs/thread-comment';function _0x5aba(_0x9989d1,_0x38ac48){const _0x1cd9b5=_0x1cd9();return _0x5aba=function(_0x5aba07,_0x34f7f0){_0x5aba07=_0x5aba07-0x17b;let _0x5743de=_0x1cd9b5[_0x5aba07];return _0x5743de;},_0x5aba(_0x9989d1,_0x38ac48);}import{bufferTime as _0x588322}from'rxjs';import{HTTPService as _0x3b5283}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x1cd9(){const _0x46a054=['comment','918438PfDueV','/list','78PImXIy','_userService','defineProperty','getUser','requireSession','type','5777832kgnpnX','dataSource','symbol','error','_initDataSource','_threadCommentDataSourceService','_sessionService','addComment','49520JzWcbH','forEach','/add','rangeId','get','getMemberID','commentUpdate$','users','COMMENT','pipe','values','thread-comment-data-source.config','code','4225516EHKUzo','Reply','Solved','resolveComment','_init','delete','ref','302613tsJfre','deleteComment','Edit','UNRECOGNIZED','_initUserSync','/delete','format','createTimestamp','size','_injector','subscribe','personId','getUnit','saveCommentToSnapshot','listComments','length','/reply','UNIVER_UNKNOWN','replies','1198420pWNnag','/edit','Add','body','/universer-api/comment/unit/','72wTmVZQ','resolved','Solve','setConfig','96QwdYgZ','reply','_httpService','pluginName','syncUpdateMutationToColla','map','rangeType','/solved','customRanges','_commentService','260708DulnQX','parse','YYYY/MM/DD\x20HH:mm','userID','user','replyId','Delete','_threadCommentModel','content','post','getCurrentUser','solved','threadId','28dYpjiF','_config','add','filter','getOwnPropertyDescriptor','_threadCommentDataSource','11XgTGrW','/universer-api/user/list','unitId','onReady','find','onStarting','addUser','payload','userId','OpenOrReOpen'];_0x1cd9=function(){return _0x46a054;};return _0x1cd9();}var I=(_0x2fe023=>(_0x2fe023[_0x2fe023[_0x34cd0f(0x1da)]=0x0]=_0x34cd0f(0x1da),_0x2fe023[_0x2fe023[_0x34cd0f(0x193)]=0x1]=_0x34cd0f(0x193),_0x2fe023[_0x2fe023[_0x34cd0f(0x19b)]=-0x1]=_0x34cd0f(0x19b),_0x2fe023))(I||{}),v=(_0x517f28=>(_0x517f28[_0x517f28['Unknown']=0x0]='Unknown',_0x517f28[_0x517f28[_0x34cd0f(0x1ad)]=0x1]=_0x34cd0f(0x1ad),_0x517f28[_0x517f28['Reply']=0x2]=_0x34cd0f(0x192),_0x517f28[_0x517f28['Edit']=0x3]=_0x34cd0f(0x19a),_0x517f28[_0x517f28[_0x34cd0f(0x1c4)]=0x4]=_0x34cd0f(0x1c4),_0x517f28[_0x517f28[_0x34cd0f(0x1b2)]=0x5]=_0x34cd0f(0x1b2),_0x517f28[_0x517f28[_0x34cd0f(0x19b)]=-0x1]=_0x34cd0f(0x19b),_0x517f28))(v||{});const y=_0x278855=>_0x1ef42e(new Date(+_0x278855))['format'](_0x34cd0f(0x1c0)),B=async(_0x3184e0,_0x11f2d1)=>{const _0x199d5a=_0x34cd0f,_0x6535e8=_0x3184e0[_0x199d5a(0x188)](_0x47edab),_0x5acdd8=_0x3184e0['get'](_0x3b5283);_0x11f2d1['forEach'](_0x205c1a=>{const _0x4fe08e=_0x199d5a;_0x6535e8[_0x4fe08e(0x1e1)](_0x205c1a)&&_0x11f2d1[_0x4fe08e(0x196)](_0x205c1a);}),_0x11f2d1[_0x199d5a(0x1a0)]&&(await _0x5acdd8[_0x199d5a(0x188)](_0x199d5a(0x1d2),{'params':{'userIDs':[..._0x11f2d1]}}))[_0x199d5a(0x1ae)][_0x199d5a(0x18b)][_0x199d5a(0x185)](_0x2fabfe=>{const _0x20d8b5=_0x199d5a;_0x2fabfe&&_0x6535e8[_0x20d8b5(0x1d7)](_0x2fabfe);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2bdb65,_0x196167,_0x535616,_0x5f228c)=>{for(var _0x413992=_0x5f228c>0x1?void 0x0:_0x5f228c?K(_0x196167,_0x535616):_0x196167,_0x568206=_0x2bdb65['length']-0x1,_0x56064d;_0x568206>=0x0;_0x568206--)(_0x56064d=_0x2bdb65[_0x568206])&&(_0x413992=_0x56064d(_0x413992)||_0x413992);return _0x413992;},p=(_0x518e98,_0x5621bd)=>(_0x70452,_0x85f42f)=>_0x5621bd(_0x70452,_0x85f42f,_0x518e98);let _=class extends _0x256cca{constructor(_0x527924,_0x139b27,_0x38f339,_0x1aeb2c){const _0x2125fb=_0x34cd0f;super(),this[_0x2125fb(0x1bd)]=_0x527924,this['_threadCommentModel']=_0x139b27,this[_0x2125fb(0x1df)]=_0x38f339,this[_0x2125fb(0x1a1)]=_0x1aeb2c,this['_init'](),this[_0x2125fb(0x19c)]();}[_0x34cd0f(0x19c)](){const _0x3a2280=_0x34cd0f;this['disposeWithMe'](this[_0x3a2280(0x1c5)][_0x3a2280(0x18a)][_0x3a2280(0x18d)](_0x588322(0x10))[_0x3a2280(0x1a2)](_0x54ae1c=>{const _0x560bf6=_0x3a2280,_0x3a5988=new Set();_0x54ae1c[_0x560bf6(0x185)](_0x522ec5=>{const _0x252da2=_0x560bf6;switch(_0x522ec5[_0x252da2(0x17b)]){case _0x252da2(0x1cd):{const _0x24c5c8=_0x522ec5[_0x252da2(0x1d8)][_0x252da2(0x1a3)];_0x3a5988[_0x252da2(0x1cd)](_0x24c5c8);break;}}}),B(this[_0x560bf6(0x1a1)],_0x3a5988);}));}[_0x34cd0f(0x195)](){const _0x390f77=_0x34cd0f;this['disposeWithMe'](this[_0x390f77(0x1bd)]['commentUpdate$'][_0x390f77(0x1a2)](async _0x3bf8a7=>{const _0x28f5fb=_0x390f77;var _0x290408,_0x146967,_0x3dfe3b,_0x20a4f0;const _0x944e41=(_0x290408=this[_0x28f5fb(0x1c5)][_0x28f5fb(0x1a4)](_0x3bf8a7[_0x28f5fb(0x1d3)])[_0x28f5fb(0x1d5)](_0x5327c1=>_0x5327c1[_0x28f5fb(0x1ca)]===_0x3bf8a7[_0x28f5fb(0x1ca)]))==null?void 0x0:_0x290408['root'];if(!_0x944e41)return;const {unitId:_0x2f00c5,subUnitId:_0x107d4c}=_0x944e41;switch(_0x3bf8a7[_0x28f5fb(0x1c2)]&&this[_0x28f5fb(0x1df)][_0x28f5fb(0x1d7)](_0x3bf8a7['user']),_0x3bf8a7[_0x28f5fb(0x17b)]){case v['Add']:break;case v[_0x28f5fb(0x192)]:{this[_0x28f5fb(0x1c5)][_0x28f5fb(0x183)](_0x2f00c5,_0x107d4c,{'unitId':_0x2f00c5,'subUnitId':_0x107d4c,'ref':'','id':_0x3bf8a7['replyId'],'dT':y(+_0x3bf8a7[_0x28f5fb(0x19f)]),'threadId':_0x3bf8a7[_0x28f5fb(0x1ca)],'personId':(_0x3dfe3b=(_0x146967=_0x3bf8a7[_0x28f5fb(0x1c2)])==null?void 0x0:_0x146967['userID'])!=null?_0x3dfe3b:_0x3bf8a7[_0x28f5fb(0x1d9)],'text':JSON[_0x28f5fb(0x1bf)](_0x3bf8a7['content']),'parentId':_0x944e41['id']});break;}case v[_0x28f5fb(0x1c4)]:{const _0x561995=this[_0x28f5fb(0x1c5)]['getComment'](_0x2f00c5,_0x107d4c,_0x3bf8a7[_0x28f5fb(0x1c3)]);_0x561995&&_0x561995['parentId']&&this[_0x28f5fb(0x1c5)][_0x28f5fb(0x199)](_0x2f00c5,_0x107d4c,_0x3bf8a7[_0x28f5fb(0x1c3)]);break;}case v['Edit']:{this[_0x28f5fb(0x1c5)]['updateComment'](_0x2f00c5,_0x107d4c,{'commentId':_0x3bf8a7[_0x28f5fb(0x1c3)],'text':JSON['parse'](_0x3bf8a7[_0x28f5fb(0x1c6)])});break;}case v[_0x28f5fb(0x1b2)]:{const _0x121137=(_0x20a4f0=this[_0x28f5fb(0x1c5)]['getUnit'](_0x3bf8a7['unitId'])['find'](_0x11741c=>_0x11741c[_0x28f5fb(0x1ca)]===_0x3bf8a7[_0x28f5fb(0x1ca)]))==null?void 0x0:_0x20a4f0['root'];_0x121137&&this[_0x28f5fb(0x1c5)][_0x28f5fb(0x194)](_0x2f00c5,_0x107d4c,_0x121137['id'],_0x3bf8a7[_0x28f5fb(0x1c9)]===I[_0x28f5fb(0x193)]);break;}}}));}};_=V([p(0x0,_0x5f1365(_0x345965)),p(0x1,_0x5f1365(_0x536eda)),p(0x2,_0x5f1365(_0x47edab)),p(0x3,_0x5f1365(_0xfec9d0))],_);const z=_0x34cd0f(0x18f),O={};var k=Object[_0x34cd0f(0x1cf)],Q=(_0x7bbc2d,_0x1ae23a,_0x4fdd3b,_0x1a5d5e)=>{const _0x3872c3=_0x34cd0f;for(var _0x27a78f=_0x1a5d5e>0x1?void 0x0:_0x1a5d5e?k(_0x1ae23a,_0x4fdd3b):_0x1ae23a,_0x23b57b=_0x7bbc2d[_0x3872c3(0x1a7)]-0x1,_0x115d7b;_0x23b57b>=0x0;_0x23b57b--)(_0x115d7b=_0x7bbc2d[_0x23b57b])&&(_0x27a78f=_0x115d7b(_0x27a78f)||_0x27a78f);return _0x27a78f;},b=(_0x415e2d,_0x58bc59)=>(_0x338049,_0x285175)=>_0x58bc59(_0x338049,_0x285175,_0x415e2d);function X(_0x2500ee,_0x56965f){const _0x4b21e3=_0x34cd0f,_0x26c5dd=_0x2500ee['replies'][0x0];return{..._0x56965f,'id':_0x26c5dd[_0x4b21e3(0x1c3)],'resolved':_0x2500ee[_0x4b21e3(0x1c9)]===0x1,'dT':y(_0x26c5dd[_0x4b21e3(0x19f)]),'personId':_0x26c5dd[_0x4b21e3(0x1d9)],'threadId':_0x26c5dd[_0x4b21e3(0x1ca)]};}function ee(_0x134b54,_0x35f54f,_0x3f302d){const _0x1bee14=_0x34cd0f;var _0x378188,_0x505fee;if(((_0x505fee=(_0x378188=_0x134b54==null?void 0x0:_0x134b54[_0x1bee14(0x1aa)])==null?void 0x0:_0x378188['length'])!=null?_0x505fee:0x0)>0x0){const _0x30a84f=(_0xc06a07,_0x3f46ed)=>({'id':_0xc06a07[_0x1bee14(0x1c3)],'threadId':_0xc06a07[_0x1bee14(0x1ca)],'dT':y(_0xc06a07[_0x1bee14(0x19f)]),'personId':_0xc06a07['userId'],'resolved':_0x134b54[_0x1bee14(0x1c9)]===I['Solved'],'unitId':_0x35f54f,'subUnitId':_0x3f302d,'text':JSON['parse'](_0xc06a07['content']),'parentId':_0x3f46ed}),_0x163d69=_0x30a84f(_0x134b54[_0x1bee14(0x1aa)][0x0]);return{..._0x163d69,'children':_0x134b54[_0x1bee14(0x1aa)]['slice'](0x1)[_0x1bee14(0x1b9)](_0x2d0d1f=>_0x30a84f(_0x2d0d1f,_0x163d69['id']))};}return null;}let S=class{constructor(_0x421fc0,_0x3b6337,_0x4de77c){const _0x2ac3e4=_0x34cd0f;this[_0x2ac3e4(0x1b6)]=_0x421fc0,this[_0x2ac3e4(0x1df)]=_0x3b6337,this[_0x2ac3e4(0x182)]=_0x4de77c;}async['addComment'](_0x1ddbdf){const _0x1163de=_0x34cd0f;var _0x57d1c3,_0x51c6a4;const {parentId:_0x4e0b09,unitId:_0x5bd73d,text:_0x347ba3,threadId:_0x530083}=_0x1ddbdf,_0x4371d5=(_0x51c6a4=(_0x57d1c3=_0x347ba3['customRanges'])==null?void 0x0:_0x57d1c3['filter'](_0x32a915=>_0x32a915[_0x1163de(0x1ba)]===_0x26afc4[_0x1163de(0x18c)])[_0x1163de(0x1b9)](_0x3fd19a=>_0x3fd19a[_0x1163de(0x187)]))!=null?_0x51c6a4:[],_0x1a1334=JSON['stringify'](_0x347ba3),_0x3c0ff1=(await this[_0x1163de(0x182)][_0x1163de(0x1e2)](_0x5bd73d))[_0x1163de(0x189)]();if(_0x4e0b09){const _0x1663a6={'memberId':_0x3c0ff1,'unitId':_0x5bd73d,'content':_0x1a1334,'mention':_0x4371d5,'threadId':_0x530083},_0x2835f9=(await this[_0x1163de(0x1b6)][_0x1163de(0x1c7)](_0x1163de(0x1af)+_0x5bd73d+_0x1163de(0x1a8),{'body':_0x1663a6}))[_0x1163de(0x1ae)][_0x1163de(0x1b5)];return{..._0x1ddbdf,'id':_0x2835f9[_0x1163de(0x1c3)],'dT':_0x1ef42e(+_0x2835f9[_0x1163de(0x19f)])[_0x1163de(0x19e)](_0x1163de(0x1c0)),'personId':_0x2835f9[_0x1163de(0x1d9)]};}else{const _0x58627b={'memberId':_0x3c0ff1,'unitId':_0x5bd73d,'content':_0x1a1334,'mention':_0x4371d5},_0x1e3a23=await this[_0x1163de(0x1b6)][_0x1163de(0x1c7)]('/universer-api/comment/unit/'+_0x5bd73d+_0x1163de(0x186),{'body':_0x58627b});return X(_0x1e3a23[_0x1163de(0x1ae)][_0x1163de(0x1db)],_0x1ddbdf);}}async['updateComment'](_0x1fbed6){const _0x46e073=_0x34cd0f;var _0x5dd507,_0x54e6f3;const {text:_0x1ea240,unitId:_0x4e9dc5}=_0x1fbed6,_0x3f8b9f=(_0x54e6f3=(_0x5dd507=_0x1ea240[_0x46e073(0x1bc)])==null?void 0x0:_0x5dd507[_0x46e073(0x1ce)](_0x1374d9=>_0x1374d9[_0x46e073(0x1ba)]===_0x26afc4[_0x46e073(0x18c)])[_0x46e073(0x1b9)](_0x6eca30=>_0x6eca30[_0x46e073(0x187)]))!=null?_0x54e6f3:[],_0x25a2f6=JSON['stringify'](_0x1ea240),_0x401db9=_0x1fbed6['threadId'],_0x2c1cca=_0x1fbed6['id'],_0x3cc194={'memberId':(await this[_0x46e073(0x182)]['requireSession'](_0x4e9dc5))['getMemberID'](),'unitId':_0x4e9dc5,'threadId':_0x401db9,'mention':_0x3f8b9f,'content':_0x25a2f6,'replyId':_0x2c1cca},_0x6bb188=await this[_0x46e073(0x1b6)]['post']('/universer-api/comment/unit/'+_0x4e9dc5+_0x46e073(0x1ac),{'body':_0x3cc194});return!_0x6bb188[_0x46e073(0x1ae)]['error']||_0x6bb188['body'][_0x46e073(0x17f)][_0x46e073(0x190)]===0x1;}async[_0x34cd0f(0x194)](_0x14e6bc){const _0x5e45dd=_0x34cd0f,{unitId:_0x711a5e}=_0x14e6bc,_0x1252d1=_0x14e6bc[_0x5e45dd(0x1ca)],_0x59f32d={'memberId':this['_userService'][_0x5e45dd(0x1c8)]()[_0x5e45dd(0x1c1)],'unitId':_0x711a5e,'threadId':_0x1252d1,'solved':_0x14e6bc[_0x5e45dd(0x1b1)]?I[_0x5e45dd(0x193)]:I[_0x5e45dd(0x1da)]},_0x3fa298=await this[_0x5e45dd(0x1b6)][_0x5e45dd(0x1c7)]('/universer-api/comment/unit/'+_0x711a5e+_0x5e45dd(0x1bb),{'body':_0x59f32d});return!_0x3fa298[_0x5e45dd(0x1ae)]['error']||_0x3fa298['body']['error'][_0x5e45dd(0x190)]===0x1;}async[_0x34cd0f(0x199)](_0x48ecfe,_0x357604,_0x1427cc,_0x2f97ec){const _0x25be34=_0x34cd0f,_0x5d3282={'memberId':(await this['_sessionService'][_0x25be34(0x1e2)](_0x48ecfe))[_0x25be34(0x189)](),'threadId':_0x1427cc,'replyId':_0x2f97ec,'unitId':_0x48ecfe},_0x40fcd0=await this[_0x25be34(0x1b6)][_0x25be34(0x1c7)](_0x25be34(0x1af)+_0x48ecfe+_0x25be34(0x19d),{'body':_0x5d3282});return!_0x40fcd0[_0x25be34(0x1ae)][_0x25be34(0x17f)]||_0x40fcd0[_0x25be34(0x1ae)][_0x25be34(0x17f)]['code']===0x1;}async[_0x34cd0f(0x1a6)](_0x270877,_0x918cc4,_0x3ac678){const _0x11933c=_0x34cd0f,_0x39e3fc={'unitId':_0x270877,'threadId':_0x3ac678},_0x42b38b=await this['_httpService'][_0x11933c(0x1c7)](_0x11933c(0x1af)+_0x270877+_0x11933c(0x1dd),{'body':_0x39e3fc}),_0x5f2244=_0x3ac678[_0x11933c(0x1b9)](_0x3b2d43=>ee(_0x42b38b[_0x11933c(0x1ae)]['comments'][_0x3b2d43],_0x270877,_0x918cc4))[_0x11933c(0x1ce)](Boolean);return Object[_0x11933c(0x18e)](_0x42b38b[_0x11933c(0x1ae)][_0x11933c(0x18b)])['forEach'](_0x2d4e40=>{const _0x1cc2cc=_0x11933c;this[_0x1cc2cc(0x1df)][_0x1cc2cc(0x1d7)](_0x2d4e40);}),_0x5f2244;}[_0x34cd0f(0x1a5)](_0x5a3a5f){const _0xd14fca=_0x34cd0f;return{'id':_0x5a3a5f['id'],'threadId':_0x5a3a5f[_0xd14fca(0x1ca)],'ref':_0x5a3a5f[_0xd14fca(0x197)]};}};S=Q([b(0x0,_0x5f1365(_0x3b5283)),b(0x1,_0x5f1365(_0x47edab)),b(0x2,_0x5f1365(_0x362bab))],S);var re=Object[_0x34cd0f(0x1cf)],te=(_0x5bb29f,_0x328e7d,_0x350593,_0x33526c)=>{const _0x2c6c85=_0x34cd0f;for(var _0x26c93e=_0x33526c>0x1?void 0x0:_0x33526c?re(_0x328e7d,_0x350593):_0x328e7d,_0x113a34=_0x5bb29f[_0x2c6c85(0x1a7)]-0x1,_0x551ce6;_0x113a34>=0x0;_0x113a34--)(_0x551ce6=_0x5bb29f[_0x113a34])&&(_0x26c93e=_0x551ce6(_0x26c93e)||_0x26c93e);return _0x26c93e;},M=(_0x519bc4,_0x15fae2)=>(_0x18d3ca,_0x516d9c)=>_0x15fae2(_0x18d3ca,_0x516d9c,_0x519bc4);let f=class extends _0x256cca{constructor(_0x27f0d6,_0x7d827a){const _0xb0efe1=_0x34cd0f;super(),this[_0xb0efe1(0x181)]=_0x27f0d6,this['_threadCommentDataSource']=_0x7d827a,this['_initDataSource']();}[_0x34cd0f(0x180)](){const _0x3f6911=_0x34cd0f;this['_threadCommentDataSourceService'][_0x3f6911(0x17d)]=this[_0x3f6911(0x1d0)],this[_0x3f6911(0x181)][_0x3f6911(0x1b8)]=!0x1;}};f=te([M(0x0,_0x47b26d),M(0x1,_0x5f1365(S))],f);var se=Object[_0x34cd0f(0x1e0)],oe=Object[_0x34cd0f(0x1cf)],ne=(_0x160038,_0x2eff11,_0x3deba0)=>_0x2eff11 in _0x160038?se(_0x160038,_0x2eff11,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3deba0}):_0x160038[_0x2eff11]=_0x3deba0,ie=(_0x4a9934,_0x26a63f,_0x6ea484,_0xe8fb86)=>{const _0x502369=_0x34cd0f;for(var _0x1479da=_0xe8fb86>0x1?void 0x0:_0xe8fb86?oe(_0x26a63f,_0x6ea484):_0x26a63f,_0x407bb7=_0x4a9934[_0x502369(0x1a7)]-0x1,_0x47869d;_0x407bb7>=0x0;_0x407bb7--)(_0x47869d=_0x4a9934[_0x407bb7])&&(_0x1479da=_0x47869d(_0x1479da)||_0x1479da);return _0x1479da;},N=(_0x403e54,_0x36578c)=>(_0x114a0d,_0x18d4f3)=>_0x36578c(_0x114a0d,_0x18d4f3,_0x403e54),$=(_0x35f42a,_0x3b58cb,_0x5a22ed)=>ne(_0x35f42a,typeof _0x3b58cb!=_0x34cd0f(0x17e)?_0x3b58cb+'':_0x3b58cb,_0x5a22ed);let g=class extends _0x4f1cb3{constructor(_0x1a09c4=O,_0x29f34b,_0xa2370a){const _0x597cbb=_0x34cd0f;super(),this[_0x597cbb(0x1cc)]=_0x1a09c4,this[_0x597cbb(0x1a1)]=_0x29f34b,this['_configService']=_0xa2370a;const {..._0x4ebb7a}=_0x41f525({},O,this[_0x597cbb(0x1cc)]);this['_configService'][_0x597cbb(0x1b3)](z,_0x4ebb7a);}[_0x34cd0f(0x1d6)](){const _0x1cc64b=_0x34cd0f;[[S],[f],[_]][_0x1cc64b(0x185)](_0x1cfa86=>{const _0x399ed4=_0x1cc64b;this[_0x399ed4(0x1a1)]['add'](_0x1cfa86);});}[_0x34cd0f(0x1d4)](){const _0x4d63a5=_0x34cd0f;this[_0x4d63a5(0x1a1)][_0x4d63a5(0x188)](f),this['_injector'][_0x4d63a5(0x188)](_);}};$(g,_0x34cd0f(0x1b7),W),$(g,_0x34cd0f(0x17b),_0x2c3502[_0x34cd0f(0x1a9)]),g=ie([_0x4bd4b8(_0x40c8ff,_0x3b7d8f,_0x13449b),N(0x1,_0x5f1365(_0xfec9d0)),N(0x2,_0x4b5188)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x426fd8=_0x35e5;(function(_0x5da0cc,_0x1df22f){const _0x5a3916=_0x35e5,_0x2ac6b0=_0x5da0cc();while(!![]){try{const _0xfe74f0=parseInt(_0x5a3916(0x139))/0x1*(parseInt(_0x5a3916(0x116))/0x2)+-parseInt(_0x5a3916(0x179))/0x3*(-parseInt(_0x5a3916(0x16d))/0x4)+parseInt(_0x5a3916(0x17d))/0x5+-parseInt(_0x5a3916(0x158))/0x6+parseInt(_0x5a3916(0x14b))/0x7*(-parseInt(_0x5a3916(0x16b))/0x8)+parseInt(_0x5a3916(0x174))/0x9*(parseInt(_0x5a3916(0x154))/0xa)+parseInt(_0x5a3916(0x166))/0xb*(-parseInt(_0x5a3916(0x129))/0xc);if(_0xfe74f0===_0x1df22f)break;else _0x2ac6b0['push'](_0x2ac6b0['shift']());}catch(_0xb37a07){_0x2ac6b0['push'](_0x2ac6b0['shift']());}}}(_0x1048,0xdb308));import{CommentService as _0x3a15b6,CollaborationSessionService as _0x44c5cb,UniverCollaborationClientPlugin as _0x39432b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3618e3}from'@univerjs-pro/license';import{dayjs as _0xc6ba85,UserManagerService as _0x44cabc,Inject as _0x4ee146,Injector as _0x52b0e2,Disposable as _0x1cb851,CustomRangeType as _0x23dce0,UniverInstanceType as _0x29b4b7,DependentOn as _0x537f52,IConfigService as _0x4f31e8,Plugin as _0x42e39d,merge as _0x2d8dad}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42ba3c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xb8419e,IThreadCommentDataSourceService as _0x4fbd0e}from'@univerjs/thread-comment';import{bufferTime as _0x4e28a0}from'rxjs';import{HTTPService as _0x28ab9a}from'@univerjs/network';function _0x35e5(_0x48b50c,_0x6d8e72){const _0x1048ad=_0x1048();return _0x35e5=function(_0x35e517,_0x454aa4){_0x35e517=_0x35e517-0x116;let _0x109e93=_0x1048ad[_0x35e517];return _0x109e93;},_0x35e5(_0x48b50c,_0x6d8e72);}const W=_0x426fd8(0x125);var I=(_0x536bf7=>(_0x536bf7[_0x536bf7[_0x426fd8(0x153)]=0x0]=_0x426fd8(0x153),_0x536bf7[_0x536bf7[_0x426fd8(0x171)]=0x1]=_0x426fd8(0x171),_0x536bf7[_0x536bf7[_0x426fd8(0x168)]=-0x1]=_0x426fd8(0x168),_0x536bf7))(I||{}),v=(_0x4efc0e=>(_0x4efc0e[_0x4efc0e[_0x426fd8(0x160)]=0x0]=_0x426fd8(0x160),_0x4efc0e[_0x4efc0e[_0x426fd8(0x123)]=0x1]=_0x426fd8(0x123),_0x4efc0e[_0x4efc0e[_0x426fd8(0x164)]=0x2]='Reply',_0x4efc0e[_0x4efc0e[_0x426fd8(0x162)]=0x3]=_0x426fd8(0x162),_0x4efc0e[_0x4efc0e[_0x426fd8(0x17b)]=0x4]=_0x426fd8(0x17b),_0x4efc0e[_0x4efc0e[_0x426fd8(0x122)]=0x5]=_0x426fd8(0x122),_0x4efc0e[_0x4efc0e['UNRECOGNIZED']=-0x1]=_0x426fd8(0x168),_0x4efc0e))(v||{});const y=_0x1c4649=>_0xc6ba85(new Date(+_0x1c4649))[_0x426fd8(0x15c)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3b0632,_0x5593e6)=>{const _0x2a22f4=_0x426fd8,_0x355534=_0x3b0632[_0x2a22f4(0x140)](_0x44cabc),_0x1f3894=_0x3b0632['get'](_0x28ab9a);_0x5593e6[_0x2a22f4(0x15a)](_0x2916f3=>{const _0x378335=_0x2a22f4;_0x355534[_0x378335(0x15e)](_0x2916f3)&&_0x5593e6[_0x378335(0x134)](_0x2916f3);}),_0x5593e6['size']&&(await _0x1f3894[_0x2a22f4(0x140)](_0x2a22f4(0x17c),{'params':{'userIDs':[..._0x5593e6]}}))[_0x2a22f4(0x12f)][_0x2a22f4(0x16a)]['forEach'](_0xd97f25=>{_0xd97f25&&_0x355534['addUser'](_0xd97f25);});};var K=Object['getOwnPropertyDescriptor'],V=(_0xe13614,_0xe94754,_0x5599bb,_0x109411)=>{for(var _0x4ad2e3=_0x109411>0x1?void 0x0:_0x109411?K(_0xe94754,_0x5599bb):_0xe94754,_0x439136=_0xe13614['length']-0x1,_0x36f027;_0x439136>=0x0;_0x439136--)(_0x36f027=_0xe13614[_0x439136])&&(_0x4ad2e3=_0x36f027(_0x4ad2e3)||_0x4ad2e3);return _0x4ad2e3;},p=(_0x3f9d2e,_0x554f36)=>(_0x1928b7,_0x186b62)=>_0x554f36(_0x1928b7,_0x186b62,_0x3f9d2e);let _=class extends _0x1cb851{constructor(_0xa2a973,_0x19b392,_0x45daf1,_0x7753c7){const _0x5db985=_0x426fd8;super(),this[_0x5db985(0x152)]=_0xa2a973,this[_0x5db985(0x16c)]=_0x19b392,this[_0x5db985(0x15f)]=_0x45daf1,this[_0x5db985(0x150)]=_0x7753c7,this[_0x5db985(0x149)](),this[_0x5db985(0x12b)]();}['_initUserSync'](){const _0x5d4068=_0x426fd8;this[_0x5d4068(0x151)](this[_0x5d4068(0x16c)][_0x5d4068(0x12e)][_0x5d4068(0x161)](_0x4e28a0(0x10))[_0x5d4068(0x127)](_0x44eeb5=>{const _0x561c0e=_0x5d4068,_0x2b6737=new Set();_0x44eeb5[_0x561c0e(0x15a)](_0xa04051=>{const _0x5d0426=_0x561c0e;switch(_0xa04051[_0x5d0426(0x159)]){case'add':{const _0x1afdf0=_0xa04051[_0x5d0426(0x155)]['personId'];_0x2b6737[_0x5d0426(0x15b)](_0x1afdf0);break;}}}),B(this['_injector'],_0x2b6737);}));}[_0x426fd8(0x149)](){const _0x2fa025=_0x426fd8;this[_0x2fa025(0x151)](this['_commentService']['commentUpdate$'][_0x2fa025(0x127)](async _0xa7df47=>{const _0x1210b6=_0x2fa025;var _0xfcfd8,_0x3f2b15,_0x5e3f48,_0x2174d2;const _0x3d74fe=(_0xfcfd8=this[_0x1210b6(0x16c)][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])['find'](_0x42a028=>_0x42a028[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0xfcfd8[_0x1210b6(0x133)];if(!_0x3d74fe)return;const {unitId:_0x4b6ce1,subUnitId:_0x572fdd}=_0x3d74fe;switch(_0xa7df47[_0x1210b6(0x136)]&&this['_userService']['addUser'](_0xa7df47[_0x1210b6(0x136)]),_0xa7df47[_0x1210b6(0x159)]){case v[_0x1210b6(0x123)]:break;case v['Reply']:{this[_0x1210b6(0x16c)][_0x1210b6(0x11b)](_0x4b6ce1,_0x572fdd,{'unitId':_0x4b6ce1,'subUnitId':_0x572fdd,'ref':'','id':_0xa7df47['replyId'],'dT':y(+_0xa7df47[_0x1210b6(0x14f)]),'threadId':_0xa7df47[_0x1210b6(0x173)],'personId':(_0x5e3f48=(_0x3f2b15=_0xa7df47[_0x1210b6(0x136)])==null?void 0x0:_0x3f2b15[_0x1210b6(0x14c)])!=null?_0x5e3f48:_0xa7df47['userId'],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content']),'parentId':_0x3d74fe['id']});break;}case v[_0x1210b6(0x17b)]:{const _0x432efd=this[_0x1210b6(0x16c)][_0x1210b6(0x128)](_0x4b6ce1,_0x572fdd,_0xa7df47['replyId']);_0x432efd&&_0x432efd[_0x1210b6(0x11e)]&&this['_threadCommentModel']['deleteComment'](_0x4b6ce1,_0x572fdd,_0xa7df47[_0x1210b6(0x148)]);break;}case v[_0x1210b6(0x162)]:{this[_0x1210b6(0x16c)][_0x1210b6(0x117)](_0x4b6ce1,_0x572fdd,{'commentId':_0xa7df47[_0x1210b6(0x148)],'text':JSON[_0x1210b6(0x130)](_0xa7df47['content'])});break;}case v[_0x1210b6(0x122)]:{const _0x1bf870=(_0x2174d2=this['_threadCommentModel'][_0x1210b6(0x14d)](_0xa7df47[_0x1210b6(0x13b)])[_0x1210b6(0x118)](_0x318d13=>_0x318d13[_0x1210b6(0x173)]===_0xa7df47[_0x1210b6(0x173)]))==null?void 0x0:_0x2174d2['root'];_0x1bf870&&this[_0x1210b6(0x16c)]['resolveComment'](_0x4b6ce1,_0x572fdd,_0x1bf870['id'],_0xa7df47['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x4ee146(_0x3a15b6)),p(0x1,_0x4ee146(_0xb8419e)),p(0x2,_0x4ee146(_0x44cabc)),p(0x3,_0x4ee146(_0x52b0e2))],_);function _0x1048(){const _0x2f6de5=['_threadCommentModel','4TZGKIp','error','/solved','symbol','Solved','UNIVER_UNKNOWN','threadId','9uqpsag','COMMENT','slice','getOwnPropertyDescriptor','/edit','2092509afUKxH','solved','Delete','/universer-api/user/list','4804470WyjOex','requireSession','6sCWnfQ','updateComment','find','getCurrentUser','filter','addComment','addUser','length','parentId','rangeId','_httpService','thread-comment-data-source.config','Solve','Add','saveCommentToSnapshot','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','subscribe','getComment','5126496mVinYO','_config','_initUserSync','resolved','/add','commentUpdate$','body','parse','stringify','userId','root','delete','_sessionService','user','dataSource','ref','388667MJeums','setConfig','unitId','/universer-api/comment/unit/','_threadCommentDataSource','_initDataSource','code','get','YYYY/MM/DD\x20HH:mm','reply','deleteComment','defineProperty','getMemberID','map','onStarting','replyId','_init','rangeType','9427411QohKAT','userID','getUnit','post','createTimestamp','_injector','disposeWithMe','_commentService','OpenOrReOpen','1080110FjlzJi','payload','comment','replies','1563768diwUks','type','forEach','add','format','values','getUser','_userService','Unknown','pipe','Edit','_configService','Reply','_threadCommentDataSourceService','11rLNvVm','/delete','UNRECOGNIZED','/reply','users','8nrdXnY'];_0x1048=function(){return _0x2f6de5;};return _0x1048();}const z=_0x426fd8(0x121),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x4f5c1e,_0x3b8dfc,_0x404569,_0x34deb2)=>{const _0x291939=_0x426fd8;for(var _0x2855e8=_0x34deb2>0x1?void 0x0:_0x34deb2?k(_0x3b8dfc,_0x404569):_0x3b8dfc,_0x293ba3=_0x4f5c1e[_0x291939(0x11d)]-0x1,_0x1b68f3;_0x293ba3>=0x0;_0x293ba3--)(_0x1b68f3=_0x4f5c1e[_0x293ba3])&&(_0x2855e8=_0x1b68f3(_0x2855e8)||_0x2855e8);return _0x2855e8;},b=(_0x2d815e,_0x8cbb2)=>(_0x21a46c,_0x421439)=>_0x8cbb2(_0x21a46c,_0x421439,_0x2d815e);function X(_0x132ece,_0xa54595){const _0x1aa235=_0x426fd8,_0x1dca2c=_0x132ece[_0x1aa235(0x157)][0x0];return{..._0xa54595,'id':_0x1dca2c['replyId'],'resolved':_0x132ece[_0x1aa235(0x17a)]===0x1,'dT':y(_0x1dca2c[_0x1aa235(0x14f)]),'personId':_0x1dca2c[_0x1aa235(0x132)],'threadId':_0x1dca2c[_0x1aa235(0x173)]};}function ee(_0x46f5cd,_0x12f5d2,_0x2c5f2e){const _0xeedfeb=_0x426fd8;var _0x5a1c95,_0x4d1b5e;if(((_0x4d1b5e=(_0x5a1c95=_0x46f5cd==null?void 0x0:_0x46f5cd[_0xeedfeb(0x157)])==null?void 0x0:_0x5a1c95[_0xeedfeb(0x11d)])!=null?_0x4d1b5e:0x0)>0x0){const _0x465a71=(_0x1b385a,_0x33799c)=>({'id':_0x1b385a['replyId'],'threadId':_0x1b385a[_0xeedfeb(0x173)],'dT':y(_0x1b385a[_0xeedfeb(0x14f)]),'personId':_0x1b385a[_0xeedfeb(0x132)],'resolved':_0x46f5cd[_0xeedfeb(0x17a)]===I[_0xeedfeb(0x171)],'unitId':_0x12f5d2,'subUnitId':_0x2c5f2e,'text':JSON[_0xeedfeb(0x130)](_0x1b385a['content']),'parentId':_0x33799c}),_0x19e897=_0x465a71(_0x46f5cd[_0xeedfeb(0x157)][0x0]);return{..._0x19e897,'children':_0x46f5cd[_0xeedfeb(0x157)][_0xeedfeb(0x176)](0x1)[_0xeedfeb(0x146)](_0xe877b9=>_0x465a71(_0xe877b9,_0x19e897['id']))};}return null;}let S=class{constructor(_0x582d0c,_0x3ec22f,_0x38ac2){const _0x55bca0=_0x426fd8;this['_httpService']=_0x582d0c,this[_0x55bca0(0x15f)]=_0x3ec22f,this[_0x55bca0(0x135)]=_0x38ac2;}async['addComment'](_0x16f9fd){const _0x281596=_0x426fd8;var _0x17661d,_0x48e716;const {parentId:_0x13a13d,unitId:_0xd2379a,text:_0x28fbbf,threadId:_0x2eecf1}=_0x16f9fd,_0x103558=(_0x48e716=(_0x17661d=_0x28fbbf['customRanges'])==null?void 0x0:_0x17661d[_0x281596(0x11a)](_0x16bbf1=>_0x16bbf1[_0x281596(0x14a)]===_0x23dce0['COMMENT'])[_0x281596(0x146)](_0x5ad427=>_0x5ad427[_0x281596(0x11f)]))!=null?_0x48e716:[],_0x39d9cd=JSON[_0x281596(0x131)](_0x28fbbf),_0x5a320c=(await this[_0x281596(0x135)][_0x281596(0x17e)](_0xd2379a))[_0x281596(0x145)]();if(_0x13a13d){const _0x52122c={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558,'threadId':_0x2eecf1},_0x4dab53=(await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x169),{'body':_0x52122c}))[_0x281596(0x12f)][_0x281596(0x142)];return{..._0x16f9fd,'id':_0x4dab53[_0x281596(0x148)],'dT':_0xc6ba85(+_0x4dab53[_0x281596(0x14f)])[_0x281596(0x15c)](_0x281596(0x141)),'personId':_0x4dab53['userId']};}else{const _0x50cb7f={'memberId':_0x5a320c,'unitId':_0xd2379a,'content':_0x39d9cd,'mention':_0x103558},_0x26c423=await this[_0x281596(0x120)]['post'](_0x281596(0x13c)+_0xd2379a+_0x281596(0x12d),{'body':_0x50cb7f});return X(_0x26c423[_0x281596(0x12f)][_0x281596(0x156)],_0x16f9fd);}}async[_0x426fd8(0x117)](_0x289351){const _0x54a752=_0x426fd8;var _0x488b00,_0x4d462f;const {text:_0x2066ac,unitId:_0x3ec9cd}=_0x289351,_0x5ae0c3=(_0x4d462f=(_0x488b00=_0x2066ac['customRanges'])==null?void 0x0:_0x488b00[_0x54a752(0x11a)](_0x1243bb=>_0x1243bb[_0x54a752(0x14a)]===_0x23dce0[_0x54a752(0x175)])['map'](_0x315824=>_0x315824['rangeId']))!=null?_0x4d462f:[],_0x5068be=JSON[_0x54a752(0x131)](_0x2066ac),_0x3b1c54=_0x289351[_0x54a752(0x173)],_0x29bd71=_0x289351['id'],_0x4270a4={'memberId':(await this[_0x54a752(0x135)][_0x54a752(0x17e)](_0x3ec9cd))[_0x54a752(0x145)](),'unitId':_0x3ec9cd,'threadId':_0x3b1c54,'mention':_0x5ae0c3,'content':_0x5068be,'replyId':_0x29bd71},_0x407fe5=await this[_0x54a752(0x120)][_0x54a752(0x14e)](_0x54a752(0x13c)+_0x3ec9cd+_0x54a752(0x178),{'body':_0x4270a4});return!_0x407fe5[_0x54a752(0x12f)]['error']||_0x407fe5[_0x54a752(0x12f)][_0x54a752(0x16e)][_0x54a752(0x13f)]===0x1;}async['resolveComment'](_0x3b3c5d){const _0x1591d1=_0x426fd8,{unitId:_0x5dff18}=_0x3b3c5d,_0x54d35d=_0x3b3c5d['threadId'],_0xddd362={'memberId':this[_0x1591d1(0x15f)][_0x1591d1(0x119)]()[_0x1591d1(0x14c)],'unitId':_0x5dff18,'threadId':_0x54d35d,'solved':_0x3b3c5d[_0x1591d1(0x12c)]?I[_0x1591d1(0x171)]:I[_0x1591d1(0x153)]},_0x19b2bd=await this[_0x1591d1(0x120)][_0x1591d1(0x14e)]('/universer-api/comment/unit/'+_0x5dff18+_0x1591d1(0x16f),{'body':_0xddd362});return!_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)]||_0x19b2bd[_0x1591d1(0x12f)][_0x1591d1(0x16e)][_0x1591d1(0x13f)]===0x1;}async[_0x426fd8(0x143)](_0x489852,_0x4def35,_0x11d4f9,_0x5bf2d7){const _0x35fc3d=_0x426fd8,_0x562f53={'memberId':(await this[_0x35fc3d(0x135)][_0x35fc3d(0x17e)](_0x489852))[_0x35fc3d(0x145)](),'threadId':_0x11d4f9,'replyId':_0x5bf2d7,'unitId':_0x489852},_0x320754=await this[_0x35fc3d(0x120)][_0x35fc3d(0x14e)](_0x35fc3d(0x13c)+_0x489852+_0x35fc3d(0x167),{'body':_0x562f53});return!_0x320754[_0x35fc3d(0x12f)]['error']||_0x320754[_0x35fc3d(0x12f)][_0x35fc3d(0x16e)]['code']===0x1;}async['listComments'](_0x2891af,_0x316a19,_0x219d18){const _0x149cc7=_0x426fd8,_0x2b59a5={'unitId':_0x2891af,'threadId':_0x219d18},_0x153a08=await this['_httpService'][_0x149cc7(0x14e)](_0x149cc7(0x13c)+_0x2891af+'/list',{'body':_0x2b59a5}),_0x478b45=_0x219d18[_0x149cc7(0x146)](_0x2035a3=>ee(_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x126)][_0x2035a3],_0x2891af,_0x316a19))['filter'](Boolean);return Object[_0x149cc7(0x15d)](_0x153a08[_0x149cc7(0x12f)][_0x149cc7(0x16a)])[_0x149cc7(0x15a)](_0x264ecd=>{const _0x1a0132=_0x149cc7;this[_0x1a0132(0x15f)][_0x1a0132(0x11c)](_0x264ecd);}),_0x478b45;}[_0x426fd8(0x124)](_0x18d8a2){const _0x433338=_0x426fd8;return{'id':_0x18d8a2['id'],'threadId':_0x18d8a2['threadId'],'ref':_0x18d8a2[_0x433338(0x138)]};}};S=Q([b(0x0,_0x4ee146(_0x28ab9a)),b(0x1,_0x4ee146(_0x44cabc)),b(0x2,_0x4ee146(_0x44c5cb))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x26f758,_0x106bb3,_0x45ea78,_0x2a3bfd)=>{const _0x118a55=_0x426fd8;for(var _0xf2e6cb=_0x2a3bfd>0x1?void 0x0:_0x2a3bfd?re(_0x106bb3,_0x45ea78):_0x106bb3,_0x3534cc=_0x26f758[_0x118a55(0x11d)]-0x1,_0x433e19;_0x3534cc>=0x0;_0x3534cc--)(_0x433e19=_0x26f758[_0x3534cc])&&(_0xf2e6cb=_0x433e19(_0xf2e6cb)||_0xf2e6cb);return _0xf2e6cb;},M=(_0x4e72bb,_0x1d0aa4)=>(_0x92c24d,_0x54b819)=>_0x1d0aa4(_0x92c24d,_0x54b819,_0x4e72bb);let f=class extends _0x1cb851{constructor(_0x534207,_0x3a2173){const _0x2de5a7=_0x426fd8;super(),this['_threadCommentDataSourceService']=_0x534207,this[_0x2de5a7(0x13d)]=_0x3a2173,this[_0x2de5a7(0x13e)]();}[_0x426fd8(0x13e)](){const _0x39a406=_0x426fd8;this[_0x39a406(0x165)][_0x39a406(0x137)]=this['_threadCommentDataSource'],this[_0x39a406(0x165)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x4fbd0e),M(0x1,_0x4ee146(S))],f);var se=Object[_0x426fd8(0x144)],oe=Object[_0x426fd8(0x177)],ne=(_0x284618,_0xebc38f,_0x4ee5f9)=>_0xebc38f in _0x284618?se(_0x284618,_0xebc38f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4ee5f9}):_0x284618[_0xebc38f]=_0x4ee5f9,ie=(_0x56b21e,_0x208850,_0x3fb898,_0x16d072)=>{for(var _0x2abac9=_0x16d072>0x1?void 0x0:_0x16d072?oe(_0x208850,_0x3fb898):_0x208850,_0x12b79f=_0x56b21e['length']-0x1,_0x51fb89;_0x12b79f>=0x0;_0x12b79f--)(_0x51fb89=_0x56b21e[_0x12b79f])&&(_0x2abac9=_0x51fb89(_0x2abac9)||_0x2abac9);return _0x2abac9;},N=(_0x23b47c,_0x4c5e7f)=>(_0x58ab05,_0x4c0313)=>_0x4c5e7f(_0x58ab05,_0x4c0313,_0x23b47c),$=(_0x4fdf5c,_0x18f4f6,_0x50dd21)=>ne(_0x4fdf5c,typeof _0x18f4f6!=_0x426fd8(0x170)?_0x18f4f6+'':_0x18f4f6,_0x50dd21);let g=class extends _0x42e39d{constructor(_0x4ce1c4=O,_0x55e41,_0x2666fe){const _0x5194c5=_0x426fd8;super(),this[_0x5194c5(0x12a)]=_0x4ce1c4,this['_injector']=_0x55e41,this[_0x5194c5(0x163)]=_0x2666fe;const {..._0x103b86}=_0x2d8dad({},O,this[_0x5194c5(0x12a)]);this[_0x5194c5(0x163)][_0x5194c5(0x13a)](z,_0x103b86);}[_0x426fd8(0x147)](){const _0x55db13=_0x426fd8;[[S],[f],[_]][_0x55db13(0x15a)](_0x21b936=>{const _0x18d1f0=_0x55db13;this[_0x18d1f0(0x150)][_0x18d1f0(0x15b)](_0x21b936);});}['onReady'](){const _0x588f58=_0x426fd8;this[_0x588f58(0x150)][_0x588f58(0x140)](f),this[_0x588f58(0x150)][_0x588f58(0x140)](_);}};$(g,'pluginName',W),$(g,_0x426fd8(0x159),_0x29b4b7[_0x426fd8(0x172)]),g=ie([_0x537f52(_0x42ba3c,_0x39432b,_0x3618e3),N(0x1,_0x4ee146(_0x52b0e2)),N(0x2,_0x4f31e8)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x34cd0f=_0x5aba;(function(_0x8545fb,_0x1ed292){const _0x264127=_0x5aba,_0x4d4067=_0x8545fb();while(!![]){try{const _0x1053f4=-parseInt(_0x264127(0x1dc))/0x1+parseInt(_0x264127(0x1cb))/0x2*(parseInt(_0x264127(0x198))/0x3)+parseInt(_0x264127(0x191))/0x4+-parseInt(_0x264127(0x184))/0x5*(-parseInt(_0x264127(0x1de))/0x6)+-parseInt(_0x264127(0x1be))/0x7*(parseInt(_0x264127(0x1b4))/0x8)+parseInt(_0x264127(0x1b0))/0x9*(-parseInt(_0x264127(0x1ab))/0xa)+-parseInt(_0x264127(0x1d1))/0xb*(-parseInt(_0x264127(0x17c))/0xc);if(_0x1053f4===_0x1ed292)break;else _0x4d4067['push'](_0x4d4067['shift']());}catch(_0x1240ae){_0x4d4067['push'](_0x4d4067['shift']());}}}(_0x1cd9,0xb8415));import{CommentService as _0x345965,CollaborationSessionService as _0x362bab,UniverCollaborationClientPlugin as _0x3b7d8f}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x13449b}from'@univerjs-pro/license';import{dayjs as _0x1ef42e,UserManagerService as _0x47edab,Inject as _0x5f1365,Injector as _0xfec9d0,Disposable as _0x256cca,CustomRangeType as _0x26afc4,UniverInstanceType as _0x2c3502,DependentOn as _0x4bd4b8,IConfigService as _0x4b5188,Plugin as _0x4f1cb3,merge as _0x41f525}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x40c8ff}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x536eda,IThreadCommentDataSourceService as _0x47b26d}from'@univerjs/thread-comment';function _0x5aba(_0x9989d1,_0x38ac48){const _0x1cd9b5=_0x1cd9();return _0x5aba=function(_0x5aba07,_0x34f7f0){_0x5aba07=_0x5aba07-0x17b;let _0x5743de=_0x1cd9b5[_0x5aba07];return _0x5743de;},_0x5aba(_0x9989d1,_0x38ac48);}import{bufferTime as _0x588322}from'rxjs';import{HTTPService as _0x3b5283}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x1cd9(){const _0x46a054=['comment','918438PfDueV','/list','78PImXIy','_userService','defineProperty','getUser','requireSession','type','5777832kgnpnX','dataSource','symbol','error','_initDataSource','_threadCommentDataSourceService','_sessionService','addComment','49520JzWcbH','forEach','/add','rangeId','get','getMemberID','commentUpdate$','users','COMMENT','pipe','values','thread-comment-data-source.config','code','4225516EHKUzo','Reply','Solved','resolveComment','_init','delete','ref','302613tsJfre','deleteComment','Edit','UNRECOGNIZED','_initUserSync','/delete','format','createTimestamp','size','_injector','subscribe','personId','getUnit','saveCommentToSnapshot','listComments','length','/reply','UNIVER_UNKNOWN','replies','1198420pWNnag','/edit','Add','body','/universer-api/comment/unit/','72wTmVZQ','resolved','Solve','setConfig','96QwdYgZ','reply','_httpService','pluginName','syncUpdateMutationToColla','map','rangeType','/solved','customRanges','_commentService','260708DulnQX','parse','YYYY/MM/DD\x20HH:mm','userID','user','replyId','Delete','_threadCommentModel','content','post','getCurrentUser','solved','threadId','28dYpjiF','_config','add','filter','getOwnPropertyDescriptor','_threadCommentDataSource','11XgTGrW','/universer-api/user/list','unitId','onReady','find','onStarting','addUser','payload','userId','OpenOrReOpen'];_0x1cd9=function(){return _0x46a054;};return _0x1cd9();}var I=(_0x2fe023=>(_0x2fe023[_0x2fe023[_0x34cd0f(0x1da)]=0x0]=_0x34cd0f(0x1da),_0x2fe023[_0x2fe023[_0x34cd0f(0x193)]=0x1]=_0x34cd0f(0x193),_0x2fe023[_0x2fe023[_0x34cd0f(0x19b)]=-0x1]=_0x34cd0f(0x19b),_0x2fe023))(I||{}),v=(_0x517f28=>(_0x517f28[_0x517f28['Unknown']=0x0]='Unknown',_0x517f28[_0x517f28[_0x34cd0f(0x1ad)]=0x1]=_0x34cd0f(0x1ad),_0x517f28[_0x517f28['Reply']=0x2]=_0x34cd0f(0x192),_0x517f28[_0x517f28['Edit']=0x3]=_0x34cd0f(0x19a),_0x517f28[_0x517f28[_0x34cd0f(0x1c4)]=0x4]=_0x34cd0f(0x1c4),_0x517f28[_0x517f28[_0x34cd0f(0x1b2)]=0x5]=_0x34cd0f(0x1b2),_0x517f28[_0x517f28[_0x34cd0f(0x19b)]=-0x1]=_0x34cd0f(0x19b),_0x517f28))(v||{});const y=_0x278855=>_0x1ef42e(new Date(+_0x278855))['format'](_0x34cd0f(0x1c0)),B=async(_0x3184e0,_0x11f2d1)=>{const _0x199d5a=_0x34cd0f,_0x6535e8=_0x3184e0[_0x199d5a(0x188)](_0x47edab),_0x5acdd8=_0x3184e0['get'](_0x3b5283);_0x11f2d1['forEach'](_0x205c1a=>{const _0x4fe08e=_0x199d5a;_0x6535e8[_0x4fe08e(0x1e1)](_0x205c1a)&&_0x11f2d1[_0x4fe08e(0x196)](_0x205c1a);}),_0x11f2d1[_0x199d5a(0x1a0)]&&(await _0x5acdd8[_0x199d5a(0x188)](_0x199d5a(0x1d2),{'params':{'userIDs':[..._0x11f2d1]}}))[_0x199d5a(0x1ae)][_0x199d5a(0x18b)][_0x199d5a(0x185)](_0x2fabfe=>{const _0x20d8b5=_0x199d5a;_0x2fabfe&&_0x6535e8[_0x20d8b5(0x1d7)](_0x2fabfe);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2bdb65,_0x196167,_0x535616,_0x5f228c)=>{for(var _0x413992=_0x5f228c>0x1?void 0x0:_0x5f228c?K(_0x196167,_0x535616):_0x196167,_0x568206=_0x2bdb65['length']-0x1,_0x56064d;_0x568206>=0x0;_0x568206--)(_0x56064d=_0x2bdb65[_0x568206])&&(_0x413992=_0x56064d(_0x413992)||_0x413992);return _0x413992;},p=(_0x518e98,_0x5621bd)=>(_0x70452,_0x85f42f)=>_0x5621bd(_0x70452,_0x85f42f,_0x518e98);let _=class extends _0x256cca{constructor(_0x527924,_0x139b27,_0x38f339,_0x1aeb2c){const _0x2125fb=_0x34cd0f;super(),this[_0x2125fb(0x1bd)]=_0x527924,this['_threadCommentModel']=_0x139b27,this[_0x2125fb(0x1df)]=_0x38f339,this[_0x2125fb(0x1a1)]=_0x1aeb2c,this['_init'](),this[_0x2125fb(0x19c)]();}[_0x34cd0f(0x19c)](){const _0x3a2280=_0x34cd0f;this['disposeWithMe'](this[_0x3a2280(0x1c5)][_0x3a2280(0x18a)][_0x3a2280(0x18d)](_0x588322(0x10))[_0x3a2280(0x1a2)](_0x54ae1c=>{const _0x560bf6=_0x3a2280,_0x3a5988=new Set();_0x54ae1c[_0x560bf6(0x185)](_0x522ec5=>{const _0x252da2=_0x560bf6;switch(_0x522ec5[_0x252da2(0x17b)]){case _0x252da2(0x1cd):{const _0x24c5c8=_0x522ec5[_0x252da2(0x1d8)][_0x252da2(0x1a3)];_0x3a5988[_0x252da2(0x1cd)](_0x24c5c8);break;}}}),B(this[_0x560bf6(0x1a1)],_0x3a5988);}));}[_0x34cd0f(0x195)](){const _0x390f77=_0x34cd0f;this['disposeWithMe'](this[_0x390f77(0x1bd)]['commentUpdate$'][_0x390f77(0x1a2)](async _0x3bf8a7=>{const _0x28f5fb=_0x390f77;var _0x290408,_0x146967,_0x3dfe3b,_0x20a4f0;const _0x944e41=(_0x290408=this[_0x28f5fb(0x1c5)][_0x28f5fb(0x1a4)](_0x3bf8a7[_0x28f5fb(0x1d3)])[_0x28f5fb(0x1d5)](_0x5327c1=>_0x5327c1[_0x28f5fb(0x1ca)]===_0x3bf8a7[_0x28f5fb(0x1ca)]))==null?void 0x0:_0x290408['root'];if(!_0x944e41)return;const {unitId:_0x2f00c5,subUnitId:_0x107d4c}=_0x944e41;switch(_0x3bf8a7[_0x28f5fb(0x1c2)]&&this[_0x28f5fb(0x1df)][_0x28f5fb(0x1d7)](_0x3bf8a7['user']),_0x3bf8a7[_0x28f5fb(0x17b)]){case v['Add']:break;case v[_0x28f5fb(0x192)]:{this[_0x28f5fb(0x1c5)][_0x28f5fb(0x183)](_0x2f00c5,_0x107d4c,{'unitId':_0x2f00c5,'subUnitId':_0x107d4c,'ref':'','id':_0x3bf8a7['replyId'],'dT':y(+_0x3bf8a7[_0x28f5fb(0x19f)]),'threadId':_0x3bf8a7[_0x28f5fb(0x1ca)],'personId':(_0x3dfe3b=(_0x146967=_0x3bf8a7[_0x28f5fb(0x1c2)])==null?void 0x0:_0x146967['userID'])!=null?_0x3dfe3b:_0x3bf8a7[_0x28f5fb(0x1d9)],'text':JSON[_0x28f5fb(0x1bf)](_0x3bf8a7['content']),'parentId':_0x944e41['id']});break;}case v[_0x28f5fb(0x1c4)]:{const _0x561995=this[_0x28f5fb(0x1c5)]['getComment'](_0x2f00c5,_0x107d4c,_0x3bf8a7[_0x28f5fb(0x1c3)]);_0x561995&&_0x561995['parentId']&&this[_0x28f5fb(0x1c5)][_0x28f5fb(0x199)](_0x2f00c5,_0x107d4c,_0x3bf8a7[_0x28f5fb(0x1c3)]);break;}case v['Edit']:{this[_0x28f5fb(0x1c5)]['updateComment'](_0x2f00c5,_0x107d4c,{'commentId':_0x3bf8a7[_0x28f5fb(0x1c3)],'text':JSON['parse'](_0x3bf8a7[_0x28f5fb(0x1c6)])});break;}case v[_0x28f5fb(0x1b2)]:{const _0x121137=(_0x20a4f0=this[_0x28f5fb(0x1c5)]['getUnit'](_0x3bf8a7['unitId'])['find'](_0x11741c=>_0x11741c[_0x28f5fb(0x1ca)]===_0x3bf8a7[_0x28f5fb(0x1ca)]))==null?void 0x0:_0x20a4f0['root'];_0x121137&&this[_0x28f5fb(0x1c5)][_0x28f5fb(0x194)](_0x2f00c5,_0x107d4c,_0x121137['id'],_0x3bf8a7[_0x28f5fb(0x1c9)]===I[_0x28f5fb(0x193)]);break;}}}));}};_=V([p(0x0,_0x5f1365(_0x345965)),p(0x1,_0x5f1365(_0x536eda)),p(0x2,_0x5f1365(_0x47edab)),p(0x3,_0x5f1365(_0xfec9d0))],_);const z=_0x34cd0f(0x18f),O={};var k=Object[_0x34cd0f(0x1cf)],Q=(_0x7bbc2d,_0x1ae23a,_0x4fdd3b,_0x1a5d5e)=>{const _0x3872c3=_0x34cd0f;for(var _0x27a78f=_0x1a5d5e>0x1?void 0x0:_0x1a5d5e?k(_0x1ae23a,_0x4fdd3b):_0x1ae23a,_0x23b57b=_0x7bbc2d[_0x3872c3(0x1a7)]-0x1,_0x115d7b;_0x23b57b>=0x0;_0x23b57b--)(_0x115d7b=_0x7bbc2d[_0x23b57b])&&(_0x27a78f=_0x115d7b(_0x27a78f)||_0x27a78f);return _0x27a78f;},b=(_0x415e2d,_0x58bc59)=>(_0x338049,_0x285175)=>_0x58bc59(_0x338049,_0x285175,_0x415e2d);function X(_0x2500ee,_0x56965f){const _0x4b21e3=_0x34cd0f,_0x26c5dd=_0x2500ee['replies'][0x0];return{..._0x56965f,'id':_0x26c5dd[_0x4b21e3(0x1c3)],'resolved':_0x2500ee[_0x4b21e3(0x1c9)]===0x1,'dT':y(_0x26c5dd[_0x4b21e3(0x19f)]),'personId':_0x26c5dd[_0x4b21e3(0x1d9)],'threadId':_0x26c5dd[_0x4b21e3(0x1ca)]};}function ee(_0x134b54,_0x35f54f,_0x3f302d){const _0x1bee14=_0x34cd0f;var _0x378188,_0x505fee;if(((_0x505fee=(_0x378188=_0x134b54==null?void 0x0:_0x134b54[_0x1bee14(0x1aa)])==null?void 0x0:_0x378188['length'])!=null?_0x505fee:0x0)>0x0){const _0x30a84f=(_0xc06a07,_0x3f46ed)=>({'id':_0xc06a07[_0x1bee14(0x1c3)],'threadId':_0xc06a07[_0x1bee14(0x1ca)],'dT':y(_0xc06a07[_0x1bee14(0x19f)]),'personId':_0xc06a07['userId'],'resolved':_0x134b54[_0x1bee14(0x1c9)]===I['Solved'],'unitId':_0x35f54f,'subUnitId':_0x3f302d,'text':JSON['parse'](_0xc06a07['content']),'parentId':_0x3f46ed}),_0x163d69=_0x30a84f(_0x134b54[_0x1bee14(0x1aa)][0x0]);return{..._0x163d69,'children':_0x134b54[_0x1bee14(0x1aa)]['slice'](0x1)[_0x1bee14(0x1b9)](_0x2d0d1f=>_0x30a84f(_0x2d0d1f,_0x163d69['id']))};}return null;}let S=class{constructor(_0x421fc0,_0x3b6337,_0x4de77c){const _0x2ac3e4=_0x34cd0f;this[_0x2ac3e4(0x1b6)]=_0x421fc0,this[_0x2ac3e4(0x1df)]=_0x3b6337,this[_0x2ac3e4(0x182)]=_0x4de77c;}async['addComment'](_0x1ddbdf){const _0x1163de=_0x34cd0f;var _0x57d1c3,_0x51c6a4;const {parentId:_0x4e0b09,unitId:_0x5bd73d,text:_0x347ba3,threadId:_0x530083}=_0x1ddbdf,_0x4371d5=(_0x51c6a4=(_0x57d1c3=_0x347ba3['customRanges'])==null?void 0x0:_0x57d1c3['filter'](_0x32a915=>_0x32a915[_0x1163de(0x1ba)]===_0x26afc4[_0x1163de(0x18c)])[_0x1163de(0x1b9)](_0x3fd19a=>_0x3fd19a[_0x1163de(0x187)]))!=null?_0x51c6a4:[],_0x1a1334=JSON['stringify'](_0x347ba3),_0x3c0ff1=(await this[_0x1163de(0x182)][_0x1163de(0x1e2)](_0x5bd73d))[_0x1163de(0x189)]();if(_0x4e0b09){const _0x1663a6={'memberId':_0x3c0ff1,'unitId':_0x5bd73d,'content':_0x1a1334,'mention':_0x4371d5,'threadId':_0x530083},_0x2835f9=(await this[_0x1163de(0x1b6)][_0x1163de(0x1c7)](_0x1163de(0x1af)+_0x5bd73d+_0x1163de(0x1a8),{'body':_0x1663a6}))[_0x1163de(0x1ae)][_0x1163de(0x1b5)];return{..._0x1ddbdf,'id':_0x2835f9[_0x1163de(0x1c3)],'dT':_0x1ef42e(+_0x2835f9[_0x1163de(0x19f)])[_0x1163de(0x19e)](_0x1163de(0x1c0)),'personId':_0x2835f9[_0x1163de(0x1d9)]};}else{const _0x58627b={'memberId':_0x3c0ff1,'unitId':_0x5bd73d,'content':_0x1a1334,'mention':_0x4371d5},_0x1e3a23=await this[_0x1163de(0x1b6)][_0x1163de(0x1c7)]('/universer-api/comment/unit/'+_0x5bd73d+_0x1163de(0x186),{'body':_0x58627b});return X(_0x1e3a23[_0x1163de(0x1ae)][_0x1163de(0x1db)],_0x1ddbdf);}}async['updateComment'](_0x1fbed6){const _0x46e073=_0x34cd0f;var _0x5dd507,_0x54e6f3;const {text:_0x1ea240,unitId:_0x4e9dc5}=_0x1fbed6,_0x3f8b9f=(_0x54e6f3=(_0x5dd507=_0x1ea240[_0x46e073(0x1bc)])==null?void 0x0:_0x5dd507[_0x46e073(0x1ce)](_0x1374d9=>_0x1374d9[_0x46e073(0x1ba)]===_0x26afc4[_0x46e073(0x18c)])[_0x46e073(0x1b9)](_0x6eca30=>_0x6eca30[_0x46e073(0x187)]))!=null?_0x54e6f3:[],_0x25a2f6=JSON['stringify'](_0x1ea240),_0x401db9=_0x1fbed6['threadId'],_0x2c1cca=_0x1fbed6['id'],_0x3cc194={'memberId':(await this[_0x46e073(0x182)]['requireSession'](_0x4e9dc5))['getMemberID'](),'unitId':_0x4e9dc5,'threadId':_0x401db9,'mention':_0x3f8b9f,'content':_0x25a2f6,'replyId':_0x2c1cca},_0x6bb188=await this[_0x46e073(0x1b6)]['post']('/universer-api/comment/unit/'+_0x4e9dc5+_0x46e073(0x1ac),{'body':_0x3cc194});return!_0x6bb188[_0x46e073(0x1ae)]['error']||_0x6bb188['body'][_0x46e073(0x17f)][_0x46e073(0x190)]===0x1;}async[_0x34cd0f(0x194)](_0x14e6bc){const _0x5e45dd=_0x34cd0f,{unitId:_0x711a5e}=_0x14e6bc,_0x1252d1=_0x14e6bc[_0x5e45dd(0x1ca)],_0x59f32d={'memberId':this['_userService'][_0x5e45dd(0x1c8)]()[_0x5e45dd(0x1c1)],'unitId':_0x711a5e,'threadId':_0x1252d1,'solved':_0x14e6bc[_0x5e45dd(0x1b1)]?I[_0x5e45dd(0x193)]:I[_0x5e45dd(0x1da)]},_0x3fa298=await this[_0x5e45dd(0x1b6)][_0x5e45dd(0x1c7)]('/universer-api/comment/unit/'+_0x711a5e+_0x5e45dd(0x1bb),{'body':_0x59f32d});return!_0x3fa298[_0x5e45dd(0x1ae)]['error']||_0x3fa298['body']['error'][_0x5e45dd(0x190)]===0x1;}async[_0x34cd0f(0x199)](_0x48ecfe,_0x357604,_0x1427cc,_0x2f97ec){const _0x25be34=_0x34cd0f,_0x5d3282={'memberId':(await this['_sessionService'][_0x25be34(0x1e2)](_0x48ecfe))[_0x25be34(0x189)](),'threadId':_0x1427cc,'replyId':_0x2f97ec,'unitId':_0x48ecfe},_0x40fcd0=await this[_0x25be34(0x1b6)][_0x25be34(0x1c7)](_0x25be34(0x1af)+_0x48ecfe+_0x25be34(0x19d),{'body':_0x5d3282});return!_0x40fcd0[_0x25be34(0x1ae)][_0x25be34(0x17f)]||_0x40fcd0[_0x25be34(0x1ae)][_0x25be34(0x17f)]['code']===0x1;}async[_0x34cd0f(0x1a6)](_0x270877,_0x918cc4,_0x3ac678){const _0x11933c=_0x34cd0f,_0x39e3fc={'unitId':_0x270877,'threadId':_0x3ac678},_0x42b38b=await this['_httpService'][_0x11933c(0x1c7)](_0x11933c(0x1af)+_0x270877+_0x11933c(0x1dd),{'body':_0x39e3fc}),_0x5f2244=_0x3ac678[_0x11933c(0x1b9)](_0x3b2d43=>ee(_0x42b38b[_0x11933c(0x1ae)]['comments'][_0x3b2d43],_0x270877,_0x918cc4))[_0x11933c(0x1ce)](Boolean);return Object[_0x11933c(0x18e)](_0x42b38b[_0x11933c(0x1ae)][_0x11933c(0x18b)])['forEach'](_0x2d4e40=>{const _0x1cc2cc=_0x11933c;this[_0x1cc2cc(0x1df)][_0x1cc2cc(0x1d7)](_0x2d4e40);}),_0x5f2244;}[_0x34cd0f(0x1a5)](_0x5a3a5f){const _0xd14fca=_0x34cd0f;return{'id':_0x5a3a5f['id'],'threadId':_0x5a3a5f[_0xd14fca(0x1ca)],'ref':_0x5a3a5f[_0xd14fca(0x197)]};}};S=Q([b(0x0,_0x5f1365(_0x3b5283)),b(0x1,_0x5f1365(_0x47edab)),b(0x2,_0x5f1365(_0x362bab))],S);var re=Object[_0x34cd0f(0x1cf)],te=(_0x5bb29f,_0x328e7d,_0x350593,_0x33526c)=>{const _0x2c6c85=_0x34cd0f;for(var _0x26c93e=_0x33526c>0x1?void 0x0:_0x33526c?re(_0x328e7d,_0x350593):_0x328e7d,_0x113a34=_0x5bb29f[_0x2c6c85(0x1a7)]-0x1,_0x551ce6;_0x113a34>=0x0;_0x113a34--)(_0x551ce6=_0x5bb29f[_0x113a34])&&(_0x26c93e=_0x551ce6(_0x26c93e)||_0x26c93e);return _0x26c93e;},M=(_0x519bc4,_0x15fae2)=>(_0x18d3ca,_0x516d9c)=>_0x15fae2(_0x18d3ca,_0x516d9c,_0x519bc4);let f=class extends _0x256cca{constructor(_0x27f0d6,_0x7d827a){const _0xb0efe1=_0x34cd0f;super(),this[_0xb0efe1(0x181)]=_0x27f0d6,this['_threadCommentDataSource']=_0x7d827a,this['_initDataSource']();}[_0x34cd0f(0x180)](){const _0x3f6911=_0x34cd0f;this['_threadCommentDataSourceService'][_0x3f6911(0x17d)]=this[_0x3f6911(0x1d0)],this[_0x3f6911(0x181)][_0x3f6911(0x1b8)]=!0x1;}};f=te([M(0x0,_0x47b26d),M(0x1,_0x5f1365(S))],f);var se=Object[_0x34cd0f(0x1e0)],oe=Object[_0x34cd0f(0x1cf)],ne=(_0x160038,_0x2eff11,_0x3deba0)=>_0x2eff11 in _0x160038?se(_0x160038,_0x2eff11,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3deba0}):_0x160038[_0x2eff11]=_0x3deba0,ie=(_0x4a9934,_0x26a63f,_0x6ea484,_0xe8fb86)=>{const _0x502369=_0x34cd0f;for(var _0x1479da=_0xe8fb86>0x1?void 0x0:_0xe8fb86?oe(_0x26a63f,_0x6ea484):_0x26a63f,_0x407bb7=_0x4a9934[_0x502369(0x1a7)]-0x1,_0x47869d;_0x407bb7>=0x0;_0x407bb7--)(_0x47869d=_0x4a9934[_0x407bb7])&&(_0x1479da=_0x47869d(_0x1479da)||_0x1479da);return _0x1479da;},N=(_0x403e54,_0x36578c)=>(_0x114a0d,_0x18d4f3)=>_0x36578c(_0x114a0d,_0x18d4f3,_0x403e54),$=(_0x35f42a,_0x3b58cb,_0x5a22ed)=>ne(_0x35f42a,typeof _0x3b58cb!=_0x34cd0f(0x17e)?_0x3b58cb+'':_0x3b58cb,_0x5a22ed);let g=class extends _0x4f1cb3{constructor(_0x1a09c4=O,_0x29f34b,_0xa2370a){const _0x597cbb=_0x34cd0f;super(),this[_0x597cbb(0x1cc)]=_0x1a09c4,this[_0x597cbb(0x1a1)]=_0x29f34b,this['_configService']=_0xa2370a;const {..._0x4ebb7a}=_0x41f525({},O,this[_0x597cbb(0x1cc)]);this['_configService'][_0x597cbb(0x1b3)](z,_0x4ebb7a);}[_0x34cd0f(0x1d6)](){const _0x1cc64b=_0x34cd0f;[[S],[f],[_]][_0x1cc64b(0x185)](_0x1cfa86=>{const _0x399ed4=_0x1cc64b;this[_0x399ed4(0x1a1)]['add'](_0x1cfa86);});}[_0x34cd0f(0x1d4)](){const _0x4d63a5=_0x34cd0f;this[_0x4d63a5(0x1a1)][_0x4d63a5(0x188)](f),this['_injector'][_0x4d63a5(0x188)](_);}};$(g,_0x34cd0f(0x1b7),W),$(g,_0x34cd0f(0x17b),_0x2c3502[_0x34cd0f(0x1a9)]),g=ie([_0x4bd4b8(_0x40c8ff,_0x3b7d8f,_0x13449b),N(0x1,_0x5f1365(_0xfec9d0)),N(0x2,_0x4b5188)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x32fd(_0x3a0e1b,_0x551dae){const _0x492405=_0x4924();return _0x32fd=function(_0x32fd03,_0x5df114){_0x32fd03=_0x32fd03-0x14e;let _0x525d4d=_0x492405[_0x32fd03];return _0x525d4d;},_0x32fd(_0x3a0e1b,_0x551dae);}function _0x4924(){const _0xd22d5f=['reply','UniverProCollaborationClient','dayjs','size','comments','DependentOn','/reply','users','length','bufferTime','addUser','exports','amd','onStarting','find','body','function','root','customRanges','_config','_injector','6wHUsqB','threadId','_threadCommentDataSourceService','/list','_threadCommentModel','rangeType','CustomRangeType','_threadCommentDataSource','deleteComment','Plugin','createTimestamp','CollaborationSessionService','disposeWithMe','updateComment','_initUserSync','UniverThreadComment','UserManagerService','@univerjs-pro/collaboration-client','6183470kWsHYh','userID','userId','user','replies','IThreadCommentDataSourceService','parentId','Reply','5161482zhMKHK','Solve','@univerjs/core','2847990xtgIyW','308bZnmBF','HTTPService','/universer-api/comment/unit/','getUser','UniverThreadCommentUIPlugin','_userService','Disposable','forEach','_configService','resolveComment','object','UNIVER_UNKNOWN','solved','filter','type','UNRECOGNIZED','Solved','format','listComments','symbol','personId','content','_commentService','1403908MJXkbh','Unknown','add','code','UniverCore','Add','UniverNetwork','getOwnPropertyDescriptor','slice','Delete','getCurrentUser','COMMENT','getComment','IConfigService','ThreadCommentModel','_init','resolved','1342954YwIytH','payload','UniverInstanceType','defineProperty','ref','saveCommentToSnapshot','map','32104vGcIFS','@univerjs/network','OpenOrReOpen','setConfig','comment','pluginName','subscribe','requireSession','UniverThreadCommentUi','getUnit','getMemberID','UniverProLicense','_sessionService','delete','Edit','parse','get','Module','values','@univerjs/thread-comment','replyId','/add','post','3103732zgZMiD','error','addComment','syncUpdateMutationToColla','UniverCollaborationClientPlugin','stringify','toStringTag','CommentService','_httpService','Inject','UniverThreadCommentDataSourcePlugin','30eZCgZM','Injector'];_0x4924=function(){return _0xd22d5f;};return _0x4924();}(function(_0x1eb2a4,_0x30563a){const _0x56acb9=_0x32fd,_0xfd386c=_0x1eb2a4();while(!![]){try{const _0x3cb0fb=parseInt(_0x56acb9(0x1d2))/0x1+-parseInt(_0x56acb9(0x1c1))/0x2+-parseInt(_0x56acb9(0x1a9))/0x3+parseInt(_0x56acb9(0x16a))/0x4+-parseInt(_0x56acb9(0x19e))/0x5*(parseInt(_0x56acb9(0x18c))/0x6)+-parseInt(_0x56acb9(0x1aa))/0x7*(parseInt(_0x56acb9(0x153))/0x8)+-parseInt(_0x56acb9(0x1a6))/0x9*(-parseInt(_0x56acb9(0x175))/0xa);if(_0x3cb0fb===_0x30563a)break;else _0xfd386c['push'](_0xfd386c['shift']());}catch(_0x5a4264){_0xfd386c['push'](_0xfd386c['shift']());}}}(_0x4924,0xbd2af),function(_0x2bf26f,_0x10b764){const _0x3ddfbf=_0x32fd;typeof exports==_0x3ddfbf(0x1b4)&&typeof module<'u'?_0x10b764(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==_0x3ddfbf(0x187)&&define[_0x3ddfbf(0x183)]?define([_0x3ddfbf(0x182),_0x3ddfbf(0x19d),'@univerjs-pro/license',_0x3ddfbf(0x1a8),'@univerjs/thread-comment-ui',_0x3ddfbf(0x166),'rxjs',_0x3ddfbf(0x154)],_0x10b764):(_0x2bf26f=typeof globalThis<'u'?globalThis:_0x2bf26f||self,_0x10b764(_0x2bf26f['UniverProThreadCommentDatasource']={},_0x2bf26f[_0x3ddfbf(0x178)],_0x2bf26f[_0x3ddfbf(0x15e)],_0x2bf26f[_0x3ddfbf(0x1c5)],_0x2bf26f[_0x3ddfbf(0x15b)],_0x2bf26f[_0x3ddfbf(0x19b)],_0x2bf26f['rxjs'],_0x2bf26f[_0x3ddfbf(0x1c7)]));}(this,function(_0x4b43e9,_0x49f4cf,_0xf779f0,_0x116b5f,_0x4c6c64,_0x2b9794,_0x1c3e47,_0x15534f){'use strict';const _0x298fbc=_0x32fd;const _0x14bda9='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x1457a2=(_0x3c308f=>(_0x3c308f[_0x3c308f[_0x298fbc(0x155)]=0x0]=_0x298fbc(0x155),_0x3c308f[_0x3c308f[_0x298fbc(0x1ba)]=0x1]=_0x298fbc(0x1ba),_0x3c308f[_0x3c308f[_0x298fbc(0x1b9)]=-0x1]=_0x298fbc(0x1b9),_0x3c308f))(_0x1457a2||{}),_0x2b90da=(_0x4766d2=>(_0x4766d2[_0x4766d2['Unknown']=0x0]=_0x298fbc(0x1c2),_0x4766d2[_0x4766d2['Add']=0x1]=_0x298fbc(0x1c6),_0x4766d2[_0x4766d2[_0x298fbc(0x1a5)]=0x2]='Reply',_0x4766d2[_0x4766d2['Edit']=0x3]=_0x298fbc(0x161),_0x4766d2[_0x4766d2[_0x298fbc(0x1ca)]=0x4]=_0x298fbc(0x1ca),_0x4766d2[_0x4766d2[_0x298fbc(0x1a7)]=0x5]=_0x298fbc(0x1a7),_0x4766d2[_0x4766d2[_0x298fbc(0x1b9)]=-0x1]=_0x298fbc(0x1b9),_0x4766d2))(_0x2b90da||{});const _0x2c170d=_0x2b7a0a=>_0x116b5f['dayjs'](new Date(+_0x2b7a0a))[_0x298fbc(0x1bb)]('YYYY/MM/DD\x20HH:mm'),_0x198735=async(_0x4c62ba,_0x20d778)=>{const _0xf85d7=_0x298fbc,_0x1bf086=_0x4c62ba[_0xf85d7(0x163)](_0x116b5f[_0xf85d7(0x19c)]),_0x183f9a=_0x4c62ba['get'](_0x15534f[_0xf85d7(0x1ab)]);_0x20d778[_0xf85d7(0x1b1)](_0x55b005=>{const _0x364ae1=_0xf85d7;_0x1bf086[_0x364ae1(0x1ad)](_0x55b005)&&_0x20d778[_0x364ae1(0x160)](_0x55b005);}),_0x20d778[_0xf85d7(0x17a)]&&(await _0x183f9a[_0xf85d7(0x163)]('/universer-api/user/list',{'params':{'userIDs':[..._0x20d778]}}))[_0xf85d7(0x186)]['users'][_0xf85d7(0x1b1)](_0x2ad244=>{const _0x466930=_0xf85d7;_0x2ad244&&_0x1bf086[_0x466930(0x181)](_0x2ad244);});};var _0x438afc=Object[_0x298fbc(0x1c8)],_0x181941=(_0x4892e8,_0xa39b1d,_0x202387,_0x5a39ad)=>{for(var _0x1c67f8=_0x5a39ad>0x1?void 0x0:_0x5a39ad?_0x438afc(_0xa39b1d,_0x202387):_0xa39b1d,_0x16368d=_0x4892e8['length']-0x1,_0x29a5de;_0x16368d>=0x0;_0x16368d--)(_0x29a5de=_0x4892e8[_0x16368d])&&(_0x1c67f8=_0x29a5de(_0x1c67f8)||_0x1c67f8);return _0x1c67f8;},_0x32658a=(_0xaa7374,_0x3ea634)=>(_0x10ebd0,_0x44ace6)=>_0x3ea634(_0x10ebd0,_0x44ace6,_0xaa7374);let _0x5888c0=class extends _0x116b5f['Disposable']{constructor(_0x4a30cf,_0x3e09af,_0x3712e4,_0x13768b){const _0x3b64ba=_0x298fbc;super(),this[_0x3b64ba(0x1c0)]=_0x4a30cf,this['_threadCommentModel']=_0x3e09af,this['_userService']=_0x3712e4,this[_0x3b64ba(0x18b)]=_0x13768b,this['_init'](),this['_initUserSync']();}[_0x298fbc(0x19a)](){const _0x1cb7b8=_0x298fbc;this[_0x1cb7b8(0x198)](this[_0x1cb7b8(0x190)]['commentUpdate$']['pipe'](_0x1c3e47[_0x1cb7b8(0x180)](0x10))[_0x1cb7b8(0x159)](_0x22dc69=>{const _0x17c822=_0x1cb7b8,_0x30000f=new Set();_0x22dc69[_0x17c822(0x1b1)](_0xd069ad=>{const _0x266c4c=_0x17c822;switch(_0xd069ad[_0x266c4c(0x1b8)]){case _0x266c4c(0x1c3):{const _0x21e29b=_0xd069ad[_0x266c4c(0x1d3)][_0x266c4c(0x1be)];_0x30000f[_0x266c4c(0x1c3)](_0x21e29b);break;}}}),_0x198735(this['_injector'],_0x30000f);}));}[_0x298fbc(0x1d0)](){const _0x35b2fa=_0x298fbc;this[_0x35b2fa(0x198)](this['_commentService']['commentUpdate$'][_0x35b2fa(0x159)](async _0xfa32df=>{const _0x56dbf0=_0x35b2fa;var _0x213812,_0x14fd34,_0x49b337,_0x28c733;const _0x1d0ff7=(_0x213812=this[_0x56dbf0(0x190)][_0x56dbf0(0x15c)](_0xfa32df['unitId'])[_0x56dbf0(0x185)](_0x379437=>_0x379437['threadId']===_0xfa32df[_0x56dbf0(0x18d)]))==null?void 0x0:_0x213812['root'];if(!_0x1d0ff7)return;const {unitId:_0x515e4d,subUnitId:_0x7e023}=_0x1d0ff7;switch(_0xfa32df['user']&&this[_0x56dbf0(0x1af)][_0x56dbf0(0x181)](_0xfa32df[_0x56dbf0(0x1a1)]),_0xfa32df[_0x56dbf0(0x1b8)]){case _0x2b90da['Add']:break;case _0x2b90da['Reply']:{this[_0x56dbf0(0x190)][_0x56dbf0(0x16c)](_0x515e4d,_0x7e023,{'unitId':_0x515e4d,'subUnitId':_0x7e023,'ref':'','id':_0xfa32df[_0x56dbf0(0x167)],'dT':_0x2c170d(+_0xfa32df['createTimestamp']),'threadId':_0xfa32df[_0x56dbf0(0x18d)],'personId':(_0x49b337=(_0x14fd34=_0xfa32df[_0x56dbf0(0x1a1)])==null?void 0x0:_0x14fd34[_0x56dbf0(0x19f)])!=null?_0x49b337:_0xfa32df[_0x56dbf0(0x1a0)],'text':JSON[_0x56dbf0(0x162)](_0xfa32df[_0x56dbf0(0x1bf)]),'parentId':_0x1d0ff7['id']});break;}case _0x2b90da[_0x56dbf0(0x1ca)]:{const _0x49c3cd=this[_0x56dbf0(0x190)][_0x56dbf0(0x1cd)](_0x515e4d,_0x7e023,_0xfa32df['replyId']);_0x49c3cd&&_0x49c3cd[_0x56dbf0(0x1a4)]&&this[_0x56dbf0(0x190)][_0x56dbf0(0x194)](_0x515e4d,_0x7e023,_0xfa32df[_0x56dbf0(0x167)]);break;}case _0x2b90da[_0x56dbf0(0x161)]:{this[_0x56dbf0(0x190)][_0x56dbf0(0x199)](_0x515e4d,_0x7e023,{'commentId':_0xfa32df[_0x56dbf0(0x167)],'text':JSON[_0x56dbf0(0x162)](_0xfa32df['content'])});break;}case _0x2b90da[_0x56dbf0(0x1a7)]:{const _0x23efd7=(_0x28c733=this[_0x56dbf0(0x190)][_0x56dbf0(0x15c)](_0xfa32df['unitId'])[_0x56dbf0(0x185)](_0x45ec4d=>_0x45ec4d['threadId']===_0xfa32df['threadId']))==null?void 0x0:_0x28c733[_0x56dbf0(0x188)];_0x23efd7&&this[_0x56dbf0(0x190)][_0x56dbf0(0x1b3)](_0x515e4d,_0x7e023,_0x23efd7['id'],_0xfa32df['solved']===_0x1457a2[_0x56dbf0(0x1ba)]);break;}}}));}};_0x5888c0=_0x181941([_0x32658a(0x0,_0x116b5f['Inject'](_0x49f4cf[_0x298fbc(0x171)])),_0x32658a(0x1,_0x116b5f[_0x298fbc(0x173)](_0x2b9794[_0x298fbc(0x1cf)])),_0x32658a(0x2,_0x116b5f[_0x298fbc(0x173)](_0x116b5f[_0x298fbc(0x19c)])),_0x32658a(0x3,_0x116b5f['Inject'](_0x116b5f[_0x298fbc(0x176)]))],_0x5888c0);const _0x17f5c6='thread-comment-data-source.config',_0x484967={};var _0x204748=Object[_0x298fbc(0x1c8)],_0x55e1c2=(_0x1260f9,_0x384aa6,_0x43de15,_0x333a73)=>{const _0x2328ef=_0x298fbc;for(var _0x1bba46=_0x333a73>0x1?void 0x0:_0x333a73?_0x204748(_0x384aa6,_0x43de15):_0x384aa6,_0x2917b3=_0x1260f9[_0x2328ef(0x17f)]-0x1,_0x581e12;_0x2917b3>=0x0;_0x2917b3--)(_0x581e12=_0x1260f9[_0x2917b3])&&(_0x1bba46=_0x581e12(_0x1bba46)||_0x1bba46);return _0x1bba46;},_0x218554=(_0x2e3a60,_0x15adae)=>(_0x4935d0,_0x1cde26)=>_0x15adae(_0x4935d0,_0x1cde26,_0x2e3a60);function _0x4b5c06(_0x4326cd,_0x5ddf59){const _0x3cddcf=_0x298fbc,_0x1c7f1c=_0x4326cd['replies'][0x0];return{..._0x5ddf59,'id':_0x1c7f1c['replyId'],'resolved':_0x4326cd[_0x3cddcf(0x1b6)]===0x1,'dT':_0x2c170d(_0x1c7f1c[_0x3cddcf(0x196)]),'personId':_0x1c7f1c[_0x3cddcf(0x1a0)],'threadId':_0x1c7f1c[_0x3cddcf(0x18d)]};}function _0x44908a(_0x87d235,_0x415377,_0xad4274){const _0x2b5af6=_0x298fbc;var _0x2b30a2,_0x4930c6;if(((_0x4930c6=(_0x2b30a2=_0x87d235==null?void 0x0:_0x87d235[_0x2b5af6(0x1a2)])==null?void 0x0:_0x2b30a2[_0x2b5af6(0x17f)])!=null?_0x4930c6:0x0)>0x0){const _0x5557d4=(_0xe7d64b,_0x10203d)=>({'id':_0xe7d64b[_0x2b5af6(0x167)],'threadId':_0xe7d64b[_0x2b5af6(0x18d)],'dT':_0x2c170d(_0xe7d64b[_0x2b5af6(0x196)]),'personId':_0xe7d64b[_0x2b5af6(0x1a0)],'resolved':_0x87d235[_0x2b5af6(0x1b6)]===_0x1457a2[_0x2b5af6(0x1ba)],'unitId':_0x415377,'subUnitId':_0xad4274,'text':JSON[_0x2b5af6(0x162)](_0xe7d64b['content']),'parentId':_0x10203d}),_0x732659=_0x5557d4(_0x87d235[_0x2b5af6(0x1a2)][0x0]);return{..._0x732659,'children':_0x87d235['replies'][_0x2b5af6(0x1c9)](0x1)[_0x2b5af6(0x152)](_0x1fe430=>_0x5557d4(_0x1fe430,_0x732659['id']))};}return null;}let _0x82a4b9=class{constructor(_0x40cdb1,_0x3221f1,_0x18a20c){const _0x24b8f4=_0x298fbc;this[_0x24b8f4(0x172)]=_0x40cdb1,this[_0x24b8f4(0x1af)]=_0x3221f1,this[_0x24b8f4(0x15f)]=_0x18a20c;}async[_0x298fbc(0x16c)](_0x28684e){const _0x12d67b=_0x298fbc;var _0x4c2428,_0x23eb99;const {parentId:_0x4df686,unitId:_0x14a34f,text:_0x4bd1be,threadId:_0xadb604}=_0x28684e,_0x33d900=(_0x23eb99=(_0x4c2428=_0x4bd1be[_0x12d67b(0x189)])==null?void 0x0:_0x4c2428[_0x12d67b(0x1b7)](_0x58363a=>_0x58363a[_0x12d67b(0x191)]===_0x116b5f[_0x12d67b(0x192)][_0x12d67b(0x1cc)])[_0x12d67b(0x152)](_0x1f0ca8=>_0x1f0ca8['rangeId']))!=null?_0x23eb99:[],_0x3102da=JSON[_0x12d67b(0x16f)](_0x4bd1be),_0x66893f=(await this[_0x12d67b(0x15f)][_0x12d67b(0x15a)](_0x14a34f))[_0x12d67b(0x15d)]();if(_0x4df686){const _0x2379e1={'memberId':_0x66893f,'unitId':_0x14a34f,'content':_0x3102da,'mention':_0x33d900,'threadId':_0xadb604},_0x6f2800=(await this[_0x12d67b(0x172)]['post'](_0x12d67b(0x1ac)+_0x14a34f+_0x12d67b(0x17d),{'body':_0x2379e1}))['body'][_0x12d67b(0x177)];return{..._0x28684e,'id':_0x6f2800['replyId'],'dT':_0x116b5f[_0x12d67b(0x179)](+_0x6f2800[_0x12d67b(0x196)])[_0x12d67b(0x1bb)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x6f2800[_0x12d67b(0x1a0)]};}else{const _0xfc511a={'memberId':_0x66893f,'unitId':_0x14a34f,'content':_0x3102da,'mention':_0x33d900},_0x34c213=await this[_0x12d67b(0x172)][_0x12d67b(0x169)](_0x12d67b(0x1ac)+_0x14a34f+_0x12d67b(0x168),{'body':_0xfc511a});return _0x4b5c06(_0x34c213[_0x12d67b(0x186)][_0x12d67b(0x157)],_0x28684e);}}async[_0x298fbc(0x199)](_0x39cfc){const _0x551b66=_0x298fbc;var _0x5c475f,_0x16220f;const {text:_0xa94c1e,unitId:_0x2e5e3d}=_0x39cfc,_0xd5a1bd=(_0x16220f=(_0x5c475f=_0xa94c1e['customRanges'])==null?void 0x0:_0x5c475f[_0x551b66(0x1b7)](_0x2b2520=>_0x2b2520[_0x551b66(0x191)]===_0x116b5f[_0x551b66(0x192)]['COMMENT'])[_0x551b66(0x152)](_0x242114=>_0x242114['rangeId']))!=null?_0x16220f:[],_0xbe071=JSON['stringify'](_0xa94c1e),_0x5afa32=_0x39cfc[_0x551b66(0x18d)],_0xe09474=_0x39cfc['id'],_0x4a723c={'memberId':(await this[_0x551b66(0x15f)][_0x551b66(0x15a)](_0x2e5e3d))[_0x551b66(0x15d)](),'unitId':_0x2e5e3d,'threadId':_0x5afa32,'mention':_0xd5a1bd,'content':_0xbe071,'replyId':_0xe09474},_0x2d78fc=await this[_0x551b66(0x172)]['post'](_0x551b66(0x1ac)+_0x2e5e3d+'/edit',{'body':_0x4a723c});return!_0x2d78fc[_0x551b66(0x186)][_0x551b66(0x16b)]||_0x2d78fc[_0x551b66(0x186)][_0x551b66(0x16b)]['code']===0x1;}async[_0x298fbc(0x1b3)](_0x348d14){const _0x1eb991=_0x298fbc,{unitId:_0x58d679}=_0x348d14,_0x170f70=_0x348d14[_0x1eb991(0x18d)],_0x4d50c2={'memberId':this['_userService'][_0x1eb991(0x1cb)]()['userID'],'unitId':_0x58d679,'threadId':_0x170f70,'solved':_0x348d14[_0x1eb991(0x1d1)]?_0x1457a2['Solved']:_0x1457a2['OpenOrReOpen']},_0x163cf9=await this[_0x1eb991(0x172)][_0x1eb991(0x169)]('/universer-api/comment/unit/'+_0x58d679+'/solved',{'body':_0x4d50c2});return!_0x163cf9['body'][_0x1eb991(0x16b)]||_0x163cf9[_0x1eb991(0x186)][_0x1eb991(0x16b)][_0x1eb991(0x1c4)]===0x1;}async[_0x298fbc(0x194)](_0x2dc164,_0x363ade,_0x108595,_0x53248c){const _0x3b9fc1=_0x298fbc,_0x2be49f={'memberId':(await this[_0x3b9fc1(0x15f)][_0x3b9fc1(0x15a)](_0x2dc164))[_0x3b9fc1(0x15d)](),'threadId':_0x108595,'replyId':_0x53248c,'unitId':_0x2dc164},_0x3fdf81=await this[_0x3b9fc1(0x172)]['post']('/universer-api/comment/unit/'+_0x2dc164+'/delete',{'body':_0x2be49f});return!_0x3fdf81[_0x3b9fc1(0x186)][_0x3b9fc1(0x16b)]||_0x3fdf81['body'][_0x3b9fc1(0x16b)][_0x3b9fc1(0x1c4)]===0x1;}async[_0x298fbc(0x1bc)](_0x7f1e5,_0x3cf124,_0x425fbd){const _0x5a0e8b=_0x298fbc,_0x15273b={'unitId':_0x7f1e5,'threadId':_0x425fbd},_0x365a20=await this[_0x5a0e8b(0x172)]['post'](_0x5a0e8b(0x1ac)+_0x7f1e5+_0x5a0e8b(0x18f),{'body':_0x15273b}),_0x1edb65=_0x425fbd[_0x5a0e8b(0x152)](_0x902afc=>_0x44908a(_0x365a20[_0x5a0e8b(0x186)][_0x5a0e8b(0x17b)][_0x902afc],_0x7f1e5,_0x3cf124))['filter'](Boolean);return Object[_0x5a0e8b(0x165)](_0x365a20[_0x5a0e8b(0x186)][_0x5a0e8b(0x17e)])['forEach'](_0x247ecc=>{const _0x49eb38=_0x5a0e8b;this[_0x49eb38(0x1af)]['addUser'](_0x247ecc);}),_0x1edb65;}[_0x298fbc(0x151)](_0x45c88d){const _0x3ee717=_0x298fbc;return{'id':_0x45c88d['id'],'threadId':_0x45c88d['threadId'],'ref':_0x45c88d[_0x3ee717(0x150)]};}};_0x82a4b9=_0x55e1c2([_0x218554(0x0,_0x116b5f[_0x298fbc(0x173)](_0x15534f[_0x298fbc(0x1ab)])),_0x218554(0x1,_0x116b5f['Inject'](_0x116b5f[_0x298fbc(0x19c)])),_0x218554(0x2,_0x116b5f['Inject'](_0x49f4cf[_0x298fbc(0x197)]))],_0x82a4b9);var _0x2df7cd=Object[_0x298fbc(0x1c8)],_0x4cdeac=(_0x5621b7,_0x47412d,_0x5d480b,_0x3ae5a8)=>{const _0x544e36=_0x298fbc;for(var _0x4c4558=_0x3ae5a8>0x1?void 0x0:_0x3ae5a8?_0x2df7cd(_0x47412d,_0x5d480b):_0x47412d,_0x212c5b=_0x5621b7[_0x544e36(0x17f)]-0x1,_0x4ee8ce;_0x212c5b>=0x0;_0x212c5b--)(_0x4ee8ce=_0x5621b7[_0x212c5b])&&(_0x4c4558=_0x4ee8ce(_0x4c4558)||_0x4c4558);return _0x4c4558;},_0x337f08=(_0x2b2e50,_0x20020e)=>(_0x3ad10e,_0x4a74b8)=>_0x20020e(_0x3ad10e,_0x4a74b8,_0x2b2e50);let _0x2f4d47=class extends _0x116b5f[_0x298fbc(0x1b0)]{constructor(_0x250f33,_0x460c8d){const _0x55a2c2=_0x298fbc;super(),this[_0x55a2c2(0x18e)]=_0x250f33,this['_threadCommentDataSource']=_0x460c8d,this['_initDataSource']();}['_initDataSource'](){const _0x28ddec=_0x298fbc;this[_0x28ddec(0x18e)]['dataSource']=this[_0x28ddec(0x193)],this['_threadCommentDataSourceService'][_0x28ddec(0x16d)]=!0x1;}};_0x2f4d47=_0x4cdeac([_0x337f08(0x0,_0x2b9794[_0x298fbc(0x1a3)]),_0x337f08(0x1,_0x116b5f[_0x298fbc(0x173)](_0x82a4b9))],_0x2f4d47);var _0x1b088e=Object['defineProperty'],_0x4c8492=Object[_0x298fbc(0x1c8)],_0x2186e6=(_0x357593,_0x571eb0,_0xf03f59)=>_0x571eb0 in _0x357593?_0x1b088e(_0x357593,_0x571eb0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xf03f59}):_0x357593[_0x571eb0]=_0xf03f59,_0x133dba=(_0x438795,_0x2adf80,_0x54d091,_0x3c79a7)=>{const _0x4d4642=_0x298fbc;for(var _0xb82c8c=_0x3c79a7>0x1?void 0x0:_0x3c79a7?_0x4c8492(_0x2adf80,_0x54d091):_0x2adf80,_0x4debcb=_0x438795[_0x4d4642(0x17f)]-0x1,_0x1b2b89;_0x4debcb>=0x0;_0x4debcb--)(_0x1b2b89=_0x438795[_0x4debcb])&&(_0xb82c8c=_0x1b2b89(_0xb82c8c)||_0xb82c8c);return _0xb82c8c;},_0x458f2b=(_0x3ab1b5,_0x179cf9)=>(_0x10f0a0,_0xb1141b)=>_0x179cf9(_0x10f0a0,_0xb1141b,_0x3ab1b5),_0x58a21b=(_0x4b612c,_0x4e2392,_0x51261c)=>_0x2186e6(_0x4b612c,typeof _0x4e2392!=_0x298fbc(0x1bd)?_0x4e2392+'':_0x4e2392,_0x51261c);_0x4b43e9[_0x298fbc(0x174)]=class extends _0x116b5f[_0x298fbc(0x195)]{constructor(_0xfbfe9e=_0x484967,_0x38ea94,_0x43fd4f){const _0x4e2b57=_0x298fbc;super(),this[_0x4e2b57(0x18a)]=_0xfbfe9e,this[_0x4e2b57(0x18b)]=_0x38ea94,this[_0x4e2b57(0x1b2)]=_0x43fd4f;const {..._0x6720d3}=_0x116b5f['merge']({},_0x484967,this['_config']);this['_configService'][_0x4e2b57(0x156)](_0x17f5c6,_0x6720d3);}[_0x298fbc(0x184)](){const _0x3f8c71=_0x298fbc;[[_0x82a4b9],[_0x2f4d47],[_0x5888c0]][_0x3f8c71(0x1b1)](_0x413251=>{const _0x5676ce=_0x3f8c71;this[_0x5676ce(0x18b)]['add'](_0x413251);});}['onReady'](){const _0x58261b=_0x298fbc;this[_0x58261b(0x18b)][_0x58261b(0x163)](_0x2f4d47),this[_0x58261b(0x18b)][_0x58261b(0x163)](_0x5888c0);}},_0x58a21b(_0x4b43e9[_0x298fbc(0x174)],_0x298fbc(0x158),_0x14bda9),_0x58a21b(_0x4b43e9[_0x298fbc(0x174)],_0x298fbc(0x1b8),_0x116b5f[_0x298fbc(0x14e)][_0x298fbc(0x1b5)]),_0x4b43e9[_0x298fbc(0x174)]=_0x133dba([_0x116b5f[_0x298fbc(0x17c)](_0x4c6c64[_0x298fbc(0x1ae)],_0x49f4cf[_0x298fbc(0x16e)],_0xf779f0['UniverLicensePlugin']),_0x458f2b(0x1,_0x116b5f[_0x298fbc(0x173)](_0x116b5f[_0x298fbc(0x176)])),_0x458f2b(0x2,_0x116b5f[_0x298fbc(0x1ce)])],_0x4b43e9[_0x298fbc(0x174)]),Object[_0x298fbc(0x14f)](_0x4b43e9,Symbol[_0x298fbc(0x170)],{'value':_0x298fbc(0x164)});}));
|
|
1
|
+
function _0xf60b(){const _0x250cac=['_threadCommentModel','comment','Delete','type','_userService','format','UNIVER_UNKNOWN','@univerjs-pro/collaboration-client','_initDataSource','deleteComment','object','_httpService','@univerjs/thread-comment-ui','7018560UEiojK','_threadCommentDataSourceService','dataSource','6264AoKSiL','size','disposeWithMe','pluginName','32065vAgLGo','3WvHwKt','function','replyId','forEach','_config','customRanges','error','addComment','Disposable','/solved','HTTPService','Edit','Reply','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','delete','parse','user','UniverNetwork','getCurrentUser','find','filter','root','onReady','CollaborationSessionService','UniverProThreadCommentDatasource','reply','users','exports','personId','CommentService','getComment','IThreadCommentDataSourceService','/list','UserManagerService','Solved','Add','values','map','259KxFLnF','@univerjs/core','onStarting','rangeType','UniverThreadCommentDataSourcePlugin','@univerjs/thread-comment','updateComment','UniverLicensePlugin','solved','Injector','UniverInstanceType','listComments','payload','resolveComment','ref','subscribe','stringify','body','148iwhDlI','DependentOn','comments','bufferTime','dayjs','userID','UniverThreadComment','/reply','post','get','/universer-api/comment/unit/','commentUpdate$','merge','_commentService','rangeId','UniverCollaborationClientPlugin','symbol','addUser','Plugin','replies','Inject','amd','895431AXUKxJ','requireSession','syncUpdateMutationToColla','getMemberID','UniverProLicense','Unknown','3690702DTjgEK','saveCommentToSnapshot','CustomRangeType','COMMENT','userId','@univerjs/network','pipe','content','threadId','_sessionService','getOwnPropertyDescriptor','rxjs','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','setConfig','UniverThreadCommentUi','length','Solve','Module','_injector','slice','/delete','UniverThreadCommentUIPlugin','OpenOrReOpen','defineProperty','UNRECOGNIZED','_threadCommentDataSource','15132920vNbcQB','code','unitId','816682hRDfgN','getUnit'];_0xf60b=function(){return _0x250cac;};return _0xf60b();}function _0x12d5(_0x4fa006,_0xd868c1){const _0xf60b78=_0xf60b();return _0x12d5=function(_0x12d5d5,_0x1c4863){_0x12d5d5=_0x12d5d5-0x12a;let _0x236dc4=_0xf60b78[_0x12d5d5];return _0x236dc4;},_0x12d5(_0x4fa006,_0xd868c1);}(function(_0x24a7cc,_0x59da69){const _0x2f3ee4=_0x12d5,_0x18f321=_0x24a7cc();while(!![]){try{const _0x32f721=-parseInt(_0x2f3ee4(0x199))/0x1+-parseInt(_0x2f3ee4(0x133))/0x2*(-parseInt(_0x2f3ee4(0x14a))/0x3)+-parseInt(_0x2f3ee4(0x183))/0x4*(parseInt(_0x2f3ee4(0x149))/0x5)+parseInt(_0x2f3ee4(0x19f))/0x6+parseInt(_0x2f3ee4(0x171))/0x7*(-parseInt(_0x2f3ee4(0x145))/0x8)+-parseInt(_0x2f3ee4(0x142))/0x9+parseInt(_0x2f3ee4(0x130))/0xa;if(_0x32f721===_0x59da69)break;else _0x18f321['push'](_0x18f321['shift']());}catch(_0x5eb39d){_0x18f321['push'](_0x18f321['shift']());}}}(_0xf60b,0x9151b),function(_0x1377e3,_0x5946fc){const _0x408d0d=_0x12d5;typeof exports==_0x408d0d(0x13f)&&typeof module<'u'?_0x5946fc(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==_0x408d0d(0x14b)&&define[_0x408d0d(0x198)]?define([_0x408d0d(0x166),_0x408d0d(0x13c),'@univerjs-pro/license',_0x408d0d(0x172),_0x408d0d(0x141),_0x408d0d(0x176),'rxjs',_0x408d0d(0x1a4)],_0x5946fc):(_0x1377e3=typeof globalThis<'u'?globalThis:_0x1377e3||self,_0x5946fc(_0x1377e3[_0x408d0d(0x163)]={},_0x1377e3['UniverProCollaborationClient'],_0x1377e3[_0x408d0d(0x19d)],_0x1377e3['UniverCore'],_0x1377e3[_0x408d0d(0x1ae)],_0x1377e3[_0x408d0d(0x189)],_0x1377e3[_0x408d0d(0x1aa)],_0x1377e3[_0x408d0d(0x15c)]));}(this,function(_0x1d5ccb,_0x1191d8,_0x4782e,_0x5bd6b4,_0x3cd880,_0x5f7cca,_0x2ece76,_0xb36d5d){'use strict';const _0x9fa771=_0x12d5;const _0x239b45=_0x9fa771(0x1ac);var _0x138731=(_0x95ffa9=>(_0x95ffa9[_0x95ffa9[_0x9fa771(0x12c)]=0x0]=_0x9fa771(0x12c),_0x95ffa9[_0x95ffa9[_0x9fa771(0x16d)]=0x1]=_0x9fa771(0x16d),_0x95ffa9[_0x95ffa9[_0x9fa771(0x12e)]=-0x1]=_0x9fa771(0x12e),_0x95ffa9))(_0x138731||{}),_0x361175=(_0x32a959=>(_0x32a959[_0x32a959[_0x9fa771(0x19e)]=0x0]=_0x9fa771(0x19e),_0x32a959[_0x32a959[_0x9fa771(0x16e)]=0x1]=_0x9fa771(0x16e),_0x32a959[_0x32a959[_0x9fa771(0x156)]=0x2]=_0x9fa771(0x156),_0x32a959[_0x32a959[_0x9fa771(0x155)]=0x3]=_0x9fa771(0x155),_0x32a959[_0x32a959[_0x9fa771(0x137)]=0x4]=_0x9fa771(0x137),_0x32a959[_0x32a959[_0x9fa771(0x1b0)]=0x5]=_0x9fa771(0x1b0),_0x32a959[_0x32a959[_0x9fa771(0x12e)]=-0x1]='UNRECOGNIZED',_0x32a959))(_0x361175||{});const _0x1ecdff=_0x40b9bf=>_0x5bd6b4[_0x9fa771(0x187)](new Date(+_0x40b9bf))[_0x9fa771(0x13a)](_0x9fa771(0x157)),_0x38afd0=async(_0x12a80b,_0x53f814)=>{const _0x241d5c=_0x9fa771,_0x15e002=_0x12a80b['get'](_0x5bd6b4[_0x241d5c(0x16c)]),_0x45fe36=_0x12a80b[_0x241d5c(0x18c)](_0xb36d5d['HTTPService']);_0x53f814[_0x241d5c(0x14d)](_0x5af8b6=>{const _0x3ceae0=_0x241d5c;_0x15e002['getUser'](_0x5af8b6)&&_0x53f814[_0x3ceae0(0x159)](_0x5af8b6);}),_0x53f814[_0x241d5c(0x146)]&&(await _0x45fe36['get'](_0x241d5c(0x158),{'params':{'userIDs':[..._0x53f814]}}))[_0x241d5c(0x182)][_0x241d5c(0x165)][_0x241d5c(0x14d)](_0x839be4=>{const _0x28f46e=_0x241d5c;_0x839be4&&_0x15e002[_0x28f46e(0x194)](_0x839be4);});};var _0x46ed57=Object[_0x9fa771(0x1a9)],_0xbc64b1=(_0x4c6de1,_0x5f24ba,_0x1deeac,_0x1303c8)=>{const _0x44a87b=_0x9fa771;for(var _0x1407ff=_0x1303c8>0x1?void 0x0:_0x1303c8?_0x46ed57(_0x5f24ba,_0x1deeac):_0x5f24ba,_0xd31452=_0x4c6de1[_0x44a87b(0x1af)]-0x1,_0x5274cf;_0xd31452>=0x0;_0xd31452--)(_0x5274cf=_0x4c6de1[_0xd31452])&&(_0x1407ff=_0x5274cf(_0x1407ff)||_0x1407ff);return _0x1407ff;},_0x4f1349=(_0x166d95,_0x175fd5)=>(_0x2e0a57,_0x139c6e)=>_0x175fd5(_0x2e0a57,_0x139c6e,_0x166d95);let _0x16ae8b=class extends _0x5bd6b4[_0x9fa771(0x152)]{constructor(_0x1b6a7f,_0x5a77a5,_0xf0638d,_0x58f838){const _0x33e26a=_0x9fa771;super(),this['_commentService']=_0x1b6a7f,this[_0x33e26a(0x135)]=_0x5a77a5,this[_0x33e26a(0x139)]=_0xf0638d,this['_injector']=_0x58f838,this['_init'](),this['_initUserSync']();}['_initUserSync'](){const _0x265a73=_0x9fa771;this[_0x265a73(0x147)](this[_0x265a73(0x135)][_0x265a73(0x18e)][_0x265a73(0x1a5)](_0x2ece76[_0x265a73(0x186)](0x10))[_0x265a73(0x180)](_0x3aa134=>{const _0x2093c0=_0x265a73,_0x3111da=new Set();_0x3aa134[_0x2093c0(0x14d)](_0x1125ee=>{const _0x45fcb4=_0x2093c0;switch(_0x1125ee[_0x45fcb4(0x138)]){case'add':{const _0x1ad30f=_0x1125ee[_0x45fcb4(0x17d)][_0x45fcb4(0x167)];_0x3111da['add'](_0x1ad30f);break;}}}),_0x38afd0(this[_0x2093c0(0x1b2)],_0x3111da);}));}['_init'](){const _0xd41f15=_0x9fa771;this[_0xd41f15(0x147)](this[_0xd41f15(0x190)][_0xd41f15(0x18e)][_0xd41f15(0x180)](async _0x338a62=>{const _0x498459=_0xd41f15;var _0x3538d3,_0x4a82f1,_0x2e119d,_0x2558f9;const _0x167571=(_0x3538d3=this[_0x498459(0x135)][_0x498459(0x134)](_0x338a62[_0x498459(0x132)])[_0x498459(0x15e)](_0x4623ec=>_0x4623ec[_0x498459(0x1a7)]===_0x338a62[_0x498459(0x1a7)]))==null?void 0x0:_0x3538d3[_0x498459(0x160)];if(!_0x167571)return;const {unitId:_0xdab231,subUnitId:_0x55a7e3}=_0x167571;switch(_0x338a62[_0x498459(0x15b)]&&this[_0x498459(0x139)]['addUser'](_0x338a62['user']),_0x338a62[_0x498459(0x138)]){case _0x361175[_0x498459(0x16e)]:break;case _0x361175[_0x498459(0x156)]:{this[_0x498459(0x135)][_0x498459(0x151)](_0xdab231,_0x55a7e3,{'unitId':_0xdab231,'subUnitId':_0x55a7e3,'ref':'','id':_0x338a62[_0x498459(0x14c)],'dT':_0x1ecdff(+_0x338a62[_0x498459(0x1ab)]),'threadId':_0x338a62[_0x498459(0x1a7)],'personId':(_0x2e119d=(_0x4a82f1=_0x338a62[_0x498459(0x15b)])==null?void 0x0:_0x4a82f1['userID'])!=null?_0x2e119d:_0x338a62['userId'],'text':JSON[_0x498459(0x15a)](_0x338a62[_0x498459(0x1a6)]),'parentId':_0x167571['id']});break;}case _0x361175['Delete']:{const _0x1378a9=this[_0x498459(0x135)][_0x498459(0x169)](_0xdab231,_0x55a7e3,_0x338a62[_0x498459(0x14c)]);_0x1378a9&&_0x1378a9['parentId']&&this[_0x498459(0x135)][_0x498459(0x13e)](_0xdab231,_0x55a7e3,_0x338a62['replyId']);break;}case _0x361175[_0x498459(0x155)]:{this['_threadCommentModel'][_0x498459(0x177)](_0xdab231,_0x55a7e3,{'commentId':_0x338a62['replyId'],'text':JSON['parse'](_0x338a62[_0x498459(0x1a6)])});break;}case _0x361175['Solve']:{const _0xbf356a=(_0x2558f9=this['_threadCommentModel'][_0x498459(0x134)](_0x338a62[_0x498459(0x132)])[_0x498459(0x15e)](_0xefe5cd=>_0xefe5cd[_0x498459(0x1a7)]===_0x338a62[_0x498459(0x1a7)]))==null?void 0x0:_0x2558f9[_0x498459(0x160)];_0xbf356a&&this['_threadCommentModel'][_0x498459(0x17e)](_0xdab231,_0x55a7e3,_0xbf356a['id'],_0x338a62[_0x498459(0x179)]===_0x138731['Solved']);break;}}}));}};_0x16ae8b=_0xbc64b1([_0x4f1349(0x0,_0x5bd6b4[_0x9fa771(0x197)](_0x1191d8[_0x9fa771(0x168)])),_0x4f1349(0x1,_0x5bd6b4[_0x9fa771(0x197)](_0x5f7cca['ThreadCommentModel'])),_0x4f1349(0x2,_0x5bd6b4['Inject'](_0x5bd6b4['UserManagerService'])),_0x4f1349(0x3,_0x5bd6b4['Inject'](_0x5bd6b4['Injector']))],_0x16ae8b);const _0x4c8cfc='thread-comment-data-source.config',_0x22b8a9={};var _0x2ff9a7=Object[_0x9fa771(0x1a9)],_0x56addd=(_0x20129c,_0x2c8339,_0x39d554,_0x5aa305)=>{const _0x1f8601=_0x9fa771;for(var _0x4faffb=_0x5aa305>0x1?void 0x0:_0x5aa305?_0x2ff9a7(_0x2c8339,_0x39d554):_0x2c8339,_0x7471c2=_0x20129c[_0x1f8601(0x1af)]-0x1,_0x747c90;_0x7471c2>=0x0;_0x7471c2--)(_0x747c90=_0x20129c[_0x7471c2])&&(_0x4faffb=_0x747c90(_0x4faffb)||_0x4faffb);return _0x4faffb;},_0x32921a=(_0x3f5989,_0x2bd83e)=>(_0x25c127,_0x179078)=>_0x2bd83e(_0x25c127,_0x179078,_0x3f5989);function _0x4d1c32(_0x37d91d,_0x237aba){const _0x45ab8c=_0x9fa771,_0x23d12b=_0x37d91d['replies'][0x0];return{..._0x237aba,'id':_0x23d12b[_0x45ab8c(0x14c)],'resolved':_0x37d91d[_0x45ab8c(0x179)]===0x1,'dT':_0x1ecdff(_0x23d12b[_0x45ab8c(0x1ab)]),'personId':_0x23d12b[_0x45ab8c(0x1a3)],'threadId':_0x23d12b[_0x45ab8c(0x1a7)]};}function _0x1ae582(_0x580980,_0x3dc028,_0x251917){const _0x2ae5b6=_0x9fa771;var _0x206461,_0x14ceb1;if(((_0x14ceb1=(_0x206461=_0x580980==null?void 0x0:_0x580980[_0x2ae5b6(0x196)])==null?void 0x0:_0x206461[_0x2ae5b6(0x1af)])!=null?_0x14ceb1:0x0)>0x0){const _0x3fc0e3=(_0x36558c,_0x5113be)=>({'id':_0x36558c[_0x2ae5b6(0x14c)],'threadId':_0x36558c[_0x2ae5b6(0x1a7)],'dT':_0x1ecdff(_0x36558c[_0x2ae5b6(0x1ab)]),'personId':_0x36558c['userId'],'resolved':_0x580980[_0x2ae5b6(0x179)]===_0x138731[_0x2ae5b6(0x16d)],'unitId':_0x3dc028,'subUnitId':_0x251917,'text':JSON[_0x2ae5b6(0x15a)](_0x36558c[_0x2ae5b6(0x1a6)]),'parentId':_0x5113be}),_0x1ff9b2=_0x3fc0e3(_0x580980[_0x2ae5b6(0x196)][0x0]);return{..._0x1ff9b2,'children':_0x580980[_0x2ae5b6(0x196)][_0x2ae5b6(0x1b3)](0x1)[_0x2ae5b6(0x170)](_0x3b5c29=>_0x3fc0e3(_0x3b5c29,_0x1ff9b2['id']))};}return null;}let _0x5a40ac=class{constructor(_0x5426fa,_0x30cad5,_0x542f12){const _0x4b996c=_0x9fa771;this[_0x4b996c(0x140)]=_0x5426fa,this[_0x4b996c(0x139)]=_0x30cad5,this[_0x4b996c(0x1a8)]=_0x542f12;}async[_0x9fa771(0x151)](_0x38a377){const _0x5adc4d=_0x9fa771;var _0x368e05,_0x2693e6;const {parentId:_0x5b43bb,unitId:_0x52a624,text:_0x4df48a,threadId:_0x4cef0f}=_0x38a377,_0x39e506=(_0x2693e6=(_0x368e05=_0x4df48a[_0x5adc4d(0x14f)])==null?void 0x0:_0x368e05[_0x5adc4d(0x15f)](_0x5f0cb7=>_0x5f0cb7[_0x5adc4d(0x174)]===_0x5bd6b4[_0x5adc4d(0x1a1)][_0x5adc4d(0x1a2)])[_0x5adc4d(0x170)](_0x3d3bcc=>_0x3d3bcc['rangeId']))!=null?_0x2693e6:[],_0x3c6aa2=JSON[_0x5adc4d(0x181)](_0x4df48a),_0x39e620=(await this[_0x5adc4d(0x1a8)]['requireSession'](_0x52a624))[_0x5adc4d(0x19c)]();if(_0x5b43bb){const _0x108f4c={'memberId':_0x39e620,'unitId':_0x52a624,'content':_0x3c6aa2,'mention':_0x39e506,'threadId':_0x4cef0f},_0xeabd71=(await this['_httpService'][_0x5adc4d(0x18b)](_0x5adc4d(0x18d)+_0x52a624+_0x5adc4d(0x18a),{'body':_0x108f4c}))[_0x5adc4d(0x182)][_0x5adc4d(0x164)];return{..._0x38a377,'id':_0xeabd71[_0x5adc4d(0x14c)],'dT':_0x5bd6b4[_0x5adc4d(0x187)](+_0xeabd71['createTimestamp'])[_0x5adc4d(0x13a)](_0x5adc4d(0x157)),'personId':_0xeabd71[_0x5adc4d(0x1a3)]};}else{const _0x5a6440={'memberId':_0x39e620,'unitId':_0x52a624,'content':_0x3c6aa2,'mention':_0x39e506},_0x1c3735=await this[_0x5adc4d(0x140)]['post'](_0x5adc4d(0x18d)+_0x52a624+'/add',{'body':_0x5a6440});return _0x4d1c32(_0x1c3735['body'][_0x5adc4d(0x136)],_0x38a377);}}async[_0x9fa771(0x177)](_0x1abdd0){const _0x1dbdf0=_0x9fa771;var _0x59d274,_0x442b3c;const {text:_0x338cb5,unitId:_0x58c5b6}=_0x1abdd0,_0x1fe9a7=(_0x442b3c=(_0x59d274=_0x338cb5['customRanges'])==null?void 0x0:_0x59d274[_0x1dbdf0(0x15f)](_0x6fb7a6=>_0x6fb7a6[_0x1dbdf0(0x174)]===_0x5bd6b4['CustomRangeType'][_0x1dbdf0(0x1a2)])[_0x1dbdf0(0x170)](_0x4f827b=>_0x4f827b[_0x1dbdf0(0x191)]))!=null?_0x442b3c:[],_0x4d22f2=JSON[_0x1dbdf0(0x181)](_0x338cb5),_0x5efb9f=_0x1abdd0[_0x1dbdf0(0x1a7)],_0x5a1d79=_0x1abdd0['id'],_0x1b5ab2={'memberId':(await this[_0x1dbdf0(0x1a8)][_0x1dbdf0(0x19a)](_0x58c5b6))[_0x1dbdf0(0x19c)](),'unitId':_0x58c5b6,'threadId':_0x5efb9f,'mention':_0x1fe9a7,'content':_0x4d22f2,'replyId':_0x5a1d79},_0x7631db=await this[_0x1dbdf0(0x140)][_0x1dbdf0(0x18b)](_0x1dbdf0(0x18d)+_0x58c5b6+'/edit',{'body':_0x1b5ab2});return!_0x7631db['body'][_0x1dbdf0(0x150)]||_0x7631db['body'][_0x1dbdf0(0x150)][_0x1dbdf0(0x131)]===0x1;}async[_0x9fa771(0x17e)](_0x1440ae){const _0x51568e=_0x9fa771,{unitId:_0x2025ee}=_0x1440ae,_0x143604=_0x1440ae[_0x51568e(0x1a7)],_0x36c771={'memberId':this[_0x51568e(0x139)][_0x51568e(0x15d)]()[_0x51568e(0x188)],'unitId':_0x2025ee,'threadId':_0x143604,'solved':_0x1440ae['resolved']?_0x138731[_0x51568e(0x16d)]:_0x138731[_0x51568e(0x12c)]},_0x55e9e1=await this[_0x51568e(0x140)]['post'](_0x51568e(0x18d)+_0x2025ee+_0x51568e(0x153),{'body':_0x36c771});return!_0x55e9e1[_0x51568e(0x182)][_0x51568e(0x150)]||_0x55e9e1[_0x51568e(0x182)]['error']['code']===0x1;}async[_0x9fa771(0x13e)](_0x448e20,_0x5e5a8b,_0x156b68,_0x25e98d){const _0xcc1524=_0x9fa771,_0x4f98e8={'memberId':(await this[_0xcc1524(0x1a8)][_0xcc1524(0x19a)](_0x448e20))[_0xcc1524(0x19c)](),'threadId':_0x156b68,'replyId':_0x25e98d,'unitId':_0x448e20},_0x17ce1b=await this[_0xcc1524(0x140)][_0xcc1524(0x18b)](_0xcc1524(0x18d)+_0x448e20+_0xcc1524(0x12a),{'body':_0x4f98e8});return!_0x17ce1b[_0xcc1524(0x182)]['error']||_0x17ce1b[_0xcc1524(0x182)][_0xcc1524(0x150)][_0xcc1524(0x131)]===0x1;}async[_0x9fa771(0x17c)](_0x434afd,_0x151b56,_0x528c54){const _0x99289b=_0x9fa771,_0x397784={'unitId':_0x434afd,'threadId':_0x528c54},_0x3bc8ac=await this[_0x99289b(0x140)]['post'](_0x99289b(0x18d)+_0x434afd+_0x99289b(0x16b),{'body':_0x397784}),_0x4fad26=_0x528c54[_0x99289b(0x170)](_0xf2117b=>_0x1ae582(_0x3bc8ac['body'][_0x99289b(0x185)][_0xf2117b],_0x434afd,_0x151b56))[_0x99289b(0x15f)](Boolean);return Object[_0x99289b(0x16f)](_0x3bc8ac[_0x99289b(0x182)][_0x99289b(0x165)])[_0x99289b(0x14d)](_0x13b229=>{const _0x3d028b=_0x99289b;this['_userService'][_0x3d028b(0x194)](_0x13b229);}),_0x4fad26;}[_0x9fa771(0x1a0)](_0x54148a){const _0x6c163e=_0x9fa771;return{'id':_0x54148a['id'],'threadId':_0x54148a[_0x6c163e(0x1a7)],'ref':_0x54148a[_0x6c163e(0x17f)]};}};_0x5a40ac=_0x56addd([_0x32921a(0x0,_0x5bd6b4[_0x9fa771(0x197)](_0xb36d5d[_0x9fa771(0x154)])),_0x32921a(0x1,_0x5bd6b4[_0x9fa771(0x197)](_0x5bd6b4['UserManagerService'])),_0x32921a(0x2,_0x5bd6b4[_0x9fa771(0x197)](_0x1191d8[_0x9fa771(0x162)]))],_0x5a40ac);var _0x24b19c=Object[_0x9fa771(0x1a9)],_0x4cb378=(_0x2c37e5,_0x15d83d,_0x5c85c4,_0x16b366)=>{const _0x30805e=_0x9fa771;for(var _0x5b543a=_0x16b366>0x1?void 0x0:_0x16b366?_0x24b19c(_0x15d83d,_0x5c85c4):_0x15d83d,_0x4b7240=_0x2c37e5[_0x30805e(0x1af)]-0x1,_0x48d266;_0x4b7240>=0x0;_0x4b7240--)(_0x48d266=_0x2c37e5[_0x4b7240])&&(_0x5b543a=_0x48d266(_0x5b543a)||_0x5b543a);return _0x5b543a;},_0x52c1d3=(_0x23253d,_0x5e018c)=>(_0x466d29,_0x3dd8c1)=>_0x5e018c(_0x466d29,_0x3dd8c1,_0x23253d);let _0x278b45=class extends _0x5bd6b4[_0x9fa771(0x152)]{constructor(_0x28fb34,_0x266028){const _0x4068c5=_0x9fa771;super(),this[_0x4068c5(0x143)]=_0x28fb34,this[_0x4068c5(0x12f)]=_0x266028,this[_0x4068c5(0x13d)]();}['_initDataSource'](){const _0x5b3cfb=_0x9fa771;this[_0x5b3cfb(0x143)][_0x5b3cfb(0x144)]=this[_0x5b3cfb(0x12f)],this[_0x5b3cfb(0x143)][_0x5b3cfb(0x19b)]=!0x1;}};_0x278b45=_0x4cb378([_0x52c1d3(0x0,_0x5f7cca[_0x9fa771(0x16a)]),_0x52c1d3(0x1,_0x5bd6b4[_0x9fa771(0x197)](_0x5a40ac))],_0x278b45);var _0x44bed9=Object[_0x9fa771(0x12d)],_0xb5c3c5=Object['getOwnPropertyDescriptor'],_0x17c4b2=(_0x42ebac,_0xea3dfe,_0x20f257)=>_0xea3dfe in _0x42ebac?_0x44bed9(_0x42ebac,_0xea3dfe,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20f257}):_0x42ebac[_0xea3dfe]=_0x20f257,_0x13e714=(_0x326b29,_0x9ea313,_0xa6a5f1,_0x57d67c)=>{const _0x5eb257=_0x9fa771;for(var _0x28dc81=_0x57d67c>0x1?void 0x0:_0x57d67c?_0xb5c3c5(_0x9ea313,_0xa6a5f1):_0x9ea313,_0x4508c3=_0x326b29[_0x5eb257(0x1af)]-0x1,_0x3c9df8;_0x4508c3>=0x0;_0x4508c3--)(_0x3c9df8=_0x326b29[_0x4508c3])&&(_0x28dc81=_0x3c9df8(_0x28dc81)||_0x28dc81);return _0x28dc81;},_0x1e4003=(_0x3ba760,_0x15829c)=>(_0x199be4,_0x3c73ab)=>_0x15829c(_0x199be4,_0x3c73ab,_0x3ba760),_0x1d87bf=(_0x4388a9,_0x101781,_0x4e0b9c)=>_0x17c4b2(_0x4388a9,typeof _0x101781!=_0x9fa771(0x193)?_0x101781+'':_0x101781,_0x4e0b9c);_0x1d5ccb['UniverThreadCommentDataSourcePlugin']=class extends _0x5bd6b4[_0x9fa771(0x195)]{constructor(_0x8785f3=_0x22b8a9,_0x38cfba,_0x33524f){const _0x23be70=_0x9fa771;super(),this[_0x23be70(0x14e)]=_0x8785f3,this[_0x23be70(0x1b2)]=_0x38cfba,this['_configService']=_0x33524f;const {..._0x17e30b}=_0x5bd6b4[_0x23be70(0x18f)]({},_0x22b8a9,this[_0x23be70(0x14e)]);this['_configService'][_0x23be70(0x1ad)](_0x4c8cfc,_0x17e30b);}[_0x9fa771(0x173)](){const _0xa2a758=_0x9fa771;[[_0x5a40ac],[_0x278b45],[_0x16ae8b]][_0xa2a758(0x14d)](_0x1c6c5c=>{const _0x55cf49=_0xa2a758;this[_0x55cf49(0x1b2)]['add'](_0x1c6c5c);});}[_0x9fa771(0x161)](){const _0x4ff45c=_0x9fa771;this['_injector'][_0x4ff45c(0x18c)](_0x278b45),this[_0x4ff45c(0x1b2)][_0x4ff45c(0x18c)](_0x16ae8b);}},_0x1d87bf(_0x1d5ccb[_0x9fa771(0x175)],_0x9fa771(0x148),_0x239b45),_0x1d87bf(_0x1d5ccb[_0x9fa771(0x175)],_0x9fa771(0x138),_0x5bd6b4[_0x9fa771(0x17b)][_0x9fa771(0x13b)]),_0x1d5ccb[_0x9fa771(0x175)]=_0x13e714([_0x5bd6b4[_0x9fa771(0x184)](_0x3cd880[_0x9fa771(0x12b)],_0x1191d8[_0x9fa771(0x192)],_0x4782e[_0x9fa771(0x178)]),_0x1e4003(0x1,_0x5bd6b4[_0x9fa771(0x197)](_0x5bd6b4[_0x9fa771(0x17a)])),_0x1e4003(0x2,_0x5bd6b4['IConfigService'])],_0x1d5ccb[_0x9fa771(0x175)]),Object[_0x9fa771(0x12d)](_0x1d5ccb,Symbol['toStringTag'],{'value':_0x9fa771(0x1b1)});}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.9",
|
|
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.10.
|
|
49
|
-
"@univerjs/
|
|
50
|
-
"@univerjs
|
|
51
|
-
"@univerjs/network": "0.10.8-nightly.202509200616",
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.10.9",
|
|
49
|
+
"@univerjs-pro/license": "0.10.9",
|
|
50
|
+
"@univerjs/network": "0.10.9",
|
|
52
51
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/thread-comment
|
|
52
|
+
"@univerjs/core": "0.10.9",
|
|
53
|
+
"@univerjs/thread-comment": "0.10.9",
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.10.9"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|
|
58
58
|
"typescript": "^5.9.2",
|
|
59
59
|
"vite": "^7.1.3",
|
|
60
60
|
"vitest": "^3.2.4",
|
|
61
|
-
"@univerjs-infra/shared": "0.10.
|
|
61
|
+
"@univerjs-infra/shared": "0.10.9"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run",
|