@univerjs-pro/thread-comment-datasource 0.12.2-experimental.20251201-5b27b55 → 0.12.2-experimental.20251202-7f1a98f
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 _0x4f38b=_0x197d;(function(_0xaed30e,_0x2ecd97){const _0x53f5d7=_0x197d,_0x4e42ee=_0xaed30e();while(!![]){try{const _0x395cd1=-parseInt(_0x53f5d7(0x206))/0x1+-parseInt(_0x53f5d7(0x1cb))/0x2*(-parseInt(_0x53f5d7(0x1f3))/0x3)+-parseInt(_0x53f5d7(0x1d9))/0x4+parseInt(_0x53f5d7(0x1da))/0x5+parseInt(_0x53f5d7(0x222))/0x6+-parseInt(_0x53f5d7(0x202))/0x7*(parseInt(_0x53f5d7(0x1f4))/0x8)+parseInt(_0x53f5d7(0x218))/0x9;if(_0x395cd1===_0x2ecd97)break;else _0x4e42ee['push'](_0x4e42ee['shift']());}catch(_0x334fcf){_0x4e42ee['push'](_0x4e42ee['shift']());}}}(_0x35ee,0xd0adc));Object[_0x4f38b(0x1fb)](exports,Symbol['toStringTag'],{'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=_0x4f38b(0x1f7);var I=(_0x2cf311=>(_0x2cf311[_0x2cf311['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x2cf311[_0x2cf311[_0x4f38b(0x1ee)]=0x1]='Solved',_0x2cf311[_0x2cf311['UNRECOGNIZED']=-0x1]=_0x4f38b(0x22c),_0x2cf311))(I||{}),v=(_0xe10652=>(_0xe10652[_0xe10652['Unknown']=0x0]=_0x4f38b(0x21e),_0xe10652[_0xe10652[_0x4f38b(0x20c)]=0x1]=_0x4f38b(0x20c),_0xe10652[_0xe10652[_0x4f38b(0x20b)]=0x2]='Reply',_0xe10652[_0xe10652[_0x4f38b(0x210)]=0x3]=_0x4f38b(0x210),_0xe10652[_0xe10652[_0x4f38b(0x1c5)]=0x4]=_0x4f38b(0x1c5),_0xe10652[_0xe10652[_0x4f38b(0x1bc)]=0x5]=_0x4f38b(0x1bc),_0xe10652[_0xe10652[_0x4f38b(0x22c)]=-0x1]=_0x4f38b(0x22c),_0xe10652))(v||{});const f=_0x1854ac=>c['dayjs'](new Date(+_0x1854ac))[_0x4f38b(0x1f9)](_0x4f38b(0x1dc)),R=async(_0x1d3f45,_0x770f4a)=>{const _0x38f2ad=_0x4f38b,_0x2743b0=_0x1d3f45[_0x38f2ad(0x1de)](c[_0x38f2ad(0x1c4)]),_0x294cf7=_0x1d3f45[_0x38f2ad(0x1de)](P['HTTPService']);_0x770f4a[_0x38f2ad(0x215)](_0x4bcf1e=>{const _0x1458d6=_0x38f2ad;_0x2743b0[_0x1458d6(0x219)](_0x4bcf1e)&&_0x770f4a[_0x1458d6(0x216)](_0x4bcf1e);}),_0x770f4a['size']&&(await _0x294cf7[_0x38f2ad(0x1de)](_0x38f2ad(0x21a),{'params':{'userIDs':[..._0x770f4a]}}))[_0x38f2ad(0x1ec)]['users'][_0x38f2ad(0x215)](_0x157af8=>{const _0x438b4c=_0x38f2ad;_0x157af8&&_0x2743b0[_0x438b4c(0x1b9)](_0x157af8);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x52f295,_0x295301,_0x19ed69,_0x1aaed5)=>{const _0x478fa4=_0x4f38b;for(var _0x6eaad9=_0x1aaed5>0x1?void 0x0:_0x1aaed5?$(_0x295301,_0x19ed69):_0x295301,_0x4cb6b1=_0x52f295[_0x478fa4(0x22b)]-0x1,_0x35ef37;_0x4cb6b1>=0x0;_0x4cb6b1--)(_0x35ef37=_0x52f295[_0x4cb6b1])&&(_0x6eaad9=_0x35ef37(_0x6eaad9)||_0x6eaad9);return _0x6eaad9;},S=(_0x40f050,_0x2def6d)=>(_0x2a7c6d,_0x45a8ac)=>_0x2def6d(_0x2a7c6d,_0x45a8ac,_0x40f050);let _=class extends c['Disposable']{constructor(_0xc904a1,_0x2deec9,_0x2e459c,_0x143f24){const _0x308646=_0x4f38b;super(),this[_0x308646(0x1ea)]=_0xc904a1,this[_0x308646(0x1d2)]=_0x2deec9,this[_0x308646(0x1fe)]=_0x2e459c,this[_0x308646(0x1ef)]=_0x143f24,this[_0x308646(0x1c0)](),this['_initUserSync']();}['_initUserSync'](){const _0x36abe4=_0x4f38b;this[_0x36abe4(0x1c9)](this[_0x36abe4(0x1d2)][_0x36abe4(0x1ba)][_0x36abe4(0x1d8)](j[_0x36abe4(0x1bd)](0x10))['subscribe'](_0x24b3dc=>{const _0x496816=new Set();_0x24b3dc['forEach'](_0x47bbb4=>{const _0x1ae2ad=_0x197d;switch(_0x47bbb4[_0x1ae2ad(0x1e3)]){case _0x1ae2ad(0x1c7):{const _0x457fa8=_0x47bbb4['payload'][_0x1ae2ad(0x20a)];_0x496816['add'](_0x457fa8);break;}}}),R(this['_injector'],_0x496816);}));}[_0x4f38b(0x1c0)](){const _0x256d47=_0x4f38b;this[_0x256d47(0x1c9)](this['_commentService'][_0x256d47(0x1ba)]['subscribe'](async _0x1d00ce=>{const _0x4edfc8=_0x256d47;var _0xcafc4e,_0x36ff37,_0x1612b5,_0x269e75;const _0x3b5641=(_0xcafc4e=this['_threadCommentModel'][_0x4edfc8(0x1d5)](_0x1d00ce[_0x4edfc8(0x205)])['find'](_0x312e7d=>_0x312e7d[_0x4edfc8(0x213)]===_0x1d00ce[_0x4edfc8(0x213)]))==null?void 0x0:_0xcafc4e[_0x4edfc8(0x1ed)];if(!_0x3b5641)return;const {unitId:_0x3166f7,subUnitId:_0x7ff5fe}=_0x3b5641;switch(_0x1d00ce['user']&&this[_0x4edfc8(0x1fe)][_0x4edfc8(0x1b9)](_0x1d00ce[_0x4edfc8(0x1d4)]),_0x1d00ce[_0x4edfc8(0x1e3)]){case v['Add']:break;case v['Reply']:{this['_threadCommentModel'][_0x4edfc8(0x1ce)](_0x3166f7,_0x7ff5fe,{'unitId':_0x3166f7,'subUnitId':_0x7ff5fe,'ref':'','id':_0x1d00ce[_0x4edfc8(0x1ff)],'dT':f(+_0x1d00ce[_0x4edfc8(0x22d)]),'threadId':_0x1d00ce[_0x4edfc8(0x213)],'personId':(_0x1612b5=(_0x36ff37=_0x1d00ce[_0x4edfc8(0x1d4)])==null?void 0x0:_0x36ff37['userID'])!=null?_0x1612b5:_0x1d00ce[_0x4edfc8(0x1d1)],'text':JSON[_0x4edfc8(0x1fa)](_0x1d00ce[_0x4edfc8(0x1f6)]),'parentId':_0x3b5641['id']});break;}case v['Delete']:{const _0x3db41c=this[_0x4edfc8(0x1d2)][_0x4edfc8(0x1dd)](_0x3166f7,_0x7ff5fe,_0x1d00ce['replyId']);_0x3db41c&&_0x3db41c[_0x4edfc8(0x1bb)]&&this['_threadCommentModel'][_0x4edfc8(0x221)](_0x3166f7,_0x7ff5fe,_0x1d00ce[_0x4edfc8(0x1ff)]);break;}case v[_0x4edfc8(0x210)]:{this[_0x4edfc8(0x1d2)][_0x4edfc8(0x1c2)](_0x3166f7,_0x7ff5fe,{'commentId':_0x1d00ce[_0x4edfc8(0x1ff)],'text':JSON[_0x4edfc8(0x1fa)](_0x1d00ce[_0x4edfc8(0x1f6)])});break;}case v[_0x4edfc8(0x1bc)]:{const _0xb2e13a=(_0x269e75=this['_threadCommentModel'][_0x4edfc8(0x1d5)](_0x1d00ce['unitId'])[_0x4edfc8(0x1cd)](_0x422327=>_0x422327['threadId']===_0x1d00ce[_0x4edfc8(0x213)]))==null?void 0x0:_0x269e75[_0x4edfc8(0x1ed)];_0xb2e13a&&this[_0x4edfc8(0x1d2)]['resolveComment'](_0x3166f7,_0x7ff5fe,_0xb2e13a['id'],_0x1d00ce[_0x4edfc8(0x212)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x4f38b(0x226)](b[_0x4f38b(0x1cc)])),S(0x1,c[_0x4f38b(0x226)](M[_0x4f38b(0x1df)])),S(0x2,c[_0x4f38b(0x226)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x4f38b(0x21b)]))],_);const q=_0x4f38b(0x21f),D={};function _0x197d(_0x26a937,_0x4f1c7a){const _0x35ee6d=_0x35ee();return _0x197d=function(_0x197d1c,_0x3afea8){_0x197d1c=_0x197d1c-0x1b9;let _0x925a=_0x35ee6d[_0x197d1c];return _0x925a;},_0x197d(_0x26a937,_0x4f1c7a);}var A=Object[_0x4f38b(0x203)],x=(_0x56d906,_0x38ba82,_0x58e858,_0x1a1999)=>{const _0x42c6ef=_0x4f38b;for(var _0x48a824=_0x1a1999>0x1?void 0x0:_0x1a1999?A(_0x38ba82,_0x58e858):_0x38ba82,_0x4276b6=_0x56d906[_0x42c6ef(0x22b)]-0x1,_0x636c97;_0x4276b6>=0x0;_0x4276b6--)(_0x636c97=_0x56d906[_0x4276b6])&&(_0x48a824=_0x636c97(_0x48a824)||_0x48a824);return _0x48a824;},C=(_0x4de1ee,_0x5abf56)=>(_0x4306d5,_0x5582fd)=>_0x5abf56(_0x4306d5,_0x5582fd,_0x4de1ee);function Y(_0x70299c,_0x47badb){const _0x2ebc8e=_0x4f38b,_0xbd32c6=_0x70299c['replies'][0x0];return{..._0x47badb,'id':_0xbd32c6[_0x2ebc8e(0x1ff)],'resolved':_0x70299c[_0x2ebc8e(0x212)]===0x1,'dT':f(_0xbd32c6[_0x2ebc8e(0x22d)]),'personId':_0xbd32c6[_0x2ebc8e(0x1d1)],'threadId':_0xbd32c6[_0x2ebc8e(0x213)]};}function _0x35ee(){const _0x4e88f7=['Edit','_configService','solved','threadId','requireSession','forEach','delete','OpenOrReOpen','7268247moFPUP','getUser','/universer-api/user/list','Injector','UniverThreadCommentDataSourcePlugin','resolveComment','Unknown','thread-comment-data-source.config','UniverInstanceType','deleteComment','2592012zdHmrZ','/delete','rangeId','/universer-api/comment/unit/','Inject','onReady','pluginName','UNIVER_UNKNOWN','/reply','length','UNRECOGNIZED','createTimestamp','resolved','addUser','commentUpdate$','parentId','Solve','bufferTime','users','_threadCommentDataSource','_init','IThreadCommentDataSourceService','updateComment','/add','UserManagerService','Delete','slice','add','Plugin','disposeWithMe','listComments','58LgEoIS','CommentService','find','addComment','ref','UniverLicensePlugin','userId','_threadCommentModel','userID','user','getUnit','comments','/edit','pipe','5299840meBLon','5556510dseqci','dataSource','YYYY/MM/DD\x20HH:mm','getComment','get','ThreadCommentModel','values','getCurrentUser','_initDataSource','type','code','error','merge','customRanges','post','rangeType','_commentService','Disposable','body','root','Solved','_injector','_sessionService','CustomRangeType','saveCommentToSnapshot','49803GOKkip','5616MecQEx','HTTPService','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','format','parse','defineProperty','symbol','dayjs','_userService','replyId','replies','COMMENT','973gewdfN','getOwnPropertyDescriptor','_httpService','unitId','555030FphAxK','map','getMemberID','DependentOn','personId','Reply','Add','stringify','filter','_threadCommentDataSourceService'];_0x35ee=function(){return _0x4e88f7;};return _0x35ee();}function G(_0x5cb9ad,_0x23b96a,_0x19fe1c){const _0x4f7c50=_0x4f38b;var _0x1505be,_0x374e70;if(((_0x374e70=(_0x1505be=_0x5cb9ad==null?void 0x0:_0x5cb9ad[_0x4f7c50(0x200)])==null?void 0x0:_0x1505be['length'])!=null?_0x374e70:0x0)>0x0){const _0x388eb5=(_0x17f439,_0x42fcc8)=>({'id':_0x17f439[_0x4f7c50(0x1ff)],'threadId':_0x17f439[_0x4f7c50(0x213)],'dT':f(_0x17f439[_0x4f7c50(0x22d)]),'personId':_0x17f439[_0x4f7c50(0x1d1)],'resolved':_0x5cb9ad[_0x4f7c50(0x212)]===I['Solved'],'unitId':_0x23b96a,'subUnitId':_0x19fe1c,'text':JSON[_0x4f7c50(0x1fa)](_0x17f439['content']),'parentId':_0x42fcc8}),_0xfc9724=_0x388eb5(_0x5cb9ad['replies'][0x0]);return{..._0xfc9724,'children':_0x5cb9ad[_0x4f7c50(0x200)][_0x4f7c50(0x1c6)](0x1)['map'](_0x364441=>_0x388eb5(_0x364441,_0xfc9724['id']))};}return null;}let p=class{constructor(_0x4e201e,_0x137923,_0x266444){const _0x5a3bb0=_0x4f38b;this[_0x5a3bb0(0x204)]=_0x4e201e,this['_userService']=_0x137923,this[_0x5a3bb0(0x1f0)]=_0x266444;}async[_0x4f38b(0x1ce)](_0xdbe16b){const _0x29ba2d=_0x4f38b;var _0x5d38b3,_0x3076ad;const {parentId:_0x34d13b,unitId:_0x430ec2,text:_0x58772b,threadId:_0x1bee3a}=_0xdbe16b,_0x3402dc=(_0x3076ad=(_0x5d38b3=_0x58772b[_0x29ba2d(0x1e7)])==null?void 0x0:_0x5d38b3['filter'](_0xd4b430=>_0xd4b430[_0x29ba2d(0x1e9)]===c[_0x29ba2d(0x1f1)][_0x29ba2d(0x201)])['map'](_0x5b295b=>_0x5b295b[_0x29ba2d(0x224)]))!=null?_0x3076ad:[],_0x5685a6=JSON[_0x29ba2d(0x20d)](_0x58772b),_0x28cb8c=(await this[_0x29ba2d(0x1f0)][_0x29ba2d(0x214)](_0x430ec2))['getMemberID']();if(_0x34d13b){const _0xbefbac={'memberId':_0x28cb8c,'unitId':_0x430ec2,'content':_0x5685a6,'mention':_0x3402dc,'threadId':_0x1bee3a},_0x437beb=(await this[_0x29ba2d(0x204)]['post'](_0x29ba2d(0x225)+_0x430ec2+_0x29ba2d(0x22a),{'body':_0xbefbac}))['body']['reply'];return{..._0xdbe16b,'id':_0x437beb[_0x29ba2d(0x1ff)],'dT':c[_0x29ba2d(0x1fd)](+_0x437beb[_0x29ba2d(0x22d)])['format'](_0x29ba2d(0x1dc)),'personId':_0x437beb[_0x29ba2d(0x1d1)]};}else{const _0x557c3d={'memberId':_0x28cb8c,'unitId':_0x430ec2,'content':_0x5685a6,'mention':_0x3402dc},_0x33045a=await this['_httpService']['post'](_0x29ba2d(0x225)+_0x430ec2+_0x29ba2d(0x1c3),{'body':_0x557c3d});return Y(_0x33045a[_0x29ba2d(0x1ec)]['comment'],_0xdbe16b);}}async[_0x4f38b(0x1c2)](_0x1b2478){const _0xc0978e=_0x4f38b;var _0x361d7c,_0x569ebc;const {text:_0x1f2fb5,unitId:_0x50085a}=_0x1b2478,_0x4bb886=(_0x569ebc=(_0x361d7c=_0x1f2fb5[_0xc0978e(0x1e7)])==null?void 0x0:_0x361d7c[_0xc0978e(0x20e)](_0x4c245d=>_0x4c245d[_0xc0978e(0x1e9)]===c['CustomRangeType']['COMMENT'])['map'](_0x50fef7=>_0x50fef7[_0xc0978e(0x224)]))!=null?_0x569ebc:[],_0x15055b=JSON['stringify'](_0x1f2fb5),_0x245910=_0x1b2478[_0xc0978e(0x213)],_0x5bfa92=_0x1b2478['id'],_0x16e93d={'memberId':(await this[_0xc0978e(0x1f0)][_0xc0978e(0x214)](_0x50085a))[_0xc0978e(0x208)](),'unitId':_0x50085a,'threadId':_0x245910,'mention':_0x4bb886,'content':_0x15055b,'replyId':_0x5bfa92},_0x13d197=await this[_0xc0978e(0x204)][_0xc0978e(0x1e8)](_0xc0978e(0x225)+_0x50085a+_0xc0978e(0x1d7),{'body':_0x16e93d});return!_0x13d197[_0xc0978e(0x1ec)][_0xc0978e(0x1e5)]||_0x13d197[_0xc0978e(0x1ec)][_0xc0978e(0x1e5)][_0xc0978e(0x1e4)]===0x1;}async[_0x4f38b(0x21d)](_0x3a8152){const _0xea06b4=_0x4f38b,{unitId:_0x3517d8}=_0x3a8152,_0x4fd556=_0x3a8152['threadId'],_0x525d63={'memberId':this[_0xea06b4(0x1fe)][_0xea06b4(0x1e1)]()[_0xea06b4(0x1d3)],'unitId':_0x3517d8,'threadId':_0x4fd556,'solved':_0x3a8152[_0xea06b4(0x22e)]?I[_0xea06b4(0x1ee)]:I[_0xea06b4(0x217)]},_0xb32f0f=await this[_0xea06b4(0x204)][_0xea06b4(0x1e8)](_0xea06b4(0x225)+_0x3517d8+'/solved',{'body':_0x525d63});return!_0xb32f0f[_0xea06b4(0x1ec)][_0xea06b4(0x1e5)]||_0xb32f0f['body']['error']['code']===0x1;}async[_0x4f38b(0x221)](_0x504d2f,_0xc3e2d0,_0x231aea,_0x147dbd){const _0x27d514=_0x4f38b,_0x42e612={'memberId':(await this[_0x27d514(0x1f0)]['requireSession'](_0x504d2f))[_0x27d514(0x208)](),'threadId':_0x231aea,'replyId':_0x147dbd,'unitId':_0x504d2f},_0x39bd78=await this[_0x27d514(0x204)][_0x27d514(0x1e8)](_0x27d514(0x225)+_0x504d2f+_0x27d514(0x223),{'body':_0x42e612});return!_0x39bd78['body'][_0x27d514(0x1e5)]||_0x39bd78[_0x27d514(0x1ec)]['error'][_0x27d514(0x1e4)]===0x1;}async[_0x4f38b(0x1ca)](_0x4eed22,_0x24bc13,_0x366245){const _0x411b67=_0x4f38b,_0x29b1bc={'unitId':_0x4eed22,'threadId':_0x366245},_0x2ea4e1=await this[_0x411b67(0x204)][_0x411b67(0x1e8)](_0x411b67(0x225)+_0x4eed22+'/list',{'body':_0x29b1bc}),_0x3f01a2=_0x366245[_0x411b67(0x207)](_0x23959e=>G(_0x2ea4e1[_0x411b67(0x1ec)][_0x411b67(0x1d6)][_0x23959e],_0x4eed22,_0x24bc13))[_0x411b67(0x20e)](Boolean);return Object[_0x411b67(0x1e0)](_0x2ea4e1['body'][_0x411b67(0x1be)])[_0x411b67(0x215)](_0x5d185c=>{const _0x29fc9c=_0x411b67;this[_0x29fc9c(0x1fe)][_0x29fc9c(0x1b9)](_0x5d185c);}),_0x3f01a2;}[_0x4f38b(0x1f2)](_0x2766ad){const _0xe05842=_0x4f38b;return{'id':_0x2766ad['id'],'threadId':_0x2766ad[_0xe05842(0x213)],'ref':_0x2766ad[_0xe05842(0x1cf)]};}};p=x([C(0x0,c[_0x4f38b(0x226)](P[_0x4f38b(0x1f5)])),C(0x1,c[_0x4f38b(0x226)](c[_0x4f38b(0x1c4)])),C(0x2,c[_0x4f38b(0x226)](b['CollaborationSessionService']))],p);var H=Object[_0x4f38b(0x203)],J=(_0xc91105,_0x3f2f4f,_0x1d84db,_0x524e9f)=>{for(var _0x4e480c=_0x524e9f>0x1?void 0x0:_0x524e9f?H(_0x3f2f4f,_0x1d84db):_0x3f2f4f,_0x11e381=_0xc91105['length']-0x1,_0x25536d;_0x11e381>=0x0;_0x11e381--)(_0x25536d=_0xc91105[_0x11e381])&&(_0x4e480c=_0x25536d(_0x4e480c)||_0x4e480c);return _0x4e480c;},y=(_0x3884a,_0x6f5dda)=>(_0xe6837f,_0x379dd0)=>_0x6f5dda(_0xe6837f,_0x379dd0,_0x3884a);let g=class extends c[_0x4f38b(0x1eb)]{constructor(_0x2edb39,_0x16ee18){const _0x51a288=_0x4f38b;super(),this[_0x51a288(0x20f)]=_0x2edb39,this[_0x51a288(0x1bf)]=_0x16ee18,this['_initDataSource']();}[_0x4f38b(0x1e2)](){const _0xc85053=_0x4f38b;this[_0xc85053(0x20f)][_0xc85053(0x1db)]=this[_0xc85053(0x1bf)],this[_0xc85053(0x20f)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4f38b(0x1c1)]),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object[_0x4f38b(0x203)],Z=(_0x361f3a,_0x1075bb,_0x234ce6)=>_0x1075bb in _0x361f3a?F(_0x361f3a,_0x1075bb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x234ce6}):_0x361f3a[_0x1075bb]=_0x234ce6,W=(_0x6b539c,_0x3b72fe,_0xb6b069,_0x48cc68)=>{const _0x205300=_0x4f38b;for(var _0x449d47=_0x48cc68>0x1?void 0x0:_0x48cc68?L(_0x3b72fe,_0xb6b069):_0x3b72fe,_0x418ce8=_0x6b539c[_0x205300(0x22b)]-0x1,_0x27c09b;_0x418ce8>=0x0;_0x418ce8--)(_0x27c09b=_0x6b539c[_0x418ce8])&&(_0x449d47=_0x27c09b(_0x449d47)||_0x449d47);return _0x449d47;},O=(_0x4193e4,_0x240168)=>(_0x2302fb,_0x5a58e5)=>_0x240168(_0x2302fb,_0x5a58e5,_0x4193e4),N=(_0x23e4bd,_0x24bc78,_0x1cd18f)=>Z(_0x23e4bd,typeof _0x24bc78!=_0x4f38b(0x1fc)?_0x24bc78+'':_0x24bc78,_0x1cd18f);exports[_0x4f38b(0x21c)]=class extends c[_0x4f38b(0x1c8)]{constructor(_0x399d73=D,_0x1a5840,_0x2256df){const _0x177325=_0x4f38b;super(),this[_0x177325(0x1f8)]=_0x399d73,this[_0x177325(0x1ef)]=_0x1a5840,this[_0x177325(0x211)]=_0x2256df;const {..._0x111d4f}=c[_0x177325(0x1e6)]({},D,this[_0x177325(0x1f8)]);this[_0x177325(0x211)]['setConfig'](q,_0x111d4f);}['onStarting'](){[[p],[g],[_]]['forEach'](_0x544443=>{const _0x4e3690=_0x197d;this[_0x4e3690(0x1ef)][_0x4e3690(0x1c7)](_0x544443);});}[_0x4f38b(0x227)](){const _0x5167f2=_0x4f38b;this['_injector'][_0x5167f2(0x1de)](g),this[_0x5167f2(0x1ef)]['get'](_);}},N(exports[_0x4f38b(0x21c)],_0x4f38b(0x228),U),N(exports[_0x4f38b(0x21c)],_0x4f38b(0x1e3),c[_0x4f38b(0x220)][_0x4f38b(0x229)]),exports[_0x4f38b(0x21c)]=W([c[_0x4f38b(0x209)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x4f38b(0x1d0)]),O(0x1,c[_0x4f38b(0x226)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4f38b(0x21c)]);
|
|
1
|
+
'use strict';const _0x16506a=_0x3f84;(function(_0x5b9007,_0x2f4040){const _0xd28f7f=_0x3f84,_0x5b88fd=_0x5b9007();while(!![]){try{const _0x34460c=parseInt(_0xd28f7f(0x11a))/0x1*(parseInt(_0xd28f7f(0xb5))/0x2)+parseInt(_0xd28f7f(0xc6))/0x3*(-parseInt(_0xd28f7f(0xff))/0x4)+-parseInt(_0xd28f7f(0xba))/0x5+parseInt(_0xd28f7f(0xb9))/0x6*(parseInt(_0xd28f7f(0xdd))/0x7)+-parseInt(_0xd28f7f(0xc1))/0x8*(-parseInt(_0xd28f7f(0xcf))/0x9)+-parseInt(_0xd28f7f(0x119))/0xa+-parseInt(_0xd28f7f(0x10f))/0xb*(-parseInt(_0xd28f7f(0x112))/0xc);if(_0x34460c===_0x2f4040)break;else _0x5b88fd['push'](_0x5b88fd['shift']());}catch(_0x2c2891){_0x5b88fd['push'](_0x5b88fd['shift']());}}}(_0x1717,0x7bae3));Object[_0x16506a(0xf6)](exports,Symbol[_0x16506a(0x11c)],{'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='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0xeafbb7=>(_0xeafbb7[_0xeafbb7['OpenOrReOpen']=0x0]=_0x16506a(0x11f),_0xeafbb7[_0xeafbb7[_0x16506a(0xe7)]=0x1]=_0x16506a(0xe7),_0xeafbb7[_0xeafbb7['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xeafbb7))(I||{}),v=(_0x1c8635=>(_0x1c8635[_0x1c8635['Unknown']=0x0]='Unknown',_0x1c8635[_0x1c8635[_0x16506a(0xf5)]=0x1]=_0x16506a(0xf5),_0x1c8635[_0x1c8635[_0x16506a(0x10b)]=0x2]=_0x16506a(0x10b),_0x1c8635[_0x1c8635[_0x16506a(0xf2)]=0x3]='Edit',_0x1c8635[_0x1c8635[_0x16506a(0xed)]=0x4]=_0x16506a(0xed),_0x1c8635[_0x1c8635[_0x16506a(0xf1)]=0x5]=_0x16506a(0xf1),_0x1c8635[_0x1c8635[_0x16506a(0x11d)]=-0x1]='UNRECOGNIZED',_0x1c8635))(v||{});function _0x3f84(_0x15efed,_0x1b44ef){const _0x1717c7=_0x1717();return _0x3f84=function(_0x3f8444,_0x40c3ef){_0x3f8444=_0x3f8444-0xa9;let _0x38f383=_0x1717c7[_0x3f8444];return _0x38f383;},_0x3f84(_0x15efed,_0x1b44ef);}const f=_0x5ce5be=>c[_0x16506a(0xb2)](new Date(+_0x5ce5be))[_0x16506a(0x106)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x43d70b,_0x3a2f1b)=>{const _0x29f4e6=_0x16506a,_0x398efa=_0x43d70b['get'](c['UserManagerService']),_0x36fee2=_0x43d70b['get'](P[_0x29f4e6(0xb8)]);_0x3a2f1b[_0x29f4e6(0x108)](_0x3689e6=>{const _0x57a216=_0x29f4e6;_0x398efa[_0x57a216(0x104)](_0x3689e6)&&_0x3a2f1b[_0x57a216(0xf0)](_0x3689e6);}),_0x3a2f1b[_0x29f4e6(0xbc)]&&(await _0x36fee2[_0x29f4e6(0xdf)]('/universer-api/user/list',{'params':{'userIDs':[..._0x3a2f1b]}}))['body'][_0x29f4e6(0xde)][_0x29f4e6(0x108)](_0x372717=>{const _0x51e6c5=_0x29f4e6;_0x372717&&_0x398efa[_0x51e6c5(0x113)](_0x372717);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x1a3ef4,_0x35beaa,_0x241b1b,_0x44e478)=>{const _0x8d1adf=_0x16506a;for(var _0x53fdb3=_0x44e478>0x1?void 0x0:_0x44e478?$(_0x35beaa,_0x241b1b):_0x35beaa,_0x11ae8b=_0x1a3ef4[_0x8d1adf(0xca)]-0x1,_0x2d01d5;_0x11ae8b>=0x0;_0x11ae8b--)(_0x2d01d5=_0x1a3ef4[_0x11ae8b])&&(_0x53fdb3=_0x2d01d5(_0x53fdb3)||_0x53fdb3);return _0x53fdb3;},S=(_0x5273e6,_0x178989)=>(_0x1b632f,_0x11b184)=>_0x178989(_0x1b632f,_0x11b184,_0x5273e6);let _=class extends c[_0x16506a(0xef)]{constructor(_0x39e26d,_0x58548c,_0x5bc2c7,_0x3509c8){const _0x4e812e=_0x16506a;super(),this[_0x4e812e(0xd0)]=_0x39e26d,this['_threadCommentModel']=_0x58548c,this[_0x4e812e(0xb7)]=_0x5bc2c7,this[_0x4e812e(0xd7)]=_0x3509c8,this[_0x4e812e(0x117)](),this[_0x4e812e(0xae)]();}[_0x16506a(0xae)](){const _0x5c9e19=_0x16506a;this[_0x5c9e19(0xcc)](this['_threadCommentModel']['commentUpdate$'][_0x5c9e19(0xda)](j[_0x5c9e19(0xc9)](0x10))[_0x5c9e19(0x11e)](_0x42228c=>{const _0x2c3841=_0x5c9e19,_0x527f6f=new Set();_0x42228c[_0x2c3841(0x108)](_0x205908=>{const _0x54e14e=_0x2c3841;switch(_0x205908['type']){case _0x54e14e(0x107):{const _0x3bad8d=_0x205908['payload'][_0x54e14e(0x103)];_0x527f6f['add'](_0x3bad8d);break;}}}),R(this['_injector'],_0x527f6f);}));}[_0x16506a(0x117)](){const _0x3b0bd0=_0x16506a;this[_0x3b0bd0(0xcc)](this['_commentService'][_0x3b0bd0(0xfa)][_0x3b0bd0(0x11e)](async _0x262adc=>{const _0x2291a8=_0x3b0bd0;var _0x1c735a,_0x216672,_0x4fe499,_0x93935a;const _0x4f3c20=(_0x1c735a=this[_0x2291a8(0xf9)][_0x2291a8(0xcd)](_0x262adc['unitId'])[_0x2291a8(0xd1)](_0x1078da=>_0x1078da['threadId']===_0x262adc['threadId']))==null?void 0x0:_0x1c735a[_0x2291a8(0xe6)];if(!_0x4f3c20)return;const {unitId:_0x728dad,subUnitId:_0x26c42f}=_0x4f3c20;switch(_0x262adc[_0x2291a8(0xbd)]&&this['_userService'][_0x2291a8(0x113)](_0x262adc[_0x2291a8(0xbd)]),_0x262adc[_0x2291a8(0xc8)]){case v['Add']:break;case v['Reply']:{this[_0x2291a8(0xf9)][_0x2291a8(0xe9)](_0x728dad,_0x26c42f,{'unitId':_0x728dad,'subUnitId':_0x26c42f,'ref':'','id':_0x262adc[_0x2291a8(0xb1)],'dT':f(+_0x262adc[_0x2291a8(0xc4)]),'threadId':_0x262adc[_0x2291a8(0xea)],'personId':(_0x4fe499=(_0x216672=_0x262adc[_0x2291a8(0xbd)])==null?void 0x0:_0x216672[_0x2291a8(0xce)])!=null?_0x4fe499:_0x262adc[_0x2291a8(0xb4)],'text':JSON[_0x2291a8(0xe4)](_0x262adc[_0x2291a8(0xf3)]),'parentId':_0x4f3c20['id']});break;}case v[_0x2291a8(0xed)]:{const _0x52b35b=this[_0x2291a8(0xf9)][_0x2291a8(0xdc)](_0x728dad,_0x26c42f,_0x262adc['replyId']);_0x52b35b&&_0x52b35b['parentId']&&this[_0x2291a8(0xf9)][_0x2291a8(0x102)](_0x728dad,_0x26c42f,_0x262adc['replyId']);break;}case v[_0x2291a8(0xf2)]:{this[_0x2291a8(0xf9)][_0x2291a8(0xac)](_0x728dad,_0x26c42f,{'commentId':_0x262adc[_0x2291a8(0xb1)],'text':JSON[_0x2291a8(0xe4)](_0x262adc[_0x2291a8(0xf3)])});break;}case v['Solve']:{const _0x185ac4=(_0x93935a=this[_0x2291a8(0xf9)]['getUnit'](_0x262adc[_0x2291a8(0x120)])[_0x2291a8(0xd1)](_0x265e2b=>_0x265e2b['threadId']===_0x262adc[_0x2291a8(0xea)]))==null?void 0x0:_0x93935a[_0x2291a8(0xe6)];_0x185ac4&&this[_0x2291a8(0xf9)][_0x2291a8(0xab)](_0x728dad,_0x26c42f,_0x185ac4['id'],_0x262adc[_0x2291a8(0xaf)]===I[_0x2291a8(0xe7)]);break;}}}));}};_=E([S(0x0,c[_0x16506a(0xc2)](b['CommentService'])),S(0x1,c[_0x16506a(0xc2)](M['ThreadCommentModel'])),S(0x2,c[_0x16506a(0xc2)](c[_0x16506a(0xb3)])),S(0x3,c[_0x16506a(0xc2)](c[_0x16506a(0xc0)]))],_);const q=_0x16506a(0xcb),D={};var A=Object[_0x16506a(0xd2)],x=(_0x2bb8fd,_0x160e79,_0x575af,_0x5cfc81)=>{const _0x3611af=_0x16506a;for(var _0x3c6e80=_0x5cfc81>0x1?void 0x0:_0x5cfc81?A(_0x160e79,_0x575af):_0x160e79,_0x2af9b2=_0x2bb8fd[_0x3611af(0xca)]-0x1,_0x457b84;_0x2af9b2>=0x0;_0x2af9b2--)(_0x457b84=_0x2bb8fd[_0x2af9b2])&&(_0x3c6e80=_0x457b84(_0x3c6e80)||_0x3c6e80);return _0x3c6e80;},C=(_0x43bbae,_0x2651b3)=>(_0x459381,_0x51f892)=>_0x2651b3(_0x459381,_0x51f892,_0x43bbae);function Y(_0x5ecda6,_0x32def1){const _0x4af659=_0x16506a,_0x46e579=_0x5ecda6['replies'][0x0];return{..._0x32def1,'id':_0x46e579['replyId'],'resolved':_0x5ecda6[_0x4af659(0xaf)]===0x1,'dT':f(_0x46e579[_0x4af659(0xc4)]),'personId':_0x46e579['userId'],'threadId':_0x46e579['threadId']};}function G(_0x49d44a,_0x1d203a,_0x511886){const _0x4b5813=_0x16506a;var _0x31f66a,_0x3ce721;if(((_0x3ce721=(_0x31f66a=_0x49d44a==null?void 0x0:_0x49d44a['replies'])==null?void 0x0:_0x31f66a[_0x4b5813(0xca)])!=null?_0x3ce721:0x0)>0x0){const _0x354d0b=(_0x4f93a0,_0x23cbb0)=>({'id':_0x4f93a0[_0x4b5813(0xb1)],'threadId':_0x4f93a0[_0x4b5813(0xea)],'dT':f(_0x4f93a0['createTimestamp']),'personId':_0x4f93a0[_0x4b5813(0xb4)],'resolved':_0x49d44a[_0x4b5813(0xaf)]===I[_0x4b5813(0xe7)],'unitId':_0x1d203a,'subUnitId':_0x511886,'text':JSON['parse'](_0x4f93a0['content']),'parentId':_0x23cbb0}),_0x424f48=_0x354d0b(_0x49d44a[_0x4b5813(0x116)][0x0]);return{..._0x424f48,'children':_0x49d44a[_0x4b5813(0x116)]['slice'](0x1)[_0x4b5813(0xc3)](_0x5b0dfd=>_0x354d0b(_0x5b0dfd,_0x424f48['id']))};}return null;}let p=class{constructor(_0xb665f1,_0x841b8,_0x1ae271){const _0x234f75=_0x16506a;this[_0x234f75(0xad)]=_0xb665f1,this[_0x234f75(0xb7)]=_0x841b8,this[_0x234f75(0x10a)]=_0x1ae271;}async[_0x16506a(0xe9)](_0x3be5cf){const _0xbe3e3f=_0x16506a;var _0x2e4aea,_0x30f12c;const {parentId:_0x3b8207,unitId:_0x171975,text:_0x3ef879,threadId:_0x19cf1c}=_0x3be5cf,_0x281ac8=(_0x30f12c=(_0x2e4aea=_0x3ef879[_0xbe3e3f(0xf7)])==null?void 0x0:_0x2e4aea[_0xbe3e3f(0xc5)](_0x12c07e=>_0x12c07e[_0xbe3e3f(0x105)]===c[_0xbe3e3f(0xe8)][_0xbe3e3f(0xdb)])[_0xbe3e3f(0xc3)](_0x31e392=>_0x31e392['rangeId']))!=null?_0x30f12c:[],_0x429e7c=JSON[_0xbe3e3f(0xb6)](_0x3ef879),_0x51e246=(await this[_0xbe3e3f(0x10a)][_0xbe3e3f(0x10c)](_0x171975))['getMemberID']();if(_0x3b8207){const _0x585e93={'memberId':_0x51e246,'unitId':_0x171975,'content':_0x429e7c,'mention':_0x281ac8,'threadId':_0x19cf1c},_0x4fcce4=(await this[_0xbe3e3f(0xad)][_0xbe3e3f(0xd9)](_0xbe3e3f(0x109)+_0x171975+'/reply',{'body':_0x585e93}))[_0xbe3e3f(0x118)][_0xbe3e3f(0x115)];return{..._0x3be5cf,'id':_0x4fcce4['replyId'],'dT':c[_0xbe3e3f(0xb2)](+_0x4fcce4[_0xbe3e3f(0xc4)])[_0xbe3e3f(0x106)](_0xbe3e3f(0xc7)),'personId':_0x4fcce4[_0xbe3e3f(0xb4)]};}else{const _0x4add4c={'memberId':_0x51e246,'unitId':_0x171975,'content':_0x429e7c,'mention':_0x281ac8},_0x4e4981=await this['_httpService'][_0xbe3e3f(0xd9)](_0xbe3e3f(0x109)+_0x171975+_0xbe3e3f(0xe3),{'body':_0x4add4c});return Y(_0x4e4981['body'][_0xbe3e3f(0xf4)],_0x3be5cf);}}async[_0x16506a(0xac)](_0x131288){const _0x115667=_0x16506a;var _0x2c4333,_0x4e2127;const {text:_0x336762,unitId:_0x569364}=_0x131288,_0x9080f6=(_0x4e2127=(_0x2c4333=_0x336762[_0x115667(0xf7)])==null?void 0x0:_0x2c4333[_0x115667(0xc5)](_0x18916c=>_0x18916c['rangeType']===c[_0x115667(0xe8)]['COMMENT'])[_0x115667(0xc3)](_0x347706=>_0x347706[_0x115667(0xa9)]))!=null?_0x4e2127:[],_0x157eac=JSON[_0x115667(0xb6)](_0x336762),_0x57aee0=_0x131288[_0x115667(0xea)],_0x48f281=_0x131288['id'],_0x3cbd8c={'memberId':(await this[_0x115667(0x10a)]['requireSession'](_0x569364))['getMemberID'](),'unitId':_0x569364,'threadId':_0x57aee0,'mention':_0x9080f6,'content':_0x157eac,'replyId':_0x48f281},_0x509813=await this[_0x115667(0xad)][_0x115667(0xd9)]('/universer-api/comment/unit/'+_0x569364+_0x115667(0xec),{'body':_0x3cbd8c});return!_0x509813['body'][_0x115667(0xfb)]||_0x509813['body'][_0x115667(0xfb)][_0x115667(0x10e)]===0x1;}async[_0x16506a(0xab)](_0x439abd){const _0x4eb534=_0x16506a,{unitId:_0x1726ff}=_0x439abd,_0x1094d7=_0x439abd['threadId'],_0x578093={'memberId':this[_0x4eb534(0xb7)][_0x4eb534(0xfc)]()[_0x4eb534(0xce)],'unitId':_0x1726ff,'threadId':_0x1094d7,'solved':_0x439abd[_0x4eb534(0xd4)]?I[_0x4eb534(0xe7)]:I['OpenOrReOpen']},_0x552d02=await this[_0x4eb534(0xad)][_0x4eb534(0xd9)](_0x4eb534(0x109)+_0x1726ff+_0x4eb534(0xb0),{'body':_0x578093});return!_0x552d02[_0x4eb534(0x118)][_0x4eb534(0xfb)]||_0x552d02[_0x4eb534(0x118)][_0x4eb534(0xfb)][_0x4eb534(0x10e)]===0x1;}async[_0x16506a(0x102)](_0x49f43c,_0x1ad550,_0x4b4ed3,_0xff46ef){const _0x13c3af=_0x16506a,_0x52bd6d={'memberId':(await this['_sessionService'][_0x13c3af(0x10c)](_0x49f43c))['getMemberID'](),'threadId':_0x4b4ed3,'replyId':_0xff46ef,'unitId':_0x49f43c},_0x37aad8=await this['_httpService'][_0x13c3af(0xd9)]('/universer-api/comment/unit/'+_0x49f43c+_0x13c3af(0xf8),{'body':_0x52bd6d});return!_0x37aad8[_0x13c3af(0x118)][_0x13c3af(0xfb)]||_0x37aad8[_0x13c3af(0x118)][_0x13c3af(0xfb)][_0x13c3af(0x10e)]===0x1;}async[_0x16506a(0xee)](_0x27218a,_0x8f70c0,_0x3d098d){const _0x14aebe=_0x16506a,_0x1e541e={'unitId':_0x27218a,'threadId':_0x3d098d},_0x22d98a=await this[_0x14aebe(0xad)][_0x14aebe(0xd9)](_0x14aebe(0x109)+_0x27218a+_0x14aebe(0xbf),{'body':_0x1e541e}),_0x508cf4=_0x3d098d[_0x14aebe(0xc3)](_0x51f7d1=>G(_0x22d98a['body'][_0x14aebe(0xe2)][_0x51f7d1],_0x27218a,_0x8f70c0))[_0x14aebe(0xc5)](Boolean);return Object['values'](_0x22d98a[_0x14aebe(0x118)]['users'])[_0x14aebe(0x108)](_0xfc1696=>{const _0x3ee5bd=_0x14aebe;this[_0x3ee5bd(0xb7)][_0x3ee5bd(0x113)](_0xfc1696);}),_0x508cf4;}[_0x16506a(0xe0)](_0x8c917d){const _0x2bd7c0=_0x16506a;return{'id':_0x8c917d['id'],'threadId':_0x8c917d['threadId'],'ref':_0x8c917d[_0x2bd7c0(0xd5)]};}};p=x([C(0x0,c[_0x16506a(0xc2)](P[_0x16506a(0xb8)])),C(0x1,c[_0x16506a(0xc2)](c[_0x16506a(0xb3)])),C(0x2,c[_0x16506a(0xc2)](b['CollaborationSessionService']))],p);var H=Object[_0x16506a(0xd2)],J=(_0x28f505,_0x898d76,_0x34e2ce,_0x21db85)=>{for(var _0x5e2d2c=_0x21db85>0x1?void 0x0:_0x21db85?H(_0x898d76,_0x34e2ce):_0x898d76,_0x12eea9=_0x28f505['length']-0x1,_0x272f36;_0x12eea9>=0x0;_0x12eea9--)(_0x272f36=_0x28f505[_0x12eea9])&&(_0x5e2d2c=_0x272f36(_0x5e2d2c)||_0x5e2d2c);return _0x5e2d2c;},y=(_0x232698,_0x461326)=>(_0x402912,_0x22a379)=>_0x461326(_0x402912,_0x22a379,_0x232698);let g=class extends c[_0x16506a(0xef)]{constructor(_0x3ac881,_0x3c8710){const _0x4c9240=_0x16506a;super(),this[_0x4c9240(0xd8)]=_0x3ac881,this[_0x4c9240(0x100)]=_0x3c8710,this[_0x4c9240(0xfd)]();}[_0x16506a(0xfd)](){const _0x3c1624=_0x16506a;this['_threadCommentDataSourceService'][_0x3c1624(0x114)]=this[_0x3c1624(0x100)],this[_0x3c1624(0xd8)][_0x3c1624(0xe5)]=!0x1;}};g=J([y(0x0,M[_0x16506a(0xd3)]),y(0x1,c[_0x16506a(0xc2)](p))],g);var F=Object['defineProperty'],L=Object[_0x16506a(0xd2)],Z=(_0x1661e5,_0x151e15,_0x233e04)=>_0x151e15 in _0x1661e5?F(_0x1661e5,_0x151e15,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x233e04}):_0x1661e5[_0x151e15]=_0x233e04,W=(_0x24bc81,_0xe203bf,_0x233436,_0x19f428)=>{const _0x2b8a51=_0x16506a;for(var _0x20aaf9=_0x19f428>0x1?void 0x0:_0x19f428?L(_0xe203bf,_0x233436):_0xe203bf,_0x23b279=_0x24bc81[_0x2b8a51(0xca)]-0x1,_0x3e764a;_0x23b279>=0x0;_0x23b279--)(_0x3e764a=_0x24bc81[_0x23b279])&&(_0x20aaf9=_0x3e764a(_0x20aaf9)||_0x20aaf9);return _0x20aaf9;},O=(_0x12b7ca,_0x2933c9)=>(_0x360ab8,_0x4a803c)=>_0x2933c9(_0x360ab8,_0x4a803c,_0x12b7ca),N=(_0x1b9303,_0x298931,_0x5d8cbc)=>Z(_0x1b9303,typeof _0x298931!=_0x16506a(0x110)?_0x298931+'':_0x298931,_0x5d8cbc);function _0x1717(){const _0x464083=['rangeId','IConfigService','resolveComment','updateComment','_httpService','_initUserSync','solved','/solved','replyId','dayjs','UserManagerService','userId','288570ExikyN','stringify','_userService','HTTPService','6fPYXFg','3738290AMVWuv','merge','size','user','UniverInstanceType','/list','Injector','8BJMOsT','Inject','map','createTimestamp','filter','865905bdPmGr','YYYY/MM/DD\x20HH:mm','type','bufferTime','length','thread-comment-data-source.config','disposeWithMe','getUnit','userID','4221045mrujvq','_commentService','find','getOwnPropertyDescriptor','IThreadCommentDataSourceService','resolved','ref','Plugin','_injector','_threadCommentDataSourceService','post','pipe','COMMENT','getComment','4844623vopqAO','users','get','saveCommentToSnapshot','setConfig','comments','/add','parse','syncUpdateMutationToColla','root','Solved','CustomRangeType','addComment','threadId','DependentOn','/edit','Delete','listComments','Disposable','delete','Solve','Edit','content','comment','Add','defineProperty','customRanges','/delete','_threadCommentModel','commentUpdate$','error','getCurrentUser','_initDataSource','UNIVER_UNKNOWN','12dDQzfk','_threadCommentDataSource','UniverLicensePlugin','deleteComment','personId','getUser','rangeType','format','add','forEach','/universer-api/comment/unit/','_sessionService','Reply','requireSession','_configService','code','5179174hZkdaw','symbol','_config','24RcVpWy','addUser','dataSource','reply','replies','_init','body','9925990gDAWvu','7BUKjIr','UniverThreadCommentDataSourcePlugin','toStringTag','UNRECOGNIZED','subscribe','OpenOrReOpen','unitId'];_0x1717=function(){return _0x464083;};return _0x1717();}exports[_0x16506a(0x11b)]=class extends c[_0x16506a(0xd6)]{constructor(_0x191c0f=D,_0x4392f2,_0x1407e6){const _0x2a31e5=_0x16506a;super(),this[_0x2a31e5(0x111)]=_0x191c0f,this['_injector']=_0x4392f2,this['_configService']=_0x1407e6;const {..._0x1cb9c1}=c[_0x2a31e5(0xbb)]({},D,this['_config']);this[_0x2a31e5(0x10d)][_0x2a31e5(0xe1)](q,_0x1cb9c1);}['onStarting'](){const _0x2f8ccb=_0x16506a;[[p],[g],[_]][_0x2f8ccb(0x108)](_0x2b3273=>{const _0x5b8914=_0x2f8ccb;this[_0x5b8914(0xd7)][_0x5b8914(0x107)](_0x2b3273);});}['onReady'](){const _0x545edd=_0x16506a;this['_injector'][_0x545edd(0xdf)](g),this['_injector'][_0x545edd(0xdf)](_);}},N(exports[_0x16506a(0x11b)],'pluginName',U),N(exports[_0x16506a(0x11b)],_0x16506a(0xc8),c[_0x16506a(0xbe)][_0x16506a(0xfe)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x16506a(0xeb)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x16506a(0x101)]),O(0x1,c[_0x16506a(0xc2)](c['Injector'])),O(0x2,c[_0x16506a(0xaa)])],exports[_0x16506a(0x11b)]);
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x48adec=_0x110e;(function(_0x512cd4,_0x53fbb0){const _0x30b997=_0x110e,_0x53e5d6=_0x512cd4();while(!![]){try{const _0x3be485=-parseInt(_0x30b997(0x177))/0x1+parseInt(_0x30b997(0x189))/0x2*(-parseInt(_0x30b997(0x173))/0x3)+-parseInt(_0x30b997(0x15b))/0x4+parseInt(_0x30b997(0x167))/0x5+-parseInt(_0x30b997(0x174))/0x6+parseInt(_0x30b997(0x15c))/0x7+parseInt(_0x30b997(0x16a))/0x8;if(_0x3be485===_0x53fbb0)break;else _0x53e5d6['push'](_0x53e5d6['shift']());}catch(_0x136989){_0x53e5d6['push'](_0x53e5d6['shift']());}}}(_0x4c9f,0x9caf0));import{CommentService as _0x4fbbbb,CollaborationSessionService as _0x3a373c,UniverCollaborationClientPlugin as _0x542fe2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1cd485}from'@univerjs-pro/license';import{dayjs as _0x3e7d6e,UserManagerService as _0x39643a,Inject as _0x2b7fb0,Injector as _0x21ef67,Disposable as _0x274417,CustomRangeType as _0x3e7642,UniverInstanceType as _0x275ad0,DependentOn as _0x4f8b32,IConfigService as _0x1e3178,Plugin as _0x4c197b,merge as _0x4267fa}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a8b74}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x106c35,IThreadCommentDataSourceService as _0x43ec35}from'@univerjs/thread-comment';import{bufferTime as _0x54fa14}from'rxjs';import{HTTPService as _0x448a56}from'@univerjs/network';const W=_0x48adec(0x16e);var I=(_0x17e3f0=>(_0x17e3f0[_0x17e3f0[_0x48adec(0x182)]=0x0]='OpenOrReOpen',_0x17e3f0[_0x17e3f0[_0x48adec(0x197)]=0x1]=_0x48adec(0x197),_0x17e3f0[_0x17e3f0[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x17e3f0))(I||{}),v=(_0x2c3b88=>(_0x2c3b88[_0x2c3b88['Unknown']=0x0]='Unknown',_0x2c3b88[_0x2c3b88['Add']=0x1]='Add',_0x2c3b88[_0x2c3b88[_0x48adec(0x147)]=0x2]=_0x48adec(0x147),_0x2c3b88[_0x2c3b88[_0x48adec(0x160)]=0x3]=_0x48adec(0x160),_0x2c3b88[_0x2c3b88[_0x48adec(0x14e)]=0x4]='Delete',_0x2c3b88[_0x2c3b88[_0x48adec(0x196)]=0x5]='Solve',_0x2c3b88[_0x2c3b88[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x2c3b88))(v||{});const y=_0x2d8b79=>_0x3e7d6e(new Date(+_0x2d8b79))[_0x48adec(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x42f994,_0x5b6040)=>{const _0x5725e7=_0x48adec,_0x23d1a8=_0x42f994['get'](_0x39643a),_0x226caa=_0x42f994['get'](_0x448a56);_0x5b6040[_0x5725e7(0x19d)](_0x21de49=>{const _0x433b13=_0x5725e7;_0x23d1a8[_0x433b13(0x17f)](_0x21de49)&&_0x5b6040['delete'](_0x21de49);}),_0x5b6040[_0x5725e7(0x198)]&&(await _0x226caa[_0x5725e7(0x199)](_0x5725e7(0x175),{'params':{'userIDs':[..._0x5b6040]}}))[_0x5725e7(0x176)][_0x5725e7(0x1a2)][_0x5725e7(0x19d)](_0x2f6a7b=>{const _0x178472=_0x5725e7;_0x2f6a7b&&_0x23d1a8[_0x178472(0x19f)](_0x2f6a7b);});};var K=Object[_0x48adec(0x171)],V=(_0x1461d8,_0x3d3968,_0x5b25e3,_0x33fa99)=>{const _0x5536f0=_0x48adec;for(var _0x3efa94=_0x33fa99>0x1?void 0x0:_0x33fa99?K(_0x3d3968,_0x5b25e3):_0x3d3968,_0x1bb2a3=_0x1461d8[_0x5536f0(0x19b)]-0x1,_0x438df4;_0x1bb2a3>=0x0;_0x1bb2a3--)(_0x438df4=_0x1461d8[_0x1bb2a3])&&(_0x3efa94=_0x438df4(_0x3efa94)||_0x3efa94);return _0x3efa94;},p=(_0x2a495d,_0x1f925c)=>(_0x2b40b7,_0x3cd1d5)=>_0x1f925c(_0x2b40b7,_0x3cd1d5,_0x2a495d);let _=class extends _0x274417{constructor(_0x57c853,_0x4b95d6,_0x216072,_0x3a7402){const _0x25755a=_0x48adec;super(),this[_0x25755a(0x14f)]=_0x57c853,this[_0x25755a(0x170)]=_0x4b95d6,this['_userService']=_0x216072,this[_0x25755a(0x16f)]=_0x3a7402,this[_0x25755a(0x187)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f8308=_0x48adec;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f8308(0x15e)](_0x54fa14(0x10))['subscribe'](_0x588e44=>{const _0x499adb=_0x1f8308,_0x2ecb71=new Set();_0x588e44[_0x499adb(0x19d)](_0x36c054=>{const _0x35edf1=_0x499adb;switch(_0x36c054[_0x35edf1(0x18c)]){case _0x35edf1(0x15f):{const _0x5d4b55=_0x36c054[_0x35edf1(0x16b)]['personId'];_0x2ecb71['add'](_0x5d4b55);break;}}}),B(this[_0x499adb(0x16f)],_0x2ecb71);}));}[_0x48adec(0x187)](){const _0x11cc9c=_0x48adec;this[_0x11cc9c(0x17a)](this[_0x11cc9c(0x14f)][_0x11cc9c(0x155)][_0x11cc9c(0x194)](async _0x445c20=>{const _0x28092a=_0x11cc9c;var _0x315583,_0x517b99,_0x3dd92,_0x188098;const _0x3922ff=(_0x315583=this[_0x28092a(0x170)][_0x28092a(0x162)](_0x445c20['unitId'])[_0x28092a(0x1a0)](_0x504377=>_0x504377[_0x28092a(0x1a3)]===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x315583[_0x28092a(0x14a)];if(!_0x3922ff)return;const {unitId:_0x5376bb,subUnitId:_0x135b91}=_0x3922ff;switch(_0x445c20['user']&&this[_0x28092a(0x148)][_0x28092a(0x19f)](_0x445c20[_0x28092a(0x159)]),_0x445c20['type']){case v[_0x28092a(0x158)]:break;case v[_0x28092a(0x147)]:{this['_threadCommentModel'][_0x28092a(0x18a)](_0x5376bb,_0x135b91,{'unitId':_0x5376bb,'subUnitId':_0x135b91,'ref':'','id':_0x445c20[_0x28092a(0x151)],'dT':y(+_0x445c20[_0x28092a(0x15d)]),'threadId':_0x445c20[_0x28092a(0x1a3)],'personId':(_0x3dd92=(_0x517b99=_0x445c20['user'])==null?void 0x0:_0x517b99['userID'])!=null?_0x3dd92:_0x445c20[_0x28092a(0x188)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)]),'parentId':_0x3922ff['id']});break;}case v['Delete']:{const _0x293c53=this['_threadCommentModel'][_0x28092a(0x1a1)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);_0x293c53&&_0x293c53['parentId']&&this[_0x28092a(0x170)][_0x28092a(0x16c)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);break;}case v[_0x28092a(0x160)]:{this[_0x28092a(0x170)][_0x28092a(0x180)](_0x5376bb,_0x135b91,{'commentId':_0x445c20[_0x28092a(0x151)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)])});break;}case v[_0x28092a(0x196)]:{const _0x563930=(_0x188098=this['_threadCommentModel'][_0x28092a(0x162)](_0x445c20[_0x28092a(0x195)])[_0x28092a(0x1a0)](_0x5e015a=>_0x5e015a['threadId']===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x188098[_0x28092a(0x14a)];_0x563930&&this[_0x28092a(0x170)][_0x28092a(0x186)](_0x5376bb,_0x135b91,_0x563930['id'],_0x445c20[_0x28092a(0x191)]===I['Solved']);break;}}}));}};function _0x110e(_0x58bca,_0x50c825){const _0x4c9fea=_0x4c9f();return _0x110e=function(_0x110ee5,_0x54306a){_0x110ee5=_0x110ee5-0x147;let _0xe6558a=_0x4c9fea[_0x110ee5];return _0xe6558a;},_0x110e(_0x58bca,_0x50c825);}_=V([p(0x0,_0x2b7fb0(_0x4fbbbb)),p(0x1,_0x2b7fb0(_0x106c35)),p(0x2,_0x2b7fb0(_0x39643a)),p(0x3,_0x2b7fb0(_0x21ef67))],_);const z=_0x48adec(0x15a),O={};var k=Object[_0x48adec(0x171)],Q=(_0xac3178,_0x125aef,_0x4e1d1c,_0x45ba5b)=>{const _0x3573fc=_0x48adec;for(var _0x4b6ab0=_0x45ba5b>0x1?void 0x0:_0x45ba5b?k(_0x125aef,_0x4e1d1c):_0x125aef,_0x5b6cea=_0xac3178[_0x3573fc(0x19b)]-0x1,_0x598e40;_0x5b6cea>=0x0;_0x5b6cea--)(_0x598e40=_0xac3178[_0x5b6cea])&&(_0x4b6ab0=_0x598e40(_0x4b6ab0)||_0x4b6ab0);return _0x4b6ab0;},b=(_0x4cdaca,_0x329e5e)=>(_0x269a68,_0x162800)=>_0x329e5e(_0x269a68,_0x162800,_0x4cdaca);function X(_0x12184f,_0x515cb7){const _0x1dafd3=_0x48adec,_0x239333=_0x12184f[_0x1dafd3(0x14b)][0x0];return{..._0x515cb7,'id':_0x239333[_0x1dafd3(0x151)],'resolved':_0x12184f[_0x1dafd3(0x191)]===0x1,'dT':y(_0x239333[_0x1dafd3(0x15d)]),'personId':_0x239333[_0x1dafd3(0x188)],'threadId':_0x239333['threadId']};}function ee(_0x2966de,_0x13c98b,_0x53d6e4){const _0x3ca3d4=_0x48adec;var _0x4036b1,_0x28a8c4;if(((_0x28a8c4=(_0x4036b1=_0x2966de==null?void 0x0:_0x2966de[_0x3ca3d4(0x14b)])==null?void 0x0:_0x4036b1[_0x3ca3d4(0x19b)])!=null?_0x28a8c4:0x0)>0x0){const _0xa5bb15=(_0x5200a8,_0x4ad3e0)=>({'id':_0x5200a8[_0x3ca3d4(0x151)],'threadId':_0x5200a8[_0x3ca3d4(0x1a3)],'dT':y(_0x5200a8[_0x3ca3d4(0x15d)]),'personId':_0x5200a8[_0x3ca3d4(0x188)],'resolved':_0x2966de[_0x3ca3d4(0x191)]===I['Solved'],'unitId':_0x13c98b,'subUnitId':_0x53d6e4,'text':JSON[_0x3ca3d4(0x156)](_0x5200a8['content']),'parentId':_0x4ad3e0}),_0x1710a9=_0xa5bb15(_0x2966de['replies'][0x0]);return{..._0x1710a9,'children':_0x2966de[_0x3ca3d4(0x14b)][_0x3ca3d4(0x152)](0x1)[_0x3ca3d4(0x181)](_0x382878=>_0xa5bb15(_0x382878,_0x1710a9['id']))};}return null;}function _0x4c9f(){const _0x156489=['createTimestamp','pipe','add','Edit','symbol','getUnit','onReady','defineProperty','/add','post','4820640xAMSdt','getMemberID','UNRECOGNIZED','7952448MpAAEq','payload','deleteComment','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','_threadCommentModel','getOwnPropertyDescriptor','content','21lzmiOr','3028524udkfjt','/universer-api/user/list','body','857422GZvXLJ','/edit','format','disposeWithMe','onStarting','_sessionService','code','filter','getUser','updateComment','map','OpenOrReOpen','stringify','resolved','YYYY/MM/DD\x20HH:mm','resolveComment','_init','userId','50506TnmBZQ','addComment','comments','type','setConfig','_initDataSource','_configService','_threadCommentDataSourceService','solved','customRanges','rangeId','subscribe','unitId','Solve','Solved','size','get','COMMENT','length','comment','forEach','requireSession','addUser','find','getComment','users','threadId','Reply','_userService','rangeType','root','replies','/universer-api/comment/unit/','dataSource','Delete','_commentService','error','replyId','slice','values','saveCommentToSnapshot','commentUpdate$','parse','/solved','Add','user','thread-comment-data-source.config','3467216MGwWYy','7625401jQSKin'];_0x4c9f=function(){return _0x156489;};return _0x4c9f();}let S=class{constructor(_0x47cb97,_0xc18321,_0xfd51a1){const _0x4d3382=_0x48adec;this[_0x4d3382(0x16d)]=_0x47cb97,this[_0x4d3382(0x148)]=_0xc18321,this[_0x4d3382(0x17c)]=_0xfd51a1;}async[_0x48adec(0x18a)](_0x381fee){const _0x3639a0=_0x48adec;var _0x2d6db5,_0x58a9f7;const {parentId:_0x42e2d4,unitId:_0x52a6b0,text:_0x27c3ac,threadId:_0xca6043}=_0x381fee,_0x215c7a=(_0x58a9f7=(_0x2d6db5=_0x27c3ac[_0x3639a0(0x192)])==null?void 0x0:_0x2d6db5[_0x3639a0(0x17e)](_0x714043=>_0x714043[_0x3639a0(0x149)]===_0x3e7642[_0x3639a0(0x19a)])[_0x3639a0(0x181)](_0x49d69d=>_0x49d69d[_0x3639a0(0x193)]))!=null?_0x58a9f7:[],_0x112655=JSON[_0x3639a0(0x183)](_0x27c3ac),_0x2c222e=(await this['_sessionService']['requireSession'](_0x52a6b0))[_0x3639a0(0x168)]();if(_0x42e2d4){const _0x12c29c={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a,'threadId':_0xca6043},_0x77f46=(await this[_0x3639a0(0x16d)][_0x3639a0(0x166)](_0x3639a0(0x14c)+_0x52a6b0+'/reply',{'body':_0x12c29c}))['body']['reply'];return{..._0x381fee,'id':_0x77f46[_0x3639a0(0x151)],'dT':_0x3e7d6e(+_0x77f46[_0x3639a0(0x15d)])['format'](_0x3639a0(0x185)),'personId':_0x77f46[_0x3639a0(0x188)]};}else{const _0x3112f0={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a},_0x1d1f7a=await this[_0x3639a0(0x16d)]['post']('/universer-api/comment/unit/'+_0x52a6b0+_0x3639a0(0x165),{'body':_0x3112f0});return X(_0x1d1f7a[_0x3639a0(0x176)][_0x3639a0(0x19c)],_0x381fee);}}async['updateComment'](_0x1f841b){const _0x6dad84=_0x48adec;var _0x391d70,_0x2048af;const {text:_0x101eb6,unitId:_0x3e56c8}=_0x1f841b,_0x2b10fa=(_0x2048af=(_0x391d70=_0x101eb6['customRanges'])==null?void 0x0:_0x391d70[_0x6dad84(0x17e)](_0x24f515=>_0x24f515[_0x6dad84(0x149)]===_0x3e7642[_0x6dad84(0x19a)])[_0x6dad84(0x181)](_0x10dc30=>_0x10dc30[_0x6dad84(0x193)]))!=null?_0x2048af:[],_0x3f5dd3=JSON[_0x6dad84(0x183)](_0x101eb6),_0x20d790=_0x1f841b[_0x6dad84(0x1a3)],_0x2bff9a=_0x1f841b['id'],_0x1266bd={'memberId':(await this['_sessionService']['requireSession'](_0x3e56c8))['getMemberID'](),'unitId':_0x3e56c8,'threadId':_0x20d790,'mention':_0x2b10fa,'content':_0x3f5dd3,'replyId':_0x2bff9a},_0x41d163=await this[_0x6dad84(0x16d)][_0x6dad84(0x166)](_0x6dad84(0x14c)+_0x3e56c8+_0x6dad84(0x178),{'body':_0x1266bd});return!_0x41d163[_0x6dad84(0x176)][_0x6dad84(0x150)]||_0x41d163[_0x6dad84(0x176)]['error'][_0x6dad84(0x17d)]===0x1;}async[_0x48adec(0x186)](_0x1751d9){const _0x3b6a23=_0x48adec,{unitId:_0x376e7f}=_0x1751d9,_0x7019f2=_0x1751d9['threadId'],_0x184031={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x376e7f,'threadId':_0x7019f2,'solved':_0x1751d9[_0x3b6a23(0x184)]?I[_0x3b6a23(0x197)]:I[_0x3b6a23(0x182)]},_0x54fc1c=await this['_httpService'][_0x3b6a23(0x166)](_0x3b6a23(0x14c)+_0x376e7f+_0x3b6a23(0x157),{'body':_0x184031});return!_0x54fc1c[_0x3b6a23(0x176)][_0x3b6a23(0x150)]||_0x54fc1c[_0x3b6a23(0x176)]['error']['code']===0x1;}async[_0x48adec(0x16c)](_0x47c33b,_0x25efea,_0x2f238b,_0x5d24cf){const _0x3e5ce2=_0x48adec,_0x49a907={'memberId':(await this[_0x3e5ce2(0x17c)][_0x3e5ce2(0x19e)](_0x47c33b))[_0x3e5ce2(0x168)](),'threadId':_0x2f238b,'replyId':_0x5d24cf,'unitId':_0x47c33b},_0x4e5da4=await this['_httpService'][_0x3e5ce2(0x166)](_0x3e5ce2(0x14c)+_0x47c33b+'/delete',{'body':_0x49a907});return!_0x4e5da4[_0x3e5ce2(0x176)][_0x3e5ce2(0x150)]||_0x4e5da4['body']['error'][_0x3e5ce2(0x17d)]===0x1;}async['listComments'](_0x1fd226,_0x5d63e7,_0x859b81){const _0x40bded=_0x48adec,_0x44aee3={'unitId':_0x1fd226,'threadId':_0x859b81},_0x5f771f=await this['_httpService'][_0x40bded(0x166)]('/universer-api/comment/unit/'+_0x1fd226+'/list',{'body':_0x44aee3}),_0x5cb3a3=_0x859b81[_0x40bded(0x181)](_0x18b6e8=>ee(_0x5f771f[_0x40bded(0x176)][_0x40bded(0x18b)][_0x18b6e8],_0x1fd226,_0x5d63e7))[_0x40bded(0x17e)](Boolean);return Object[_0x40bded(0x153)](_0x5f771f[_0x40bded(0x176)][_0x40bded(0x1a2)])[_0x40bded(0x19d)](_0x1b37be=>{const _0x3a03e5=_0x40bded;this[_0x3a03e5(0x148)][_0x3a03e5(0x19f)](_0x1b37be);}),_0x5cb3a3;}[_0x48adec(0x154)](_0xf43c27){const _0x52d127=_0x48adec;return{'id':_0xf43c27['id'],'threadId':_0xf43c27[_0x52d127(0x1a3)],'ref':_0xf43c27['ref']};}};S=Q([b(0x0,_0x2b7fb0(_0x448a56)),b(0x1,_0x2b7fb0(_0x39643a)),b(0x2,_0x2b7fb0(_0x3a373c))],S);var re=Object[_0x48adec(0x171)],te=(_0x313d5f,_0x2d0374,_0xe96fec,_0x407950)=>{const _0x4a8f99=_0x48adec;for(var _0x37d9fb=_0x407950>0x1?void 0x0:_0x407950?re(_0x2d0374,_0xe96fec):_0x2d0374,_0x16d140=_0x313d5f[_0x4a8f99(0x19b)]-0x1,_0xbfffcd;_0x16d140>=0x0;_0x16d140--)(_0xbfffcd=_0x313d5f[_0x16d140])&&(_0x37d9fb=_0xbfffcd(_0x37d9fb)||_0x37d9fb);return _0x37d9fb;},M=(_0x41e3ab,_0x3b1625)=>(_0x8f812c,_0x3198e2)=>_0x3b1625(_0x8f812c,_0x3198e2,_0x41e3ab);let f=class extends _0x274417{constructor(_0x1fc0ec,_0x14e6ca){const _0x5acaff=_0x48adec;super(),this[_0x5acaff(0x190)]=_0x1fc0ec,this['_threadCommentDataSource']=_0x14e6ca,this['_initDataSource']();}[_0x48adec(0x18e)](){const _0x52e7e8=_0x48adec;this[_0x52e7e8(0x190)][_0x52e7e8(0x14d)]=this['_threadCommentDataSource'],this[_0x52e7e8(0x190)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x43ec35),M(0x1,_0x2b7fb0(S))],f);var se=Object[_0x48adec(0x164)],oe=Object[_0x48adec(0x171)],ne=(_0x484964,_0xfcb1af,_0xaadb2f)=>_0xfcb1af in _0x484964?se(_0x484964,_0xfcb1af,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaadb2f}):_0x484964[_0xfcb1af]=_0xaadb2f,ie=(_0x97f438,_0x506f56,_0x575599,_0x38d795)=>{for(var _0x24d440=_0x38d795>0x1?void 0x0:_0x38d795?oe(_0x506f56,_0x575599):_0x506f56,_0x122e73=_0x97f438['length']-0x1,_0x5c42d3;_0x122e73>=0x0;_0x122e73--)(_0x5c42d3=_0x97f438[_0x122e73])&&(_0x24d440=_0x5c42d3(_0x24d440)||_0x24d440);return _0x24d440;},N=(_0x5e2bbc,_0x36451a)=>(_0x3d99da,_0x42790f)=>_0x36451a(_0x3d99da,_0x42790f,_0x5e2bbc),$=(_0x1d3623,_0x5d0d1a,_0x32ef4d)=>ne(_0x1d3623,typeof _0x5d0d1a!=_0x48adec(0x161)?_0x5d0d1a+'':_0x5d0d1a,_0x32ef4d);let g=class extends _0x4c197b{constructor(_0x4c018b=O,_0x2d379d,_0x16c43d){const _0x2a81b2=_0x48adec;super(),this['_config']=_0x4c018b,this['_injector']=_0x2d379d,this[_0x2a81b2(0x18f)]=_0x16c43d;const {..._0x5bfca6}=_0x4267fa({},O,this['_config']);this['_configService'][_0x2a81b2(0x18d)](z,_0x5bfca6);}[_0x48adec(0x17b)](){const _0x1e6f3f=_0x48adec;[[S],[f],[_]][_0x1e6f3f(0x19d)](_0xfce8a4=>{const _0x3aa938=_0x1e6f3f;this[_0x3aa938(0x16f)][_0x3aa938(0x15f)](_0xfce8a4);});}[_0x48adec(0x163)](){const _0x2097c7=_0x48adec;this[_0x2097c7(0x16f)][_0x2097c7(0x199)](f),this['_injector']['get'](_);}};$(g,'pluginName',W),$(g,_0x48adec(0x18c),_0x275ad0['UNIVER_UNKNOWN']),g=ie([_0x4f8b32(_0x3a8b74,_0x542fe2,_0x1cd485),N(0x1,_0x2b7fb0(_0x21ef67)),N(0x2,_0x1e3178)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3389ee=_0x2ec0;(function(_0x319c66,_0x2e6133){const _0x1268d9=_0x2ec0,_0x5644cc=_0x319c66();while(!![]){try{const _0x4cbb48=parseInt(_0x1268d9(0x17c))/0x1+parseInt(_0x1268d9(0x179))/0x2*(-parseInt(_0x1268d9(0x163))/0x3)+-parseInt(_0x1268d9(0x153))/0x4+-parseInt(_0x1268d9(0x181))/0x5+parseInt(_0x1268d9(0x162))/0x6+parseInt(_0x1268d9(0x19a))/0x7*(parseInt(_0x1268d9(0x15d))/0x8)+parseInt(_0x1268d9(0x17b))/0x9;if(_0x4cbb48===_0x2e6133)break;else _0x5644cc['push'](_0x5644cc['shift']());}catch(_0x8cc092){_0x5644cc['push'](_0x5644cc['shift']());}}}(_0x29b7,0xd7743));import{CommentService as _0x43d37e,CollaborationSessionService as _0x28a0e2,UniverCollaborationClientPlugin as _0x4df037}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d0ee8}from'@univerjs-pro/license';import{dayjs as _0x536171,UserManagerService as _0x263cf9,Inject as _0x37a0af,Injector as _0x35741c,Disposable as _0x422b10,CustomRangeType as _0x29a17a,UniverInstanceType as _0x19b055,DependentOn as _0x37e8aa,IConfigService as _0x3f04d9,Plugin as _0x1678df,merge as _0x3184fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6aa952}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x19040a,IThreadCommentDataSourceService as _0x35f50a}from'@univerjs/thread-comment';import{bufferTime as _0x239bc1}from'rxjs';import{HTTPService as _0x523c25}from'@univerjs/network';const W=_0x3389ee(0x16f);var I=(_0x2f9989=>(_0x2f9989[_0x2f9989[_0x3389ee(0x182)]=0x0]=_0x3389ee(0x182),_0x2f9989[_0x2f9989[_0x3389ee(0x171)]=0x1]=_0x3389ee(0x171),_0x2f9989[_0x2f9989['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2f9989))(I||{}),v=(_0xdedbe4=>(_0xdedbe4[_0xdedbe4[_0x3389ee(0x16d)]=0x0]=_0x3389ee(0x16d),_0xdedbe4[_0xdedbe4['Add']=0x1]='Add',_0xdedbe4[_0xdedbe4[_0x3389ee(0x1aa)]=0x2]=_0x3389ee(0x1aa),_0xdedbe4[_0xdedbe4[_0x3389ee(0x17f)]=0x3]=_0x3389ee(0x17f),_0xdedbe4[_0xdedbe4[_0x3389ee(0x15c)]=0x4]='Delete',_0xdedbe4[_0xdedbe4[_0x3389ee(0x159)]=0x5]=_0x3389ee(0x159),_0xdedbe4[_0xdedbe4[_0x3389ee(0x151)]=-0x1]=_0x3389ee(0x151),_0xdedbe4))(v||{});const y=_0x142eb7=>_0x536171(new Date(+_0x142eb7))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x34cae1,_0x42ec47)=>{const _0x403cd1=_0x3389ee,_0x3c93fe=_0x34cae1[_0x403cd1(0x192)](_0x263cf9),_0x46e673=_0x34cae1[_0x403cd1(0x192)](_0x523c25);_0x42ec47[_0x403cd1(0x157)](_0x9fdf5a=>{const _0xae69aa=_0x403cd1;_0x3c93fe['getUser'](_0x9fdf5a)&&_0x42ec47[_0xae69aa(0x18d)](_0x9fdf5a);}),_0x42ec47[_0x403cd1(0x1a8)]&&(await _0x46e673['get'](_0x403cd1(0x167),{'params':{'userIDs':[..._0x42ec47]}}))['body'][_0x403cd1(0x172)][_0x403cd1(0x157)](_0x20189e=>{const _0x4053ec=_0x403cd1;_0x20189e&&_0x3c93fe[_0x4053ec(0x176)](_0x20189e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4ffc0b,_0x5db76f,_0x2b23d7,_0x2640a5)=>{const _0x5b7509=_0x3389ee;for(var _0x58a2b0=_0x2640a5>0x1?void 0x0:_0x2640a5?K(_0x5db76f,_0x2b23d7):_0x5db76f,_0x22c540=_0x4ffc0b[_0x5b7509(0x189)]-0x1,_0x3e2c1b;_0x22c540>=0x0;_0x22c540--)(_0x3e2c1b=_0x4ffc0b[_0x22c540])&&(_0x58a2b0=_0x3e2c1b(_0x58a2b0)||_0x58a2b0);return _0x58a2b0;},p=(_0x2033b6,_0x3bcfe9)=>(_0x11f11d,_0x347009)=>_0x3bcfe9(_0x11f11d,_0x347009,_0x2033b6);let _=class extends _0x422b10{constructor(_0x24329f,_0x6ecb9c,_0x3dbda8,_0x32b935){const _0x5af99f=_0x3389ee;super(),this[_0x5af99f(0x1a6)]=_0x24329f,this[_0x5af99f(0x1a3)]=_0x6ecb9c,this['_userService']=_0x3dbda8,this[_0x5af99f(0x177)]=_0x32b935,this[_0x5af99f(0x173)](),this[_0x5af99f(0x14a)]();}['_initUserSync'](){const _0x91b5a4=_0x3389ee;this[_0x91b5a4(0x17d)](this[_0x91b5a4(0x1a3)][_0x91b5a4(0x199)][_0x91b5a4(0x16c)](_0x239bc1(0x10))[_0x91b5a4(0x14f)](_0x104340=>{const _0x87d5bc=_0x91b5a4,_0x4c8bf2=new Set();_0x104340['forEach'](_0x3908e8=>{const _0x35e6f2=_0x2ec0;switch(_0x3908e8[_0x35e6f2(0x19d)]){case _0x35e6f2(0x15a):{const _0x544262=_0x3908e8[_0x35e6f2(0x178)][_0x35e6f2(0x18b)];_0x4c8bf2['add'](_0x544262);break;}}}),B(this[_0x87d5bc(0x177)],_0x4c8bf2);}));}[_0x3389ee(0x173)](){const _0x320816=_0x3389ee;this[_0x320816(0x17d)](this[_0x320816(0x1a6)][_0x320816(0x199)][_0x320816(0x14f)](async _0x16e5eb=>{const _0x2465c2=_0x320816;var _0x50472c,_0x127331,_0x17f1fa,_0x39512e;const _0xaf36f5=(_0x50472c=this[_0x2465c2(0x1a3)]['getUnit'](_0x16e5eb[_0x2465c2(0x15b)])['find'](_0x127c4a=>_0x127c4a[_0x2465c2(0x180)]===_0x16e5eb['threadId']))==null?void 0x0:_0x50472c[_0x2465c2(0x1a0)];if(!_0xaf36f5)return;const {unitId:_0x294dca,subUnitId:_0x9d03ff}=_0xaf36f5;switch(_0x16e5eb[_0x2465c2(0x160)]&&this[_0x2465c2(0x168)][_0x2465c2(0x176)](_0x16e5eb[_0x2465c2(0x160)]),_0x16e5eb[_0x2465c2(0x19d)]){case v[_0x2465c2(0x188)]:break;case v[_0x2465c2(0x1aa)]:{this['_threadCommentModel'][_0x2465c2(0x1a4)](_0x294dca,_0x9d03ff,{'unitId':_0x294dca,'subUnitId':_0x9d03ff,'ref':'','id':_0x16e5eb[_0x2465c2(0x1a5)],'dT':y(+_0x16e5eb[_0x2465c2(0x196)]),'threadId':_0x16e5eb[_0x2465c2(0x180)],'personId':(_0x17f1fa=(_0x127331=_0x16e5eb['user'])==null?void 0x0:_0x127331['userID'])!=null?_0x17f1fa:_0x16e5eb[_0x2465c2(0x16a)],'text':JSON[_0x2465c2(0x1a2)](_0x16e5eb[_0x2465c2(0x183)]),'parentId':_0xaf36f5['id']});break;}case v['Delete']:{const _0x9b7ec7=this[_0x2465c2(0x1a3)][_0x2465c2(0x165)](_0x294dca,_0x9d03ff,_0x16e5eb['replyId']);_0x9b7ec7&&_0x9b7ec7[_0x2465c2(0x16e)]&&this[_0x2465c2(0x1a3)][_0x2465c2(0x1a7)](_0x294dca,_0x9d03ff,_0x16e5eb[_0x2465c2(0x1a5)]);break;}case v[_0x2465c2(0x17f)]:{this[_0x2465c2(0x1a3)][_0x2465c2(0x15e)](_0x294dca,_0x9d03ff,{'commentId':_0x16e5eb[_0x2465c2(0x1a5)],'text':JSON['parse'](_0x16e5eb[_0x2465c2(0x183)])});break;}case v['Solve']:{const _0x48d793=(_0x39512e=this[_0x2465c2(0x1a3)][_0x2465c2(0x1ae)](_0x16e5eb[_0x2465c2(0x15b)])[_0x2465c2(0x184)](_0x2cb4ef=>_0x2cb4ef[_0x2465c2(0x180)]===_0x16e5eb[_0x2465c2(0x180)]))==null?void 0x0:_0x39512e[_0x2465c2(0x1a0)];_0x48d793&&this[_0x2465c2(0x1a3)][_0x2465c2(0x156)](_0x294dca,_0x9d03ff,_0x48d793['id'],_0x16e5eb[_0x2465c2(0x195)]===I[_0x2465c2(0x171)]);break;}}}));}};_=V([p(0x0,_0x37a0af(_0x43d37e)),p(0x1,_0x37a0af(_0x19040a)),p(0x2,_0x37a0af(_0x263cf9)),p(0x3,_0x37a0af(_0x35741c))],_);const z=_0x3389ee(0x169),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x58a91f,_0x129c41,_0x370e58,_0x447083)=>{const _0x493960=_0x3389ee;for(var _0xf719a4=_0x447083>0x1?void 0x0:_0x447083?k(_0x129c41,_0x370e58):_0x129c41,_0x1ca164=_0x58a91f[_0x493960(0x189)]-0x1,_0x3abf0f;_0x1ca164>=0x0;_0x1ca164--)(_0x3abf0f=_0x58a91f[_0x1ca164])&&(_0xf719a4=_0x3abf0f(_0xf719a4)||_0xf719a4);return _0xf719a4;},b=(_0x2f5cc3,_0x4567be)=>(_0x348a12,_0x5e3f21)=>_0x4567be(_0x348a12,_0x5e3f21,_0x2f5cc3);function X(_0x309ddc,_0xc37460){const _0x1853ed=_0x3389ee,_0x536185=_0x309ddc[_0x1853ed(0x1af)][0x0];return{..._0xc37460,'id':_0x536185['replyId'],'resolved':_0x309ddc[_0x1853ed(0x195)]===0x1,'dT':y(_0x536185['createTimestamp']),'personId':_0x536185[_0x1853ed(0x16a)],'threadId':_0x536185[_0x1853ed(0x180)]};}function ee(_0x57a3b8,_0x1c2c29,_0x47cfea){const _0x5b5fe7=_0x3389ee;var _0x14ee9e,_0x2ae217;if(((_0x2ae217=(_0x14ee9e=_0x57a3b8==null?void 0x0:_0x57a3b8['replies'])==null?void 0x0:_0x14ee9e[_0x5b5fe7(0x189)])!=null?_0x2ae217:0x0)>0x0){const _0x3a7903=(_0x2a6abf,_0x5193a9)=>({'id':_0x2a6abf[_0x5b5fe7(0x1a5)],'threadId':_0x2a6abf[_0x5b5fe7(0x180)],'dT':y(_0x2a6abf[_0x5b5fe7(0x196)]),'personId':_0x2a6abf[_0x5b5fe7(0x16a)],'resolved':_0x57a3b8[_0x5b5fe7(0x195)]===I[_0x5b5fe7(0x171)],'unitId':_0x1c2c29,'subUnitId':_0x47cfea,'text':JSON['parse'](_0x2a6abf[_0x5b5fe7(0x183)]),'parentId':_0x5193a9}),_0xd1c571=_0x3a7903(_0x57a3b8['replies'][0x0]);return{..._0xd1c571,'children':_0x57a3b8[_0x5b5fe7(0x1af)]['slice'](0x1)['map'](_0x19ef5e=>_0x3a7903(_0x19ef5e,_0xd1c571['id']))};}return null;}let S=class{constructor(_0x3c76bb,_0x463803,_0x2856d0){const _0x4c7153=_0x3389ee;this['_httpService']=_0x3c76bb,this[_0x4c7153(0x168)]=_0x463803,this['_sessionService']=_0x2856d0;}async[_0x3389ee(0x1a4)](_0x5be2e6){const _0x271e42=_0x3389ee;var _0x22f1d7,_0x5c5ae6;const {parentId:_0x23ac84,unitId:_0x1cfffa,text:_0x387b41,threadId:_0x4970aa}=_0x5be2e6,_0x3d6a72=(_0x5c5ae6=(_0x22f1d7=_0x387b41[_0x271e42(0x170)])==null?void 0x0:_0x22f1d7[_0x271e42(0x19f)](_0xcc8340=>_0xcc8340[_0x271e42(0x155)]===_0x29a17a[_0x271e42(0x17e)])[_0x271e42(0x158)](_0x5764e8=>_0x5764e8[_0x271e42(0x18a)]))!=null?_0x5c5ae6:[],_0x5e6bd7=JSON[_0x271e42(0x154)](_0x387b41),_0x2635d9=(await this[_0x271e42(0x198)]['requireSession'](_0x1cfffa))[_0x271e42(0x19b)]();if(_0x23ac84){const _0x4eaea4={'memberId':_0x2635d9,'unitId':_0x1cfffa,'content':_0x5e6bd7,'mention':_0x3d6a72,'threadId':_0x4970aa},_0x4fedbe=(await this[_0x271e42(0x1b0)][_0x271e42(0x186)](_0x271e42(0x15f)+_0x1cfffa+_0x271e42(0x1ab),{'body':_0x4eaea4}))[_0x271e42(0x191)][_0x271e42(0x1ac)];return{..._0x5be2e6,'id':_0x4fedbe[_0x271e42(0x1a5)],'dT':_0x536171(+_0x4fedbe[_0x271e42(0x196)])[_0x271e42(0x187)](_0x271e42(0x17a)),'personId':_0x4fedbe[_0x271e42(0x16a)]};}else{const _0x3b642c={'memberId':_0x2635d9,'unitId':_0x1cfffa,'content':_0x5e6bd7,'mention':_0x3d6a72},_0x40cc18=await this['_httpService'][_0x271e42(0x186)](_0x271e42(0x15f)+_0x1cfffa+_0x271e42(0x185),{'body':_0x3b642c});return X(_0x40cc18[_0x271e42(0x191)]['comment'],_0x5be2e6);}}async[_0x3389ee(0x15e)](_0x34ac78){const _0x41a0ee=_0x3389ee;var _0x2849f7,_0xf28cef;const {text:_0x3df360,unitId:_0x5dfaa0}=_0x34ac78,_0x198710=(_0xf28cef=(_0x2849f7=_0x3df360[_0x41a0ee(0x170)])==null?void 0x0:_0x2849f7[_0x41a0ee(0x19f)](_0x3a573c=>_0x3a573c[_0x41a0ee(0x155)]===_0x29a17a[_0x41a0ee(0x17e)])['map'](_0x5a9b0e=>_0x5a9b0e[_0x41a0ee(0x18a)]))!=null?_0xf28cef:[],_0x5c3cf5=JSON[_0x41a0ee(0x154)](_0x3df360),_0x4ac989=_0x34ac78[_0x41a0ee(0x180)],_0x2d4c79=_0x34ac78['id'],_0x4e5db6={'memberId':(await this['_sessionService']['requireSession'](_0x5dfaa0))[_0x41a0ee(0x19b)](),'unitId':_0x5dfaa0,'threadId':_0x4ac989,'mention':_0x198710,'content':_0x5c3cf5,'replyId':_0x2d4c79},_0x26d990=await this['_httpService'][_0x41a0ee(0x186)]('/universer-api/comment/unit/'+_0x5dfaa0+'/edit',{'body':_0x4e5db6});return!_0x26d990[_0x41a0ee(0x191)][_0x41a0ee(0x175)]||_0x26d990['body']['error'][_0x41a0ee(0x193)]===0x1;}async['resolveComment'](_0x11c828){const _0x46e8ea=_0x3389ee,{unitId:_0x3d88f4}=_0x11c828,_0x5d65a4=_0x11c828[_0x46e8ea(0x180)],_0x30b199={'memberId':this[_0x46e8ea(0x168)][_0x46e8ea(0x18f)]()[_0x46e8ea(0x14d)],'unitId':_0x3d88f4,'threadId':_0x5d65a4,'solved':_0x11c828[_0x46e8ea(0x190)]?I[_0x46e8ea(0x171)]:I[_0x46e8ea(0x182)]},_0x4db9b3=await this[_0x46e8ea(0x1b0)]['post'](_0x46e8ea(0x15f)+_0x3d88f4+_0x46e8ea(0x148),{'body':_0x30b199});return!_0x4db9b3['body'][_0x46e8ea(0x175)]||_0x4db9b3['body'][_0x46e8ea(0x175)][_0x46e8ea(0x193)]===0x1;}async[_0x3389ee(0x1a7)](_0x398a30,_0x5e32bb,_0xfcb79b,_0x6541c2){const _0x2ff071=_0x3389ee,_0x20da1f={'memberId':(await this['_sessionService']['requireSession'](_0x398a30))['getMemberID'](),'threadId':_0xfcb79b,'replyId':_0x6541c2,'unitId':_0x398a30},_0x3cdfea=await this[_0x2ff071(0x1b0)][_0x2ff071(0x186)](_0x2ff071(0x15f)+_0x398a30+'/delete',{'body':_0x20da1f});return!_0x3cdfea[_0x2ff071(0x191)]['error']||_0x3cdfea[_0x2ff071(0x191)][_0x2ff071(0x175)][_0x2ff071(0x193)]===0x1;}async['listComments'](_0x53243d,_0x2994b1,_0x477b7e){const _0x3652ff=_0x3389ee,_0x3b951d={'unitId':_0x53243d,'threadId':_0x477b7e},_0x4db5aa=await this[_0x3652ff(0x1b0)]['post'](_0x3652ff(0x15f)+_0x53243d+_0x3652ff(0x150),{'body':_0x3b951d}),_0x427c5c=_0x477b7e[_0x3652ff(0x158)](_0x3e3e73=>ee(_0x4db5aa[_0x3652ff(0x191)][_0x3652ff(0x16b)][_0x3e3e73],_0x53243d,_0x2994b1))[_0x3652ff(0x19f)](Boolean);return Object[_0x3652ff(0x166)](_0x4db5aa[_0x3652ff(0x191)][_0x3652ff(0x172)])[_0x3652ff(0x157)](_0x1d391e=>{const _0x449514=_0x3652ff;this[_0x449514(0x168)][_0x449514(0x176)](_0x1d391e);}),_0x427c5c;}[_0x3389ee(0x19c)](_0x13100c){const _0x4c16d8=_0x3389ee;return{'id':_0x13100c['id'],'threadId':_0x13100c['threadId'],'ref':_0x13100c[_0x4c16d8(0x161)]};}};S=Q([b(0x0,_0x37a0af(_0x523c25)),b(0x1,_0x37a0af(_0x263cf9)),b(0x2,_0x37a0af(_0x28a0e2))],S);function _0x2ec0(_0x4eca6f,_0x35a271){const _0x29b7fa=_0x29b7();return _0x2ec0=function(_0x2ec04a,_0x68d996){_0x2ec04a=_0x2ec04a-0x148;let _0x3700d0=_0x29b7fa[_0x2ec04a];return _0x3700d0;},_0x2ec0(_0x4eca6f,_0x35a271);}var re=Object[_0x3389ee(0x1ad)],te=(_0x3914fc,_0x562fb2,_0xa4887c,_0x1ae63c)=>{const _0x547442=_0x3389ee;for(var _0x57bb16=_0x1ae63c>0x1?void 0x0:_0x1ae63c?re(_0x562fb2,_0xa4887c):_0x562fb2,_0x116da8=_0x3914fc[_0x547442(0x189)]-0x1,_0x2bb25c;_0x116da8>=0x0;_0x116da8--)(_0x2bb25c=_0x3914fc[_0x116da8])&&(_0x57bb16=_0x2bb25c(_0x57bb16)||_0x57bb16);return _0x57bb16;},M=(_0x5e0ffb,_0x939cd7)=>(_0x471d0c,_0x2776f4)=>_0x939cd7(_0x471d0c,_0x2776f4,_0x5e0ffb);let f=class extends _0x422b10{constructor(_0x2ce5ed,_0x431672){const _0x244701=_0x3389ee;super(),this[_0x244701(0x152)]=_0x2ce5ed,this[_0x244701(0x1a9)]=_0x431672,this[_0x244701(0x194)]();}[_0x3389ee(0x194)](){const _0x24e49f=_0x3389ee;this[_0x24e49f(0x152)][_0x24e49f(0x174)]=this[_0x24e49f(0x1a9)],this['_threadCommentDataSourceService'][_0x24e49f(0x14b)]=!0x1;}};f=te([M(0x0,_0x35f50a),M(0x1,_0x37a0af(S))],f);var se=Object[_0x3389ee(0x14c)],oe=Object[_0x3389ee(0x1ad)],ne=(_0x246403,_0x4bd446,_0x5cd9e3)=>_0x4bd446 in _0x246403?se(_0x246403,_0x4bd446,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cd9e3}):_0x246403[_0x4bd446]=_0x5cd9e3,ie=(_0x5b8141,_0x385d20,_0x510017,_0x12d7af)=>{const _0x5087f9=_0x3389ee;for(var _0x5c9b43=_0x12d7af>0x1?void 0x0:_0x12d7af?oe(_0x385d20,_0x510017):_0x385d20,_0x47d758=_0x5b8141[_0x5087f9(0x189)]-0x1,_0x531e9a;_0x47d758>=0x0;_0x47d758--)(_0x531e9a=_0x5b8141[_0x47d758])&&(_0x5c9b43=_0x531e9a(_0x5c9b43)||_0x5c9b43);return _0x5c9b43;},N=(_0x331a09,_0x4f7a08)=>(_0x5d8fa9,_0x2e8b66)=>_0x4f7a08(_0x5d8fa9,_0x2e8b66,_0x331a09),$=(_0xb9e446,_0x3431a1,_0x4d6172)=>ne(_0xb9e446,typeof _0x3431a1!=_0x3389ee(0x19e)?_0x3431a1+'':_0x3431a1,_0x4d6172);let g=class extends _0x1678df{constructor(_0x3b7c1c=O,_0x839da3,_0x77679e){const _0x68ff23=_0x3389ee;super(),this[_0x68ff23(0x18e)]=_0x3b7c1c,this['_injector']=_0x839da3,this['_configService']=_0x77679e;const {..._0x14abdc}=_0x3184fc({},O,this[_0x68ff23(0x18e)]);this[_0x68ff23(0x18c)][_0x68ff23(0x164)](z,_0x14abdc);}[_0x3389ee(0x1a1)](){const _0x4488fe=_0x3389ee;[[S],[f],[_]][_0x4488fe(0x157)](_0x35fe68=>{const _0x441bf5=_0x4488fe;this[_0x441bf5(0x177)][_0x441bf5(0x15a)](_0x35fe68);});}[_0x3389ee(0x149)](){const _0x1b5834=_0x3389ee;this[_0x1b5834(0x177)][_0x1b5834(0x192)](f),this[_0x1b5834(0x177)][_0x1b5834(0x192)](_);}};$(g,_0x3389ee(0x14e),W),$(g,_0x3389ee(0x19d),_0x19b055[_0x3389ee(0x197)]),g=ie([_0x37e8aa(_0x6aa952,_0x4df037,_0x5d0ee8),N(0x1,_0x37a0af(_0x35741c)),N(0x2,_0x3f04d9)],g);function _0x29b7(){const _0x1375d9=['getMemberID','saveCommentToSnapshot','type','symbol','filter','root','onStarting','parse','_threadCommentModel','addComment','replyId','_commentService','deleteComment','size','_threadCommentDataSource','Reply','/reply','reply','getOwnPropertyDescriptor','getUnit','replies','_httpService','/solved','onReady','_initUserSync','syncUpdateMutationToColla','defineProperty','userID','pluginName','subscribe','/list','UNRECOGNIZED','_threadCommentDataSourceService','1867628pLAXgY','stringify','rangeType','resolveComment','forEach','map','Solve','add','unitId','Delete','1288fKbpWg','updateComment','/universer-api/comment/unit/','user','ref','2540388naIGfC','1567293IjnYlx','setConfig','getComment','values','/universer-api/user/list','_userService','thread-comment-data-source.config','userId','comments','pipe','Unknown','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','Solved','users','_init','dataSource','error','addUser','_injector','payload','6DmikqU','YYYY/MM/DD\x20HH:mm','20095749RHKBxh','179542yVINXa','disposeWithMe','COMMENT','Edit','threadId','133250TKNHyY','OpenOrReOpen','content','find','/add','post','format','Add','length','rangeId','personId','_configService','delete','_config','getCurrentUser','resolved','body','get','code','_initDataSource','solved','createTimestamp','UNIVER_UNKNOWN','_sessionService','commentUpdate$','4676aDitIH'];_0x29b7=function(){return _0x1375d9;};return _0x29b7();}export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x48adec=_0x110e;(function(_0x512cd4,_0x53fbb0){const _0x30b997=_0x110e,_0x53e5d6=_0x512cd4();while(!![]){try{const _0x3be485=-parseInt(_0x30b997(0x177))/0x1+parseInt(_0x30b997(0x189))/0x2*(-parseInt(_0x30b997(0x173))/0x3)+-parseInt(_0x30b997(0x15b))/0x4+parseInt(_0x30b997(0x167))/0x5+-parseInt(_0x30b997(0x174))/0x6+parseInt(_0x30b997(0x15c))/0x7+parseInt(_0x30b997(0x16a))/0x8;if(_0x3be485===_0x53fbb0)break;else _0x53e5d6['push'](_0x53e5d6['shift']());}catch(_0x136989){_0x53e5d6['push'](_0x53e5d6['shift']());}}}(_0x4c9f,0x9caf0));import{CommentService as _0x4fbbbb,CollaborationSessionService as _0x3a373c,UniverCollaborationClientPlugin as _0x542fe2}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1cd485}from'@univerjs-pro/license';import{dayjs as _0x3e7d6e,UserManagerService as _0x39643a,Inject as _0x2b7fb0,Injector as _0x21ef67,Disposable as _0x274417,CustomRangeType as _0x3e7642,UniverInstanceType as _0x275ad0,DependentOn as _0x4f8b32,IConfigService as _0x1e3178,Plugin as _0x4c197b,merge as _0x4267fa}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3a8b74}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x106c35,IThreadCommentDataSourceService as _0x43ec35}from'@univerjs/thread-comment';import{bufferTime as _0x54fa14}from'rxjs';import{HTTPService as _0x448a56}from'@univerjs/network';const W=_0x48adec(0x16e);var I=(_0x17e3f0=>(_0x17e3f0[_0x17e3f0[_0x48adec(0x182)]=0x0]='OpenOrReOpen',_0x17e3f0[_0x17e3f0[_0x48adec(0x197)]=0x1]=_0x48adec(0x197),_0x17e3f0[_0x17e3f0[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x17e3f0))(I||{}),v=(_0x2c3b88=>(_0x2c3b88[_0x2c3b88['Unknown']=0x0]='Unknown',_0x2c3b88[_0x2c3b88['Add']=0x1]='Add',_0x2c3b88[_0x2c3b88[_0x48adec(0x147)]=0x2]=_0x48adec(0x147),_0x2c3b88[_0x2c3b88[_0x48adec(0x160)]=0x3]=_0x48adec(0x160),_0x2c3b88[_0x2c3b88[_0x48adec(0x14e)]=0x4]='Delete',_0x2c3b88[_0x2c3b88[_0x48adec(0x196)]=0x5]='Solve',_0x2c3b88[_0x2c3b88[_0x48adec(0x169)]=-0x1]=_0x48adec(0x169),_0x2c3b88))(v||{});const y=_0x2d8b79=>_0x3e7d6e(new Date(+_0x2d8b79))[_0x48adec(0x179)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x42f994,_0x5b6040)=>{const _0x5725e7=_0x48adec,_0x23d1a8=_0x42f994['get'](_0x39643a),_0x226caa=_0x42f994['get'](_0x448a56);_0x5b6040[_0x5725e7(0x19d)](_0x21de49=>{const _0x433b13=_0x5725e7;_0x23d1a8[_0x433b13(0x17f)](_0x21de49)&&_0x5b6040['delete'](_0x21de49);}),_0x5b6040[_0x5725e7(0x198)]&&(await _0x226caa[_0x5725e7(0x199)](_0x5725e7(0x175),{'params':{'userIDs':[..._0x5b6040]}}))[_0x5725e7(0x176)][_0x5725e7(0x1a2)][_0x5725e7(0x19d)](_0x2f6a7b=>{const _0x178472=_0x5725e7;_0x2f6a7b&&_0x23d1a8[_0x178472(0x19f)](_0x2f6a7b);});};var K=Object[_0x48adec(0x171)],V=(_0x1461d8,_0x3d3968,_0x5b25e3,_0x33fa99)=>{const _0x5536f0=_0x48adec;for(var _0x3efa94=_0x33fa99>0x1?void 0x0:_0x33fa99?K(_0x3d3968,_0x5b25e3):_0x3d3968,_0x1bb2a3=_0x1461d8[_0x5536f0(0x19b)]-0x1,_0x438df4;_0x1bb2a3>=0x0;_0x1bb2a3--)(_0x438df4=_0x1461d8[_0x1bb2a3])&&(_0x3efa94=_0x438df4(_0x3efa94)||_0x3efa94);return _0x3efa94;},p=(_0x2a495d,_0x1f925c)=>(_0x2b40b7,_0x3cd1d5)=>_0x1f925c(_0x2b40b7,_0x3cd1d5,_0x2a495d);let _=class extends _0x274417{constructor(_0x57c853,_0x4b95d6,_0x216072,_0x3a7402){const _0x25755a=_0x48adec;super(),this[_0x25755a(0x14f)]=_0x57c853,this[_0x25755a(0x170)]=_0x4b95d6,this['_userService']=_0x216072,this[_0x25755a(0x16f)]=_0x3a7402,this[_0x25755a(0x187)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f8308=_0x48adec;this['disposeWithMe'](this['_threadCommentModel']['commentUpdate$'][_0x1f8308(0x15e)](_0x54fa14(0x10))['subscribe'](_0x588e44=>{const _0x499adb=_0x1f8308,_0x2ecb71=new Set();_0x588e44[_0x499adb(0x19d)](_0x36c054=>{const _0x35edf1=_0x499adb;switch(_0x36c054[_0x35edf1(0x18c)]){case _0x35edf1(0x15f):{const _0x5d4b55=_0x36c054[_0x35edf1(0x16b)]['personId'];_0x2ecb71['add'](_0x5d4b55);break;}}}),B(this[_0x499adb(0x16f)],_0x2ecb71);}));}[_0x48adec(0x187)](){const _0x11cc9c=_0x48adec;this[_0x11cc9c(0x17a)](this[_0x11cc9c(0x14f)][_0x11cc9c(0x155)][_0x11cc9c(0x194)](async _0x445c20=>{const _0x28092a=_0x11cc9c;var _0x315583,_0x517b99,_0x3dd92,_0x188098;const _0x3922ff=(_0x315583=this[_0x28092a(0x170)][_0x28092a(0x162)](_0x445c20['unitId'])[_0x28092a(0x1a0)](_0x504377=>_0x504377[_0x28092a(0x1a3)]===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x315583[_0x28092a(0x14a)];if(!_0x3922ff)return;const {unitId:_0x5376bb,subUnitId:_0x135b91}=_0x3922ff;switch(_0x445c20['user']&&this[_0x28092a(0x148)][_0x28092a(0x19f)](_0x445c20[_0x28092a(0x159)]),_0x445c20['type']){case v[_0x28092a(0x158)]:break;case v[_0x28092a(0x147)]:{this['_threadCommentModel'][_0x28092a(0x18a)](_0x5376bb,_0x135b91,{'unitId':_0x5376bb,'subUnitId':_0x135b91,'ref':'','id':_0x445c20[_0x28092a(0x151)],'dT':y(+_0x445c20[_0x28092a(0x15d)]),'threadId':_0x445c20[_0x28092a(0x1a3)],'personId':(_0x3dd92=(_0x517b99=_0x445c20['user'])==null?void 0x0:_0x517b99['userID'])!=null?_0x3dd92:_0x445c20[_0x28092a(0x188)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)]),'parentId':_0x3922ff['id']});break;}case v['Delete']:{const _0x293c53=this['_threadCommentModel'][_0x28092a(0x1a1)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);_0x293c53&&_0x293c53['parentId']&&this[_0x28092a(0x170)][_0x28092a(0x16c)](_0x5376bb,_0x135b91,_0x445c20[_0x28092a(0x151)]);break;}case v[_0x28092a(0x160)]:{this[_0x28092a(0x170)][_0x28092a(0x180)](_0x5376bb,_0x135b91,{'commentId':_0x445c20[_0x28092a(0x151)],'text':JSON[_0x28092a(0x156)](_0x445c20[_0x28092a(0x172)])});break;}case v[_0x28092a(0x196)]:{const _0x563930=(_0x188098=this['_threadCommentModel'][_0x28092a(0x162)](_0x445c20[_0x28092a(0x195)])[_0x28092a(0x1a0)](_0x5e015a=>_0x5e015a['threadId']===_0x445c20[_0x28092a(0x1a3)]))==null?void 0x0:_0x188098[_0x28092a(0x14a)];_0x563930&&this[_0x28092a(0x170)][_0x28092a(0x186)](_0x5376bb,_0x135b91,_0x563930['id'],_0x445c20[_0x28092a(0x191)]===I['Solved']);break;}}}));}};function _0x110e(_0x58bca,_0x50c825){const _0x4c9fea=_0x4c9f();return _0x110e=function(_0x110ee5,_0x54306a){_0x110ee5=_0x110ee5-0x147;let _0xe6558a=_0x4c9fea[_0x110ee5];return _0xe6558a;},_0x110e(_0x58bca,_0x50c825);}_=V([p(0x0,_0x2b7fb0(_0x4fbbbb)),p(0x1,_0x2b7fb0(_0x106c35)),p(0x2,_0x2b7fb0(_0x39643a)),p(0x3,_0x2b7fb0(_0x21ef67))],_);const z=_0x48adec(0x15a),O={};var k=Object[_0x48adec(0x171)],Q=(_0xac3178,_0x125aef,_0x4e1d1c,_0x45ba5b)=>{const _0x3573fc=_0x48adec;for(var _0x4b6ab0=_0x45ba5b>0x1?void 0x0:_0x45ba5b?k(_0x125aef,_0x4e1d1c):_0x125aef,_0x5b6cea=_0xac3178[_0x3573fc(0x19b)]-0x1,_0x598e40;_0x5b6cea>=0x0;_0x5b6cea--)(_0x598e40=_0xac3178[_0x5b6cea])&&(_0x4b6ab0=_0x598e40(_0x4b6ab0)||_0x4b6ab0);return _0x4b6ab0;},b=(_0x4cdaca,_0x329e5e)=>(_0x269a68,_0x162800)=>_0x329e5e(_0x269a68,_0x162800,_0x4cdaca);function X(_0x12184f,_0x515cb7){const _0x1dafd3=_0x48adec,_0x239333=_0x12184f[_0x1dafd3(0x14b)][0x0];return{..._0x515cb7,'id':_0x239333[_0x1dafd3(0x151)],'resolved':_0x12184f[_0x1dafd3(0x191)]===0x1,'dT':y(_0x239333[_0x1dafd3(0x15d)]),'personId':_0x239333[_0x1dafd3(0x188)],'threadId':_0x239333['threadId']};}function ee(_0x2966de,_0x13c98b,_0x53d6e4){const _0x3ca3d4=_0x48adec;var _0x4036b1,_0x28a8c4;if(((_0x28a8c4=(_0x4036b1=_0x2966de==null?void 0x0:_0x2966de[_0x3ca3d4(0x14b)])==null?void 0x0:_0x4036b1[_0x3ca3d4(0x19b)])!=null?_0x28a8c4:0x0)>0x0){const _0xa5bb15=(_0x5200a8,_0x4ad3e0)=>({'id':_0x5200a8[_0x3ca3d4(0x151)],'threadId':_0x5200a8[_0x3ca3d4(0x1a3)],'dT':y(_0x5200a8[_0x3ca3d4(0x15d)]),'personId':_0x5200a8[_0x3ca3d4(0x188)],'resolved':_0x2966de[_0x3ca3d4(0x191)]===I['Solved'],'unitId':_0x13c98b,'subUnitId':_0x53d6e4,'text':JSON[_0x3ca3d4(0x156)](_0x5200a8['content']),'parentId':_0x4ad3e0}),_0x1710a9=_0xa5bb15(_0x2966de['replies'][0x0]);return{..._0x1710a9,'children':_0x2966de[_0x3ca3d4(0x14b)][_0x3ca3d4(0x152)](0x1)[_0x3ca3d4(0x181)](_0x382878=>_0xa5bb15(_0x382878,_0x1710a9['id']))};}return null;}function _0x4c9f(){const _0x156489=['createTimestamp','pipe','add','Edit','symbol','getUnit','onReady','defineProperty','/add','post','4820640xAMSdt','getMemberID','UNRECOGNIZED','7952448MpAAEq','payload','deleteComment','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_injector','_threadCommentModel','getOwnPropertyDescriptor','content','21lzmiOr','3028524udkfjt','/universer-api/user/list','body','857422GZvXLJ','/edit','format','disposeWithMe','onStarting','_sessionService','code','filter','getUser','updateComment','map','OpenOrReOpen','stringify','resolved','YYYY/MM/DD\x20HH:mm','resolveComment','_init','userId','50506TnmBZQ','addComment','comments','type','setConfig','_initDataSource','_configService','_threadCommentDataSourceService','solved','customRanges','rangeId','subscribe','unitId','Solve','Solved','size','get','COMMENT','length','comment','forEach','requireSession','addUser','find','getComment','users','threadId','Reply','_userService','rangeType','root','replies','/universer-api/comment/unit/','dataSource','Delete','_commentService','error','replyId','slice','values','saveCommentToSnapshot','commentUpdate$','parse','/solved','Add','user','thread-comment-data-source.config','3467216MGwWYy','7625401jQSKin'];_0x4c9f=function(){return _0x156489;};return _0x4c9f();}let S=class{constructor(_0x47cb97,_0xc18321,_0xfd51a1){const _0x4d3382=_0x48adec;this[_0x4d3382(0x16d)]=_0x47cb97,this[_0x4d3382(0x148)]=_0xc18321,this[_0x4d3382(0x17c)]=_0xfd51a1;}async[_0x48adec(0x18a)](_0x381fee){const _0x3639a0=_0x48adec;var _0x2d6db5,_0x58a9f7;const {parentId:_0x42e2d4,unitId:_0x52a6b0,text:_0x27c3ac,threadId:_0xca6043}=_0x381fee,_0x215c7a=(_0x58a9f7=(_0x2d6db5=_0x27c3ac[_0x3639a0(0x192)])==null?void 0x0:_0x2d6db5[_0x3639a0(0x17e)](_0x714043=>_0x714043[_0x3639a0(0x149)]===_0x3e7642[_0x3639a0(0x19a)])[_0x3639a0(0x181)](_0x49d69d=>_0x49d69d[_0x3639a0(0x193)]))!=null?_0x58a9f7:[],_0x112655=JSON[_0x3639a0(0x183)](_0x27c3ac),_0x2c222e=(await this['_sessionService']['requireSession'](_0x52a6b0))[_0x3639a0(0x168)]();if(_0x42e2d4){const _0x12c29c={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a,'threadId':_0xca6043},_0x77f46=(await this[_0x3639a0(0x16d)][_0x3639a0(0x166)](_0x3639a0(0x14c)+_0x52a6b0+'/reply',{'body':_0x12c29c}))['body']['reply'];return{..._0x381fee,'id':_0x77f46[_0x3639a0(0x151)],'dT':_0x3e7d6e(+_0x77f46[_0x3639a0(0x15d)])['format'](_0x3639a0(0x185)),'personId':_0x77f46[_0x3639a0(0x188)]};}else{const _0x3112f0={'memberId':_0x2c222e,'unitId':_0x52a6b0,'content':_0x112655,'mention':_0x215c7a},_0x1d1f7a=await this[_0x3639a0(0x16d)]['post']('/universer-api/comment/unit/'+_0x52a6b0+_0x3639a0(0x165),{'body':_0x3112f0});return X(_0x1d1f7a[_0x3639a0(0x176)][_0x3639a0(0x19c)],_0x381fee);}}async['updateComment'](_0x1f841b){const _0x6dad84=_0x48adec;var _0x391d70,_0x2048af;const {text:_0x101eb6,unitId:_0x3e56c8}=_0x1f841b,_0x2b10fa=(_0x2048af=(_0x391d70=_0x101eb6['customRanges'])==null?void 0x0:_0x391d70[_0x6dad84(0x17e)](_0x24f515=>_0x24f515[_0x6dad84(0x149)]===_0x3e7642[_0x6dad84(0x19a)])[_0x6dad84(0x181)](_0x10dc30=>_0x10dc30[_0x6dad84(0x193)]))!=null?_0x2048af:[],_0x3f5dd3=JSON[_0x6dad84(0x183)](_0x101eb6),_0x20d790=_0x1f841b[_0x6dad84(0x1a3)],_0x2bff9a=_0x1f841b['id'],_0x1266bd={'memberId':(await this['_sessionService']['requireSession'](_0x3e56c8))['getMemberID'](),'unitId':_0x3e56c8,'threadId':_0x20d790,'mention':_0x2b10fa,'content':_0x3f5dd3,'replyId':_0x2bff9a},_0x41d163=await this[_0x6dad84(0x16d)][_0x6dad84(0x166)](_0x6dad84(0x14c)+_0x3e56c8+_0x6dad84(0x178),{'body':_0x1266bd});return!_0x41d163[_0x6dad84(0x176)][_0x6dad84(0x150)]||_0x41d163[_0x6dad84(0x176)]['error'][_0x6dad84(0x17d)]===0x1;}async[_0x48adec(0x186)](_0x1751d9){const _0x3b6a23=_0x48adec,{unitId:_0x376e7f}=_0x1751d9,_0x7019f2=_0x1751d9['threadId'],_0x184031={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x376e7f,'threadId':_0x7019f2,'solved':_0x1751d9[_0x3b6a23(0x184)]?I[_0x3b6a23(0x197)]:I[_0x3b6a23(0x182)]},_0x54fc1c=await this['_httpService'][_0x3b6a23(0x166)](_0x3b6a23(0x14c)+_0x376e7f+_0x3b6a23(0x157),{'body':_0x184031});return!_0x54fc1c[_0x3b6a23(0x176)][_0x3b6a23(0x150)]||_0x54fc1c[_0x3b6a23(0x176)]['error']['code']===0x1;}async[_0x48adec(0x16c)](_0x47c33b,_0x25efea,_0x2f238b,_0x5d24cf){const _0x3e5ce2=_0x48adec,_0x49a907={'memberId':(await this[_0x3e5ce2(0x17c)][_0x3e5ce2(0x19e)](_0x47c33b))[_0x3e5ce2(0x168)](),'threadId':_0x2f238b,'replyId':_0x5d24cf,'unitId':_0x47c33b},_0x4e5da4=await this['_httpService'][_0x3e5ce2(0x166)](_0x3e5ce2(0x14c)+_0x47c33b+'/delete',{'body':_0x49a907});return!_0x4e5da4[_0x3e5ce2(0x176)][_0x3e5ce2(0x150)]||_0x4e5da4['body']['error'][_0x3e5ce2(0x17d)]===0x1;}async['listComments'](_0x1fd226,_0x5d63e7,_0x859b81){const _0x40bded=_0x48adec,_0x44aee3={'unitId':_0x1fd226,'threadId':_0x859b81},_0x5f771f=await this['_httpService'][_0x40bded(0x166)]('/universer-api/comment/unit/'+_0x1fd226+'/list',{'body':_0x44aee3}),_0x5cb3a3=_0x859b81[_0x40bded(0x181)](_0x18b6e8=>ee(_0x5f771f[_0x40bded(0x176)][_0x40bded(0x18b)][_0x18b6e8],_0x1fd226,_0x5d63e7))[_0x40bded(0x17e)](Boolean);return Object[_0x40bded(0x153)](_0x5f771f[_0x40bded(0x176)][_0x40bded(0x1a2)])[_0x40bded(0x19d)](_0x1b37be=>{const _0x3a03e5=_0x40bded;this[_0x3a03e5(0x148)][_0x3a03e5(0x19f)](_0x1b37be);}),_0x5cb3a3;}[_0x48adec(0x154)](_0xf43c27){const _0x52d127=_0x48adec;return{'id':_0xf43c27['id'],'threadId':_0xf43c27[_0x52d127(0x1a3)],'ref':_0xf43c27['ref']};}};S=Q([b(0x0,_0x2b7fb0(_0x448a56)),b(0x1,_0x2b7fb0(_0x39643a)),b(0x2,_0x2b7fb0(_0x3a373c))],S);var re=Object[_0x48adec(0x171)],te=(_0x313d5f,_0x2d0374,_0xe96fec,_0x407950)=>{const _0x4a8f99=_0x48adec;for(var _0x37d9fb=_0x407950>0x1?void 0x0:_0x407950?re(_0x2d0374,_0xe96fec):_0x2d0374,_0x16d140=_0x313d5f[_0x4a8f99(0x19b)]-0x1,_0xbfffcd;_0x16d140>=0x0;_0x16d140--)(_0xbfffcd=_0x313d5f[_0x16d140])&&(_0x37d9fb=_0xbfffcd(_0x37d9fb)||_0x37d9fb);return _0x37d9fb;},M=(_0x41e3ab,_0x3b1625)=>(_0x8f812c,_0x3198e2)=>_0x3b1625(_0x8f812c,_0x3198e2,_0x41e3ab);let f=class extends _0x274417{constructor(_0x1fc0ec,_0x14e6ca){const _0x5acaff=_0x48adec;super(),this[_0x5acaff(0x190)]=_0x1fc0ec,this['_threadCommentDataSource']=_0x14e6ca,this['_initDataSource']();}[_0x48adec(0x18e)](){const _0x52e7e8=_0x48adec;this[_0x52e7e8(0x190)][_0x52e7e8(0x14d)]=this['_threadCommentDataSource'],this[_0x52e7e8(0x190)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x43ec35),M(0x1,_0x2b7fb0(S))],f);var se=Object[_0x48adec(0x164)],oe=Object[_0x48adec(0x171)],ne=(_0x484964,_0xfcb1af,_0xaadb2f)=>_0xfcb1af in _0x484964?se(_0x484964,_0xfcb1af,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaadb2f}):_0x484964[_0xfcb1af]=_0xaadb2f,ie=(_0x97f438,_0x506f56,_0x575599,_0x38d795)=>{for(var _0x24d440=_0x38d795>0x1?void 0x0:_0x38d795?oe(_0x506f56,_0x575599):_0x506f56,_0x122e73=_0x97f438['length']-0x1,_0x5c42d3;_0x122e73>=0x0;_0x122e73--)(_0x5c42d3=_0x97f438[_0x122e73])&&(_0x24d440=_0x5c42d3(_0x24d440)||_0x24d440);return _0x24d440;},N=(_0x5e2bbc,_0x36451a)=>(_0x3d99da,_0x42790f)=>_0x36451a(_0x3d99da,_0x42790f,_0x5e2bbc),$=(_0x1d3623,_0x5d0d1a,_0x32ef4d)=>ne(_0x1d3623,typeof _0x5d0d1a!=_0x48adec(0x161)?_0x5d0d1a+'':_0x5d0d1a,_0x32ef4d);let g=class extends _0x4c197b{constructor(_0x4c018b=O,_0x2d379d,_0x16c43d){const _0x2a81b2=_0x48adec;super(),this['_config']=_0x4c018b,this['_injector']=_0x2d379d,this[_0x2a81b2(0x18f)]=_0x16c43d;const {..._0x5bfca6}=_0x4267fa({},O,this['_config']);this['_configService'][_0x2a81b2(0x18d)](z,_0x5bfca6);}[_0x48adec(0x17b)](){const _0x1e6f3f=_0x48adec;[[S],[f],[_]][_0x1e6f3f(0x19d)](_0xfce8a4=>{const _0x3aa938=_0x1e6f3f;this[_0x3aa938(0x16f)][_0x3aa938(0x15f)](_0xfce8a4);});}[_0x48adec(0x163)](){const _0x2097c7=_0x48adec;this[_0x2097c7(0x16f)][_0x2097c7(0x199)](f),this['_injector']['get'](_);}};$(g,'pluginName',W),$(g,_0x48adec(0x18c),_0x275ad0['UNIVER_UNKNOWN']),g=ie([_0x4f8b32(_0x3a8b74,_0x542fe2,_0x1cd485),N(0x1,_0x2b7fb0(_0x21ef67)),N(0x2,_0x1e3178)],g);export{g as UniverThreadCommentDataSourcePlugin};
|
|
1
|
+
const _0x3389ee=_0x2ec0;(function(_0x319c66,_0x2e6133){const _0x1268d9=_0x2ec0,_0x5644cc=_0x319c66();while(!![]){try{const _0x4cbb48=parseInt(_0x1268d9(0x17c))/0x1+parseInt(_0x1268d9(0x179))/0x2*(-parseInt(_0x1268d9(0x163))/0x3)+-parseInt(_0x1268d9(0x153))/0x4+-parseInt(_0x1268d9(0x181))/0x5+parseInt(_0x1268d9(0x162))/0x6+parseInt(_0x1268d9(0x19a))/0x7*(parseInt(_0x1268d9(0x15d))/0x8)+parseInt(_0x1268d9(0x17b))/0x9;if(_0x4cbb48===_0x2e6133)break;else _0x5644cc['push'](_0x5644cc['shift']());}catch(_0x8cc092){_0x5644cc['push'](_0x5644cc['shift']());}}}(_0x29b7,0xd7743));import{CommentService as _0x43d37e,CollaborationSessionService as _0x28a0e2,UniverCollaborationClientPlugin as _0x4df037}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x5d0ee8}from'@univerjs-pro/license';import{dayjs as _0x536171,UserManagerService as _0x263cf9,Inject as _0x37a0af,Injector as _0x35741c,Disposable as _0x422b10,CustomRangeType as _0x29a17a,UniverInstanceType as _0x19b055,DependentOn as _0x37e8aa,IConfigService as _0x3f04d9,Plugin as _0x1678df,merge as _0x3184fc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x6aa952}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x19040a,IThreadCommentDataSourceService as _0x35f50a}from'@univerjs/thread-comment';import{bufferTime as _0x239bc1}from'rxjs';import{HTTPService as _0x523c25}from'@univerjs/network';const W=_0x3389ee(0x16f);var I=(_0x2f9989=>(_0x2f9989[_0x2f9989[_0x3389ee(0x182)]=0x0]=_0x3389ee(0x182),_0x2f9989[_0x2f9989[_0x3389ee(0x171)]=0x1]=_0x3389ee(0x171),_0x2f9989[_0x2f9989['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2f9989))(I||{}),v=(_0xdedbe4=>(_0xdedbe4[_0xdedbe4[_0x3389ee(0x16d)]=0x0]=_0x3389ee(0x16d),_0xdedbe4[_0xdedbe4['Add']=0x1]='Add',_0xdedbe4[_0xdedbe4[_0x3389ee(0x1aa)]=0x2]=_0x3389ee(0x1aa),_0xdedbe4[_0xdedbe4[_0x3389ee(0x17f)]=0x3]=_0x3389ee(0x17f),_0xdedbe4[_0xdedbe4[_0x3389ee(0x15c)]=0x4]='Delete',_0xdedbe4[_0xdedbe4[_0x3389ee(0x159)]=0x5]=_0x3389ee(0x159),_0xdedbe4[_0xdedbe4[_0x3389ee(0x151)]=-0x1]=_0x3389ee(0x151),_0xdedbe4))(v||{});const y=_0x142eb7=>_0x536171(new Date(+_0x142eb7))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x34cae1,_0x42ec47)=>{const _0x403cd1=_0x3389ee,_0x3c93fe=_0x34cae1[_0x403cd1(0x192)](_0x263cf9),_0x46e673=_0x34cae1[_0x403cd1(0x192)](_0x523c25);_0x42ec47[_0x403cd1(0x157)](_0x9fdf5a=>{const _0xae69aa=_0x403cd1;_0x3c93fe['getUser'](_0x9fdf5a)&&_0x42ec47[_0xae69aa(0x18d)](_0x9fdf5a);}),_0x42ec47[_0x403cd1(0x1a8)]&&(await _0x46e673['get'](_0x403cd1(0x167),{'params':{'userIDs':[..._0x42ec47]}}))['body'][_0x403cd1(0x172)][_0x403cd1(0x157)](_0x20189e=>{const _0x4053ec=_0x403cd1;_0x20189e&&_0x3c93fe[_0x4053ec(0x176)](_0x20189e);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x4ffc0b,_0x5db76f,_0x2b23d7,_0x2640a5)=>{const _0x5b7509=_0x3389ee;for(var _0x58a2b0=_0x2640a5>0x1?void 0x0:_0x2640a5?K(_0x5db76f,_0x2b23d7):_0x5db76f,_0x22c540=_0x4ffc0b[_0x5b7509(0x189)]-0x1,_0x3e2c1b;_0x22c540>=0x0;_0x22c540--)(_0x3e2c1b=_0x4ffc0b[_0x22c540])&&(_0x58a2b0=_0x3e2c1b(_0x58a2b0)||_0x58a2b0);return _0x58a2b0;},p=(_0x2033b6,_0x3bcfe9)=>(_0x11f11d,_0x347009)=>_0x3bcfe9(_0x11f11d,_0x347009,_0x2033b6);let _=class extends _0x422b10{constructor(_0x24329f,_0x6ecb9c,_0x3dbda8,_0x32b935){const _0x5af99f=_0x3389ee;super(),this[_0x5af99f(0x1a6)]=_0x24329f,this[_0x5af99f(0x1a3)]=_0x6ecb9c,this['_userService']=_0x3dbda8,this[_0x5af99f(0x177)]=_0x32b935,this[_0x5af99f(0x173)](),this[_0x5af99f(0x14a)]();}['_initUserSync'](){const _0x91b5a4=_0x3389ee;this[_0x91b5a4(0x17d)](this[_0x91b5a4(0x1a3)][_0x91b5a4(0x199)][_0x91b5a4(0x16c)](_0x239bc1(0x10))[_0x91b5a4(0x14f)](_0x104340=>{const _0x87d5bc=_0x91b5a4,_0x4c8bf2=new Set();_0x104340['forEach'](_0x3908e8=>{const _0x35e6f2=_0x2ec0;switch(_0x3908e8[_0x35e6f2(0x19d)]){case _0x35e6f2(0x15a):{const _0x544262=_0x3908e8[_0x35e6f2(0x178)][_0x35e6f2(0x18b)];_0x4c8bf2['add'](_0x544262);break;}}}),B(this[_0x87d5bc(0x177)],_0x4c8bf2);}));}[_0x3389ee(0x173)](){const _0x320816=_0x3389ee;this[_0x320816(0x17d)](this[_0x320816(0x1a6)][_0x320816(0x199)][_0x320816(0x14f)](async _0x16e5eb=>{const _0x2465c2=_0x320816;var _0x50472c,_0x127331,_0x17f1fa,_0x39512e;const _0xaf36f5=(_0x50472c=this[_0x2465c2(0x1a3)]['getUnit'](_0x16e5eb[_0x2465c2(0x15b)])['find'](_0x127c4a=>_0x127c4a[_0x2465c2(0x180)]===_0x16e5eb['threadId']))==null?void 0x0:_0x50472c[_0x2465c2(0x1a0)];if(!_0xaf36f5)return;const {unitId:_0x294dca,subUnitId:_0x9d03ff}=_0xaf36f5;switch(_0x16e5eb[_0x2465c2(0x160)]&&this[_0x2465c2(0x168)][_0x2465c2(0x176)](_0x16e5eb[_0x2465c2(0x160)]),_0x16e5eb[_0x2465c2(0x19d)]){case v[_0x2465c2(0x188)]:break;case v[_0x2465c2(0x1aa)]:{this['_threadCommentModel'][_0x2465c2(0x1a4)](_0x294dca,_0x9d03ff,{'unitId':_0x294dca,'subUnitId':_0x9d03ff,'ref':'','id':_0x16e5eb[_0x2465c2(0x1a5)],'dT':y(+_0x16e5eb[_0x2465c2(0x196)]),'threadId':_0x16e5eb[_0x2465c2(0x180)],'personId':(_0x17f1fa=(_0x127331=_0x16e5eb['user'])==null?void 0x0:_0x127331['userID'])!=null?_0x17f1fa:_0x16e5eb[_0x2465c2(0x16a)],'text':JSON[_0x2465c2(0x1a2)](_0x16e5eb[_0x2465c2(0x183)]),'parentId':_0xaf36f5['id']});break;}case v['Delete']:{const _0x9b7ec7=this[_0x2465c2(0x1a3)][_0x2465c2(0x165)](_0x294dca,_0x9d03ff,_0x16e5eb['replyId']);_0x9b7ec7&&_0x9b7ec7[_0x2465c2(0x16e)]&&this[_0x2465c2(0x1a3)][_0x2465c2(0x1a7)](_0x294dca,_0x9d03ff,_0x16e5eb[_0x2465c2(0x1a5)]);break;}case v[_0x2465c2(0x17f)]:{this[_0x2465c2(0x1a3)][_0x2465c2(0x15e)](_0x294dca,_0x9d03ff,{'commentId':_0x16e5eb[_0x2465c2(0x1a5)],'text':JSON['parse'](_0x16e5eb[_0x2465c2(0x183)])});break;}case v['Solve']:{const _0x48d793=(_0x39512e=this[_0x2465c2(0x1a3)][_0x2465c2(0x1ae)](_0x16e5eb[_0x2465c2(0x15b)])[_0x2465c2(0x184)](_0x2cb4ef=>_0x2cb4ef[_0x2465c2(0x180)]===_0x16e5eb[_0x2465c2(0x180)]))==null?void 0x0:_0x39512e[_0x2465c2(0x1a0)];_0x48d793&&this[_0x2465c2(0x1a3)][_0x2465c2(0x156)](_0x294dca,_0x9d03ff,_0x48d793['id'],_0x16e5eb[_0x2465c2(0x195)]===I[_0x2465c2(0x171)]);break;}}}));}};_=V([p(0x0,_0x37a0af(_0x43d37e)),p(0x1,_0x37a0af(_0x19040a)),p(0x2,_0x37a0af(_0x263cf9)),p(0x3,_0x37a0af(_0x35741c))],_);const z=_0x3389ee(0x169),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x58a91f,_0x129c41,_0x370e58,_0x447083)=>{const _0x493960=_0x3389ee;for(var _0xf719a4=_0x447083>0x1?void 0x0:_0x447083?k(_0x129c41,_0x370e58):_0x129c41,_0x1ca164=_0x58a91f[_0x493960(0x189)]-0x1,_0x3abf0f;_0x1ca164>=0x0;_0x1ca164--)(_0x3abf0f=_0x58a91f[_0x1ca164])&&(_0xf719a4=_0x3abf0f(_0xf719a4)||_0xf719a4);return _0xf719a4;},b=(_0x2f5cc3,_0x4567be)=>(_0x348a12,_0x5e3f21)=>_0x4567be(_0x348a12,_0x5e3f21,_0x2f5cc3);function X(_0x309ddc,_0xc37460){const _0x1853ed=_0x3389ee,_0x536185=_0x309ddc[_0x1853ed(0x1af)][0x0];return{..._0xc37460,'id':_0x536185['replyId'],'resolved':_0x309ddc[_0x1853ed(0x195)]===0x1,'dT':y(_0x536185['createTimestamp']),'personId':_0x536185[_0x1853ed(0x16a)],'threadId':_0x536185[_0x1853ed(0x180)]};}function ee(_0x57a3b8,_0x1c2c29,_0x47cfea){const _0x5b5fe7=_0x3389ee;var _0x14ee9e,_0x2ae217;if(((_0x2ae217=(_0x14ee9e=_0x57a3b8==null?void 0x0:_0x57a3b8['replies'])==null?void 0x0:_0x14ee9e[_0x5b5fe7(0x189)])!=null?_0x2ae217:0x0)>0x0){const _0x3a7903=(_0x2a6abf,_0x5193a9)=>({'id':_0x2a6abf[_0x5b5fe7(0x1a5)],'threadId':_0x2a6abf[_0x5b5fe7(0x180)],'dT':y(_0x2a6abf[_0x5b5fe7(0x196)]),'personId':_0x2a6abf[_0x5b5fe7(0x16a)],'resolved':_0x57a3b8[_0x5b5fe7(0x195)]===I[_0x5b5fe7(0x171)],'unitId':_0x1c2c29,'subUnitId':_0x47cfea,'text':JSON['parse'](_0x2a6abf[_0x5b5fe7(0x183)]),'parentId':_0x5193a9}),_0xd1c571=_0x3a7903(_0x57a3b8['replies'][0x0]);return{..._0xd1c571,'children':_0x57a3b8[_0x5b5fe7(0x1af)]['slice'](0x1)['map'](_0x19ef5e=>_0x3a7903(_0x19ef5e,_0xd1c571['id']))};}return null;}let S=class{constructor(_0x3c76bb,_0x463803,_0x2856d0){const _0x4c7153=_0x3389ee;this['_httpService']=_0x3c76bb,this[_0x4c7153(0x168)]=_0x463803,this['_sessionService']=_0x2856d0;}async[_0x3389ee(0x1a4)](_0x5be2e6){const _0x271e42=_0x3389ee;var _0x22f1d7,_0x5c5ae6;const {parentId:_0x23ac84,unitId:_0x1cfffa,text:_0x387b41,threadId:_0x4970aa}=_0x5be2e6,_0x3d6a72=(_0x5c5ae6=(_0x22f1d7=_0x387b41[_0x271e42(0x170)])==null?void 0x0:_0x22f1d7[_0x271e42(0x19f)](_0xcc8340=>_0xcc8340[_0x271e42(0x155)]===_0x29a17a[_0x271e42(0x17e)])[_0x271e42(0x158)](_0x5764e8=>_0x5764e8[_0x271e42(0x18a)]))!=null?_0x5c5ae6:[],_0x5e6bd7=JSON[_0x271e42(0x154)](_0x387b41),_0x2635d9=(await this[_0x271e42(0x198)]['requireSession'](_0x1cfffa))[_0x271e42(0x19b)]();if(_0x23ac84){const _0x4eaea4={'memberId':_0x2635d9,'unitId':_0x1cfffa,'content':_0x5e6bd7,'mention':_0x3d6a72,'threadId':_0x4970aa},_0x4fedbe=(await this[_0x271e42(0x1b0)][_0x271e42(0x186)](_0x271e42(0x15f)+_0x1cfffa+_0x271e42(0x1ab),{'body':_0x4eaea4}))[_0x271e42(0x191)][_0x271e42(0x1ac)];return{..._0x5be2e6,'id':_0x4fedbe[_0x271e42(0x1a5)],'dT':_0x536171(+_0x4fedbe[_0x271e42(0x196)])[_0x271e42(0x187)](_0x271e42(0x17a)),'personId':_0x4fedbe[_0x271e42(0x16a)]};}else{const _0x3b642c={'memberId':_0x2635d9,'unitId':_0x1cfffa,'content':_0x5e6bd7,'mention':_0x3d6a72},_0x40cc18=await this['_httpService'][_0x271e42(0x186)](_0x271e42(0x15f)+_0x1cfffa+_0x271e42(0x185),{'body':_0x3b642c});return X(_0x40cc18[_0x271e42(0x191)]['comment'],_0x5be2e6);}}async[_0x3389ee(0x15e)](_0x34ac78){const _0x41a0ee=_0x3389ee;var _0x2849f7,_0xf28cef;const {text:_0x3df360,unitId:_0x5dfaa0}=_0x34ac78,_0x198710=(_0xf28cef=(_0x2849f7=_0x3df360[_0x41a0ee(0x170)])==null?void 0x0:_0x2849f7[_0x41a0ee(0x19f)](_0x3a573c=>_0x3a573c[_0x41a0ee(0x155)]===_0x29a17a[_0x41a0ee(0x17e)])['map'](_0x5a9b0e=>_0x5a9b0e[_0x41a0ee(0x18a)]))!=null?_0xf28cef:[],_0x5c3cf5=JSON[_0x41a0ee(0x154)](_0x3df360),_0x4ac989=_0x34ac78[_0x41a0ee(0x180)],_0x2d4c79=_0x34ac78['id'],_0x4e5db6={'memberId':(await this['_sessionService']['requireSession'](_0x5dfaa0))[_0x41a0ee(0x19b)](),'unitId':_0x5dfaa0,'threadId':_0x4ac989,'mention':_0x198710,'content':_0x5c3cf5,'replyId':_0x2d4c79},_0x26d990=await this['_httpService'][_0x41a0ee(0x186)]('/universer-api/comment/unit/'+_0x5dfaa0+'/edit',{'body':_0x4e5db6});return!_0x26d990[_0x41a0ee(0x191)][_0x41a0ee(0x175)]||_0x26d990['body']['error'][_0x41a0ee(0x193)]===0x1;}async['resolveComment'](_0x11c828){const _0x46e8ea=_0x3389ee,{unitId:_0x3d88f4}=_0x11c828,_0x5d65a4=_0x11c828[_0x46e8ea(0x180)],_0x30b199={'memberId':this[_0x46e8ea(0x168)][_0x46e8ea(0x18f)]()[_0x46e8ea(0x14d)],'unitId':_0x3d88f4,'threadId':_0x5d65a4,'solved':_0x11c828[_0x46e8ea(0x190)]?I[_0x46e8ea(0x171)]:I[_0x46e8ea(0x182)]},_0x4db9b3=await this[_0x46e8ea(0x1b0)]['post'](_0x46e8ea(0x15f)+_0x3d88f4+_0x46e8ea(0x148),{'body':_0x30b199});return!_0x4db9b3['body'][_0x46e8ea(0x175)]||_0x4db9b3['body'][_0x46e8ea(0x175)][_0x46e8ea(0x193)]===0x1;}async[_0x3389ee(0x1a7)](_0x398a30,_0x5e32bb,_0xfcb79b,_0x6541c2){const _0x2ff071=_0x3389ee,_0x20da1f={'memberId':(await this['_sessionService']['requireSession'](_0x398a30))['getMemberID'](),'threadId':_0xfcb79b,'replyId':_0x6541c2,'unitId':_0x398a30},_0x3cdfea=await this[_0x2ff071(0x1b0)][_0x2ff071(0x186)](_0x2ff071(0x15f)+_0x398a30+'/delete',{'body':_0x20da1f});return!_0x3cdfea[_0x2ff071(0x191)]['error']||_0x3cdfea[_0x2ff071(0x191)][_0x2ff071(0x175)][_0x2ff071(0x193)]===0x1;}async['listComments'](_0x53243d,_0x2994b1,_0x477b7e){const _0x3652ff=_0x3389ee,_0x3b951d={'unitId':_0x53243d,'threadId':_0x477b7e},_0x4db5aa=await this[_0x3652ff(0x1b0)]['post'](_0x3652ff(0x15f)+_0x53243d+_0x3652ff(0x150),{'body':_0x3b951d}),_0x427c5c=_0x477b7e[_0x3652ff(0x158)](_0x3e3e73=>ee(_0x4db5aa[_0x3652ff(0x191)][_0x3652ff(0x16b)][_0x3e3e73],_0x53243d,_0x2994b1))[_0x3652ff(0x19f)](Boolean);return Object[_0x3652ff(0x166)](_0x4db5aa[_0x3652ff(0x191)][_0x3652ff(0x172)])[_0x3652ff(0x157)](_0x1d391e=>{const _0x449514=_0x3652ff;this[_0x449514(0x168)][_0x449514(0x176)](_0x1d391e);}),_0x427c5c;}[_0x3389ee(0x19c)](_0x13100c){const _0x4c16d8=_0x3389ee;return{'id':_0x13100c['id'],'threadId':_0x13100c['threadId'],'ref':_0x13100c[_0x4c16d8(0x161)]};}};S=Q([b(0x0,_0x37a0af(_0x523c25)),b(0x1,_0x37a0af(_0x263cf9)),b(0x2,_0x37a0af(_0x28a0e2))],S);function _0x2ec0(_0x4eca6f,_0x35a271){const _0x29b7fa=_0x29b7();return _0x2ec0=function(_0x2ec04a,_0x68d996){_0x2ec04a=_0x2ec04a-0x148;let _0x3700d0=_0x29b7fa[_0x2ec04a];return _0x3700d0;},_0x2ec0(_0x4eca6f,_0x35a271);}var re=Object[_0x3389ee(0x1ad)],te=(_0x3914fc,_0x562fb2,_0xa4887c,_0x1ae63c)=>{const _0x547442=_0x3389ee;for(var _0x57bb16=_0x1ae63c>0x1?void 0x0:_0x1ae63c?re(_0x562fb2,_0xa4887c):_0x562fb2,_0x116da8=_0x3914fc[_0x547442(0x189)]-0x1,_0x2bb25c;_0x116da8>=0x0;_0x116da8--)(_0x2bb25c=_0x3914fc[_0x116da8])&&(_0x57bb16=_0x2bb25c(_0x57bb16)||_0x57bb16);return _0x57bb16;},M=(_0x5e0ffb,_0x939cd7)=>(_0x471d0c,_0x2776f4)=>_0x939cd7(_0x471d0c,_0x2776f4,_0x5e0ffb);let f=class extends _0x422b10{constructor(_0x2ce5ed,_0x431672){const _0x244701=_0x3389ee;super(),this[_0x244701(0x152)]=_0x2ce5ed,this[_0x244701(0x1a9)]=_0x431672,this[_0x244701(0x194)]();}[_0x3389ee(0x194)](){const _0x24e49f=_0x3389ee;this[_0x24e49f(0x152)][_0x24e49f(0x174)]=this[_0x24e49f(0x1a9)],this['_threadCommentDataSourceService'][_0x24e49f(0x14b)]=!0x1;}};f=te([M(0x0,_0x35f50a),M(0x1,_0x37a0af(S))],f);var se=Object[_0x3389ee(0x14c)],oe=Object[_0x3389ee(0x1ad)],ne=(_0x246403,_0x4bd446,_0x5cd9e3)=>_0x4bd446 in _0x246403?se(_0x246403,_0x4bd446,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5cd9e3}):_0x246403[_0x4bd446]=_0x5cd9e3,ie=(_0x5b8141,_0x385d20,_0x510017,_0x12d7af)=>{const _0x5087f9=_0x3389ee;for(var _0x5c9b43=_0x12d7af>0x1?void 0x0:_0x12d7af?oe(_0x385d20,_0x510017):_0x385d20,_0x47d758=_0x5b8141[_0x5087f9(0x189)]-0x1,_0x531e9a;_0x47d758>=0x0;_0x47d758--)(_0x531e9a=_0x5b8141[_0x47d758])&&(_0x5c9b43=_0x531e9a(_0x5c9b43)||_0x5c9b43);return _0x5c9b43;},N=(_0x331a09,_0x4f7a08)=>(_0x5d8fa9,_0x2e8b66)=>_0x4f7a08(_0x5d8fa9,_0x2e8b66,_0x331a09),$=(_0xb9e446,_0x3431a1,_0x4d6172)=>ne(_0xb9e446,typeof _0x3431a1!=_0x3389ee(0x19e)?_0x3431a1+'':_0x3431a1,_0x4d6172);let g=class extends _0x1678df{constructor(_0x3b7c1c=O,_0x839da3,_0x77679e){const _0x68ff23=_0x3389ee;super(),this[_0x68ff23(0x18e)]=_0x3b7c1c,this['_injector']=_0x839da3,this['_configService']=_0x77679e;const {..._0x14abdc}=_0x3184fc({},O,this[_0x68ff23(0x18e)]);this[_0x68ff23(0x18c)][_0x68ff23(0x164)](z,_0x14abdc);}[_0x3389ee(0x1a1)](){const _0x4488fe=_0x3389ee;[[S],[f],[_]][_0x4488fe(0x157)](_0x35fe68=>{const _0x441bf5=_0x4488fe;this[_0x441bf5(0x177)][_0x441bf5(0x15a)](_0x35fe68);});}[_0x3389ee(0x149)](){const _0x1b5834=_0x3389ee;this[_0x1b5834(0x177)][_0x1b5834(0x192)](f),this[_0x1b5834(0x177)][_0x1b5834(0x192)](_);}};$(g,_0x3389ee(0x14e),W),$(g,_0x3389ee(0x19d),_0x19b055[_0x3389ee(0x197)]),g=ie([_0x37e8aa(_0x6aa952,_0x4df037,_0x5d0ee8),N(0x1,_0x37a0af(_0x35741c)),N(0x2,_0x3f04d9)],g);function _0x29b7(){const _0x1375d9=['getMemberID','saveCommentToSnapshot','type','symbol','filter','root','onStarting','parse','_threadCommentModel','addComment','replyId','_commentService','deleteComment','size','_threadCommentDataSource','Reply','/reply','reply','getOwnPropertyDescriptor','getUnit','replies','_httpService','/solved','onReady','_initUserSync','syncUpdateMutationToColla','defineProperty','userID','pluginName','subscribe','/list','UNRECOGNIZED','_threadCommentDataSourceService','1867628pLAXgY','stringify','rangeType','resolveComment','forEach','map','Solve','add','unitId','Delete','1288fKbpWg','updateComment','/universer-api/comment/unit/','user','ref','2540388naIGfC','1567293IjnYlx','setConfig','getComment','values','/universer-api/user/list','_userService','thread-comment-data-source.config','userId','comments','pipe','Unknown','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','Solved','users','_init','dataSource','error','addUser','_injector','payload','6DmikqU','YYYY/MM/DD\x20HH:mm','20095749RHKBxh','179542yVINXa','disposeWithMe','COMMENT','Edit','threadId','133250TKNHyY','OpenOrReOpen','content','find','/add','post','format','Add','length','rangeId','personId','_configService','delete','_config','getCurrentUser','resolved','body','get','code','_initDataSource','solved','createTimestamp','UNIVER_UNKNOWN','_sessionService','commentUpdate$','4676aDitIH'];_0x29b7=function(){return _0x1375d9;};return _0x29b7();}export{g as UniverThreadCommentDataSourcePlugin};
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x1c97(){const _0x10518a=['IThreadCommentDataSourceService','Delete','@univerjs/thread-comment','disposeWithMe','COMMENT','rxjs','_userService','_threadCommentDataSourceService','getUser','toStringTag','CollaborationSessionService','payload','length','createTimestamp','subscribe','add','rangeType','Solved','_injector','function','/universer-api/user/list','thread-comment-data-source.config','replies','YYYY/MM/DD\x20HH:mm','4939613DsUoVT','commentUpdate$','reply','slice','_configService','exports','UniverThreadCommentUIPlugin','map','Add','type','customRanges','size','getOwnPropertyDescriptor','filter','UniverNetwork','replyId','setConfig','onStarting','@univerjs-pro/collaboration-client','_threadCommentDataSource','_threadCommentModel','Disposable','resolved','requireSession','@univerjs/thread-comment-ui','pipe','find','object','parse','CommentService','/edit','stringify','Solve','1683sofGKa','UniverThreadCommentUi','/universer-api/comment/unit/','_commentService','OpenOrReOpen','_init','_initDataSource','dataSource','Edit','getCurrentUser','addUser','updateComment','get','error','code','_config','Module','post','Reply','saveCommentToSnapshot','73955ytZKPK','format','UserManagerService','delete','HTTPService','1013224HNnTEc','syncUpdateMutationToColla','threadId','user','userID','UniverProLicense','ref','UNIVER_UNKNOWN','@univerjs-pro/license','Unknown','values','deleteComment','UniverProThreadCommentDatasource','solved','rangeId','addComment','Inject','_httpService','_sessionService','body','symbol','onReady','DependentOn','_initUserSync','IConfigService','users','UniverThreadCommentDataSourcePlugin','1024119KaTZab','dayjs','resolveComment','defineProperty','104CYJQXC','UNRECOGNIZED','forEach','/solved','content','/add','UniverCollaborationClientPlugin','3704lsIktz','@univerjs/core','userId','24562400bFjhjL','pluginName','/reply','getMemberID','UniverProCollaborationClient','1BODdKr','personId','/delete','amd','201504cObhrz','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','listComments'];_0x1c97=function(){return _0x10518a;};return _0x1c97();}function _0x3d17(_0x4680af,_0xc88f40){const _0x1c97af=_0x1c97();return _0x3d17=function(_0x3d1744,_0x2de8d3){_0x3d1744=_0x3d1744-0x1d2;let _0x45b4b0=_0x1c97af[_0x3d1744];return _0x45b4b0;},_0x3d17(_0x4680af,_0xc88f40);}(function(_0x5ec5ea,_0x5c6187){const _0xc57454=_0x3d17,_0x19f76e=_0x5ec5ea();while(!![]){try{const _0x5d9f67=parseInt(_0xc57454(0x215))/0x1*(-parseInt(_0xc57454(0x1e7))/0x2)+-parseInt(_0xc57454(0x202))/0x3+parseInt(_0xc57454(0x206))/0x4*(-parseInt(_0xc57454(0x1e2))/0x5)+-parseInt(_0xc57454(0x219))/0x6+-parseInt(_0xc57454(0x236))/0x7+parseInt(_0xc57454(0x20d))/0x8*(-parseInt(_0xc57454(0x257))/0x9)+parseInt(_0xc57454(0x210))/0xa;if(_0x5d9f67===_0x5c6187)break;else _0x19f76e['push'](_0x19f76e['shift']());}catch(_0x5f02f4){_0x19f76e['push'](_0x19f76e['shift']());}}}(_0x1c97,0x61229),function(_0x2575bc,_0x1ce5ed){const _0x499016=_0x3d17;typeof exports==_0x499016(0x251)&&typeof module<'u'?_0x1ce5ed(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==_0x499016(0x231)&&define[_0x499016(0x218)]?define([_0x499016(0x23b),_0x499016(0x248),_0x499016(0x1ef),_0x499016(0x20e),_0x499016(0x24e),_0x499016(0x220),_0x499016(0x223),'@univerjs/network'],_0x1ce5ed):(_0x2575bc=typeof globalThis<'u'?globalThis:_0x2575bc||self,_0x1ce5ed(_0x2575bc[_0x499016(0x1f3)]={},_0x2575bc[_0x499016(0x214)],_0x2575bc[_0x499016(0x1ec)],_0x2575bc['UniverCore'],_0x2575bc[_0x499016(0x258)],_0x2575bc['UniverThreadComment'],_0x2575bc[_0x499016(0x223)],_0x2575bc[_0x499016(0x244)]));}(this,function(_0xd744f6,_0x3be277,_0x24e1bb,_0x14156a,_0x28798b,_0x9217ca,_0x52b944,_0x12195e){'use strict';const _0x4b6f5f=_0x3d17;const _0x2e5626=_0x4b6f5f(0x21b);var _0x2db4ab=(_0x43d8a8=>(_0x43d8a8[_0x43d8a8[_0x4b6f5f(0x1d2)]=0x0]='OpenOrReOpen',_0x43d8a8[_0x43d8a8['Solved']=0x1]=_0x4b6f5f(0x22f),_0x43d8a8[_0x43d8a8['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x43d8a8))(_0x2db4ab||{}),_0x5ea982=(_0x4465b4=>(_0x4465b4[_0x4465b4[_0x4b6f5f(0x1f0)]=0x0]='Unknown',_0x4465b4[_0x4465b4[_0x4b6f5f(0x23e)]=0x1]=_0x4b6f5f(0x23e),_0x4465b4[_0x4465b4[_0x4b6f5f(0x1e0)]=0x2]='Reply',_0x4465b4[_0x4465b4[_0x4b6f5f(0x1d6)]=0x3]=_0x4b6f5f(0x1d6),_0x4465b4[_0x4465b4[_0x4b6f5f(0x21f)]=0x4]=_0x4b6f5f(0x21f),_0x4465b4[_0x4465b4[_0x4b6f5f(0x256)]=0x5]='Solve',_0x4465b4[_0x4465b4['UNRECOGNIZED']=-0x1]=_0x4b6f5f(0x207),_0x4465b4))(_0x5ea982||{});const _0x5c8641=_0x4425d8=>_0x14156a[_0x4b6f5f(0x203)](new Date(+_0x4425d8))[_0x4b6f5f(0x1e3)]('YYYY/MM/DD\x20HH:mm'),_0x253ecb=async(_0x281b8d,_0x25ee6f)=>{const _0x2d7159=_0x4b6f5f,_0x1700a7=_0x281b8d[_0x2d7159(0x1da)](_0x14156a[_0x2d7159(0x1e4)]),_0x22cd3c=_0x281b8d[_0x2d7159(0x1da)](_0x12195e[_0x2d7159(0x1e6)]);_0x25ee6f['forEach'](_0x1197ca=>{const _0x170200=_0x2d7159;_0x1700a7[_0x170200(0x226)](_0x1197ca)&&_0x25ee6f[_0x170200(0x1e5)](_0x1197ca);}),_0x25ee6f[_0x2d7159(0x241)]&&(await _0x22cd3c[_0x2d7159(0x1da)](_0x2d7159(0x232),{'params':{'userIDs':[..._0x25ee6f]}}))['body'][_0x2d7159(0x200)]['forEach'](_0x5c177a=>{const _0x2869de=_0x2d7159;_0x5c177a&&_0x1700a7[_0x2869de(0x1d8)](_0x5c177a);});};var _0x1544b4=Object[_0x4b6f5f(0x242)],_0x5ac6ad=(_0x322401,_0x45fb75,_0x4e726d,_0x1bb5cd)=>{const _0x446e37=_0x4b6f5f;for(var _0x324c31=_0x1bb5cd>0x1?void 0x0:_0x1bb5cd?_0x1544b4(_0x45fb75,_0x4e726d):_0x45fb75,_0x48c773=_0x322401[_0x446e37(0x22a)]-0x1,_0x3debe2;_0x48c773>=0x0;_0x48c773--)(_0x3debe2=_0x322401[_0x48c773])&&(_0x324c31=_0x3debe2(_0x324c31)||_0x324c31);return _0x324c31;},_0x3fcc5c=(_0x23c7fe,_0x2ce160)=>(_0x3b0bc0,_0x5eb7e2)=>_0x2ce160(_0x3b0bc0,_0x5eb7e2,_0x23c7fe);let _0x16746b=class extends _0x14156a['Disposable']{constructor(_0x291cc4,_0x227d48,_0x5ad6be,_0x5cd5b3){const _0x5594fa=_0x4b6f5f;super(),this[_0x5594fa(0x25a)]=_0x291cc4,this[_0x5594fa(0x24a)]=_0x227d48,this[_0x5594fa(0x224)]=_0x5ad6be,this[_0x5594fa(0x230)]=_0x5cd5b3,this[_0x5594fa(0x1d3)](),this[_0x5594fa(0x1fe)]();}[_0x4b6f5f(0x1fe)](){const _0x419280=_0x4b6f5f;this[_0x419280(0x221)](this[_0x419280(0x24a)][_0x419280(0x237)][_0x419280(0x24f)](_0x52b944['bufferTime'](0x10))['subscribe'](_0x2321dc=>{const _0x3a3ec9=_0x419280,_0x2436dc=new Set();_0x2321dc['forEach'](_0x2d30f5=>{const _0x2a56d9=_0x3d17;switch(_0x2d30f5[_0x2a56d9(0x23f)]){case _0x2a56d9(0x22d):{const _0x364ac4=_0x2d30f5[_0x2a56d9(0x229)][_0x2a56d9(0x216)];_0x2436dc['add'](_0x364ac4);break;}}}),_0x253ecb(this[_0x3a3ec9(0x230)],_0x2436dc);}));}[_0x4b6f5f(0x1d3)](){const _0x1cb17c=_0x4b6f5f;this[_0x1cb17c(0x221)](this[_0x1cb17c(0x25a)][_0x1cb17c(0x237)][_0x1cb17c(0x22c)](async _0x142e1a=>{const _0x3a7fc6=_0x1cb17c;var _0x594aff,_0x12f84b,_0x548a37,_0x1573f2;const _0x5dc458=(_0x594aff=this['_threadCommentModel']['getUnit'](_0x142e1a['unitId'])[_0x3a7fc6(0x250)](_0x34226=>_0x34226[_0x3a7fc6(0x1e9)]===_0x142e1a[_0x3a7fc6(0x1e9)]))==null?void 0x0:_0x594aff[_0x3a7fc6(0x21c)];if(!_0x5dc458)return;const {unitId:_0x535f9e,subUnitId:_0x39a21a}=_0x5dc458;switch(_0x142e1a[_0x3a7fc6(0x1ea)]&&this[_0x3a7fc6(0x224)][_0x3a7fc6(0x1d8)](_0x142e1a[_0x3a7fc6(0x1ea)]),_0x142e1a['type']){case _0x5ea982[_0x3a7fc6(0x23e)]:break;case _0x5ea982[_0x3a7fc6(0x1e0)]:{this['_threadCommentModel'][_0x3a7fc6(0x1f6)](_0x535f9e,_0x39a21a,{'unitId':_0x535f9e,'subUnitId':_0x39a21a,'ref':'','id':_0x142e1a[_0x3a7fc6(0x245)],'dT':_0x5c8641(+_0x142e1a[_0x3a7fc6(0x22b)]),'threadId':_0x142e1a['threadId'],'personId':(_0x548a37=(_0x12f84b=_0x142e1a[_0x3a7fc6(0x1ea)])==null?void 0x0:_0x12f84b[_0x3a7fc6(0x1eb)])!=null?_0x548a37:_0x142e1a['userId'],'text':JSON[_0x3a7fc6(0x252)](_0x142e1a[_0x3a7fc6(0x20a)]),'parentId':_0x5dc458['id']});break;}case _0x5ea982[_0x3a7fc6(0x21f)]:{const _0x5d69f3=this['_threadCommentModel']['getComment'](_0x535f9e,_0x39a21a,_0x142e1a[_0x3a7fc6(0x245)]);_0x5d69f3&&_0x5d69f3['parentId']&&this[_0x3a7fc6(0x24a)][_0x3a7fc6(0x1f2)](_0x535f9e,_0x39a21a,_0x142e1a['replyId']);break;}case _0x5ea982[_0x3a7fc6(0x1d6)]:{this[_0x3a7fc6(0x24a)][_0x3a7fc6(0x1d9)](_0x535f9e,_0x39a21a,{'commentId':_0x142e1a['replyId'],'text':JSON[_0x3a7fc6(0x252)](_0x142e1a[_0x3a7fc6(0x20a)])});break;}case _0x5ea982['Solve']:{const _0x6d670a=(_0x1573f2=this[_0x3a7fc6(0x24a)]['getUnit'](_0x142e1a['unitId'])['find'](_0xf71333=>_0xf71333[_0x3a7fc6(0x1e9)]===_0x142e1a[_0x3a7fc6(0x1e9)]))==null?void 0x0:_0x1573f2[_0x3a7fc6(0x21c)];_0x6d670a&&this['_threadCommentModel'][_0x3a7fc6(0x204)](_0x535f9e,_0x39a21a,_0x6d670a['id'],_0x142e1a[_0x3a7fc6(0x1f4)]===_0x2db4ab[_0x3a7fc6(0x22f)]);break;}}}));}};_0x16746b=_0x5ac6ad([_0x3fcc5c(0x0,_0x14156a[_0x4b6f5f(0x1f7)](_0x3be277[_0x4b6f5f(0x253)])),_0x3fcc5c(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x9217ca['ThreadCommentModel'])),_0x3fcc5c(0x2,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a[_0x4b6f5f(0x1e4)])),_0x3fcc5c(0x3,_0x14156a['Inject'](_0x14156a['Injector']))],_0x16746b);const _0x3dd47d=_0x4b6f5f(0x233),_0x1b2a9c={};var _0x3f5512=Object['getOwnPropertyDescriptor'],_0x17b74c=(_0x5ee88d,_0x51295f,_0x16b30d,_0xa9bc42)=>{for(var _0x59cad7=_0xa9bc42>0x1?void 0x0:_0xa9bc42?_0x3f5512(_0x51295f,_0x16b30d):_0x51295f,_0xf564d9=_0x5ee88d['length']-0x1,_0x14af0f;_0xf564d9>=0x0;_0xf564d9--)(_0x14af0f=_0x5ee88d[_0xf564d9])&&(_0x59cad7=_0x14af0f(_0x59cad7)||_0x59cad7);return _0x59cad7;},_0xc9af10=(_0x464188,_0x1463fc)=>(_0x10071c,_0x41fdd9)=>_0x1463fc(_0x10071c,_0x41fdd9,_0x464188);function _0x260188(_0x2aeb7a,_0x3b1627){const _0x1c589b=_0x4b6f5f,_0xdbd2aa=_0x2aeb7a['replies'][0x0];return{..._0x3b1627,'id':_0xdbd2aa['replyId'],'resolved':_0x2aeb7a[_0x1c589b(0x1f4)]===0x1,'dT':_0x5c8641(_0xdbd2aa[_0x1c589b(0x22b)]),'personId':_0xdbd2aa[_0x1c589b(0x20f)],'threadId':_0xdbd2aa[_0x1c589b(0x1e9)]};}function _0x57f91c(_0xea106a,_0x32f874,_0x49433d){const _0x30d3de=_0x4b6f5f;var _0x505041,_0x20fd6c;if(((_0x20fd6c=(_0x505041=_0xea106a==null?void 0x0:_0xea106a['replies'])==null?void 0x0:_0x505041[_0x30d3de(0x22a)])!=null?_0x20fd6c:0x0)>0x0){const _0x58fd08=(_0x4830c0,_0x39e1b5)=>({'id':_0x4830c0[_0x30d3de(0x245)],'threadId':_0x4830c0[_0x30d3de(0x1e9)],'dT':_0x5c8641(_0x4830c0[_0x30d3de(0x22b)]),'personId':_0x4830c0['userId'],'resolved':_0xea106a['solved']===_0x2db4ab[_0x30d3de(0x22f)],'unitId':_0x32f874,'subUnitId':_0x49433d,'text':JSON['parse'](_0x4830c0[_0x30d3de(0x20a)]),'parentId':_0x39e1b5}),_0x6c4bd1=_0x58fd08(_0xea106a[_0x30d3de(0x234)][0x0]);return{..._0x6c4bd1,'children':_0xea106a[_0x30d3de(0x234)][_0x30d3de(0x239)](0x1)[_0x30d3de(0x23d)](_0x196f28=>_0x58fd08(_0x196f28,_0x6c4bd1['id']))};}return null;}let _0x2da3ad=class{constructor(_0x2ee665,_0x335029,_0x33e095){const _0x1e7673=_0x4b6f5f;this[_0x1e7673(0x1f8)]=_0x2ee665,this[_0x1e7673(0x224)]=_0x335029,this[_0x1e7673(0x1f9)]=_0x33e095;}async[_0x4b6f5f(0x1f6)](_0x4927ee){const _0x5d2234=_0x4b6f5f;var _0x1ad7c3,_0x3b75c5;const {parentId:_0x4218af,unitId:_0x5bf92f,text:_0x2258c0,threadId:_0x157741}=_0x4927ee,_0x4576b9=(_0x3b75c5=(_0x1ad7c3=_0x2258c0['customRanges'])==null?void 0x0:_0x1ad7c3[_0x5d2234(0x243)](_0x468f8d=>_0x468f8d[_0x5d2234(0x22e)]===_0x14156a['CustomRangeType'][_0x5d2234(0x222)])[_0x5d2234(0x23d)](_0x35ffa2=>_0x35ffa2[_0x5d2234(0x1f5)]))!=null?_0x3b75c5:[],_0x533b8a=JSON[_0x5d2234(0x255)](_0x2258c0),_0x29b3a8=(await this[_0x5d2234(0x1f9)]['requireSession'](_0x5bf92f))[_0x5d2234(0x213)]();if(_0x4218af){const _0x4c2fe6={'memberId':_0x29b3a8,'unitId':_0x5bf92f,'content':_0x533b8a,'mention':_0x4576b9,'threadId':_0x157741},_0xbe3567=(await this['_httpService']['post'](_0x5d2234(0x259)+_0x5bf92f+_0x5d2234(0x212),{'body':_0x4c2fe6}))[_0x5d2234(0x1fa)][_0x5d2234(0x238)];return{..._0x4927ee,'id':_0xbe3567[_0x5d2234(0x245)],'dT':_0x14156a['dayjs'](+_0xbe3567[_0x5d2234(0x22b)])[_0x5d2234(0x1e3)](_0x5d2234(0x235)),'personId':_0xbe3567[_0x5d2234(0x20f)]};}else{const _0x4bc083={'memberId':_0x29b3a8,'unitId':_0x5bf92f,'content':_0x533b8a,'mention':_0x4576b9},_0x2b7413=await this[_0x5d2234(0x1f8)][_0x5d2234(0x1df)](_0x5d2234(0x259)+_0x5bf92f+_0x5d2234(0x20b),{'body':_0x4bc083});return _0x260188(_0x2b7413[_0x5d2234(0x1fa)]['comment'],_0x4927ee);}}async[_0x4b6f5f(0x1d9)](_0x3c870c){const _0x26c01a=_0x4b6f5f;var _0x39ef5b,_0x2c7560;const {text:_0x3459c5,unitId:_0x1c8cb7}=_0x3c870c,_0x191e2d=(_0x2c7560=(_0x39ef5b=_0x3459c5[_0x26c01a(0x240)])==null?void 0x0:_0x39ef5b[_0x26c01a(0x243)](_0x5bc0f7=>_0x5bc0f7[_0x26c01a(0x22e)]===_0x14156a['CustomRangeType'][_0x26c01a(0x222)])[_0x26c01a(0x23d)](_0x130b0e=>_0x130b0e[_0x26c01a(0x1f5)]))!=null?_0x2c7560:[],_0x446b8b=JSON[_0x26c01a(0x255)](_0x3459c5),_0x18af25=_0x3c870c[_0x26c01a(0x1e9)],_0x3b2089=_0x3c870c['id'],_0x29a2c0={'memberId':(await this[_0x26c01a(0x1f9)][_0x26c01a(0x24d)](_0x1c8cb7))[_0x26c01a(0x213)](),'unitId':_0x1c8cb7,'threadId':_0x18af25,'mention':_0x191e2d,'content':_0x446b8b,'replyId':_0x3b2089},_0x220bbd=await this[_0x26c01a(0x1f8)]['post']('/universer-api/comment/unit/'+_0x1c8cb7+_0x26c01a(0x254),{'body':_0x29a2c0});return!_0x220bbd['body']['error']||_0x220bbd[_0x26c01a(0x1fa)]['error'][_0x26c01a(0x1dc)]===0x1;}async[_0x4b6f5f(0x204)](_0x511599){const _0x27d994=_0x4b6f5f,{unitId:_0x159ef2}=_0x511599,_0x385fde=_0x511599['threadId'],_0x10edcb={'memberId':this[_0x27d994(0x224)][_0x27d994(0x1d7)]()[_0x27d994(0x1eb)],'unitId':_0x159ef2,'threadId':_0x385fde,'solved':_0x511599[_0x27d994(0x24c)]?_0x2db4ab[_0x27d994(0x22f)]:_0x2db4ab[_0x27d994(0x1d2)]},_0x572a79=await this[_0x27d994(0x1f8)][_0x27d994(0x1df)](_0x27d994(0x259)+_0x159ef2+_0x27d994(0x209),{'body':_0x10edcb});return!_0x572a79['body'][_0x27d994(0x1db)]||_0x572a79[_0x27d994(0x1fa)]['error'][_0x27d994(0x1dc)]===0x1;}async['deleteComment'](_0x2dd25c,_0x57c1ea,_0x3bc636,_0x4883f4){const _0x5ca719=_0x4b6f5f,_0x1c3525={'memberId':(await this[_0x5ca719(0x1f9)]['requireSession'](_0x2dd25c))[_0x5ca719(0x213)](),'threadId':_0x3bc636,'replyId':_0x4883f4,'unitId':_0x2dd25c},_0x2cf57c=await this[_0x5ca719(0x1f8)]['post'](_0x5ca719(0x259)+_0x2dd25c+_0x5ca719(0x217),{'body':_0x1c3525});return!_0x2cf57c[_0x5ca719(0x1fa)]['error']||_0x2cf57c[_0x5ca719(0x1fa)][_0x5ca719(0x1db)][_0x5ca719(0x1dc)]===0x1;}async[_0x4b6f5f(0x21d)](_0x44ad56,_0x1728fc,_0x5a2d4f){const _0x200795=_0x4b6f5f,_0x37ec49={'unitId':_0x44ad56,'threadId':_0x5a2d4f},_0x91ef69=await this[_0x200795(0x1f8)]['post'](_0x200795(0x259)+_0x44ad56+'/list',{'body':_0x37ec49}),_0x2f7a94=_0x5a2d4f[_0x200795(0x23d)](_0x6331d1=>_0x57f91c(_0x91ef69['body'][_0x200795(0x21a)][_0x6331d1],_0x44ad56,_0x1728fc))['filter'](Boolean);return Object[_0x200795(0x1f1)](_0x91ef69[_0x200795(0x1fa)]['users'])['forEach'](_0x18e258=>{const _0x3ca2bf=_0x200795;this['_userService'][_0x3ca2bf(0x1d8)](_0x18e258);}),_0x2f7a94;}[_0x4b6f5f(0x1e1)](_0x59ed07){const _0x31be26=_0x4b6f5f;return{'id':_0x59ed07['id'],'threadId':_0x59ed07['threadId'],'ref':_0x59ed07[_0x31be26(0x1ed)]};}};_0x2da3ad=_0x17b74c([_0xc9af10(0x0,_0x14156a[_0x4b6f5f(0x1f7)](_0x12195e[_0x4b6f5f(0x1e6)])),_0xc9af10(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a['UserManagerService'])),_0xc9af10(0x2,_0x14156a[_0x4b6f5f(0x1f7)](_0x3be277[_0x4b6f5f(0x228)]))],_0x2da3ad);var _0x366615=Object[_0x4b6f5f(0x242)],_0x3f6d9f=(_0x52c399,_0x4b7bb8,_0x489cd7,_0x2e5a9a)=>{for(var _0x1e4cd4=_0x2e5a9a>0x1?void 0x0:_0x2e5a9a?_0x366615(_0x4b7bb8,_0x489cd7):_0x4b7bb8,_0x31c724=_0x52c399['length']-0x1,_0x435f7c;_0x31c724>=0x0;_0x31c724--)(_0x435f7c=_0x52c399[_0x31c724])&&(_0x1e4cd4=_0x435f7c(_0x1e4cd4)||_0x1e4cd4);return _0x1e4cd4;},_0x85678b=(_0x56f50d,_0x22ddbd)=>(_0x1be7dc,_0x134079)=>_0x22ddbd(_0x1be7dc,_0x134079,_0x56f50d);let _0x725820=class extends _0x14156a[_0x4b6f5f(0x24b)]{constructor(_0x302250,_0x42d43b){const _0x444bc2=_0x4b6f5f;super(),this[_0x444bc2(0x225)]=_0x302250,this['_threadCommentDataSource']=_0x42d43b,this[_0x444bc2(0x1d4)]();}[_0x4b6f5f(0x1d4)](){const _0x36fe00=_0x4b6f5f;this[_0x36fe00(0x225)][_0x36fe00(0x1d5)]=this[_0x36fe00(0x249)],this[_0x36fe00(0x225)][_0x36fe00(0x1e8)]=!0x1;}};_0x725820=_0x3f6d9f([_0x85678b(0x0,_0x9217ca[_0x4b6f5f(0x21e)]),_0x85678b(0x1,_0x14156a['Inject'](_0x2da3ad))],_0x725820);var _0x2c6919=Object[_0x4b6f5f(0x205)],_0x3416b5=Object[_0x4b6f5f(0x242)],_0x32a1cf=(_0x56f42b,_0x43351f,_0x462b64)=>_0x43351f in _0x56f42b?_0x2c6919(_0x56f42b,_0x43351f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x462b64}):_0x56f42b[_0x43351f]=_0x462b64,_0x2b3e92=(_0x1901b6,_0x1ac601,_0x46cf7b,_0x5ba83c)=>{const _0x236317=_0x4b6f5f;for(var _0x5c6cc0=_0x5ba83c>0x1?void 0x0:_0x5ba83c?_0x3416b5(_0x1ac601,_0x46cf7b):_0x1ac601,_0x2baf7a=_0x1901b6[_0x236317(0x22a)]-0x1,_0x52528a;_0x2baf7a>=0x0;_0x2baf7a--)(_0x52528a=_0x1901b6[_0x2baf7a])&&(_0x5c6cc0=_0x52528a(_0x5c6cc0)||_0x5c6cc0);return _0x5c6cc0;},_0x792674=(_0x9f4900,_0x3364a7)=>(_0x3abde8,_0x2ab6db)=>_0x3364a7(_0x3abde8,_0x2ab6db,_0x9f4900),_0x462b26=(_0x3ebc91,_0x3a6653,_0x35e3f3)=>_0x32a1cf(_0x3ebc91,typeof _0x3a6653!=_0x4b6f5f(0x1fb)?_0x3a6653+'':_0x3a6653,_0x35e3f3);_0xd744f6[_0x4b6f5f(0x201)]=class extends _0x14156a['Plugin']{constructor(_0x256328=_0x1b2a9c,_0x389811,_0x4cdacb){const _0x4bedd8=_0x4b6f5f;super(),this[_0x4bedd8(0x1dd)]=_0x256328,this[_0x4bedd8(0x230)]=_0x389811,this[_0x4bedd8(0x23a)]=_0x4cdacb;const {..._0x47d0ed}=_0x14156a['merge']({},_0x1b2a9c,this[_0x4bedd8(0x1dd)]);this[_0x4bedd8(0x23a)][_0x4bedd8(0x246)](_0x3dd47d,_0x47d0ed);}[_0x4b6f5f(0x247)](){const _0x696018=_0x4b6f5f;[[_0x2da3ad],[_0x725820],[_0x16746b]][_0x696018(0x208)](_0x265974=>{const _0x270c26=_0x696018;this[_0x270c26(0x230)][_0x270c26(0x22d)](_0x265974);});}[_0x4b6f5f(0x1fc)](){const _0x22e107=_0x4b6f5f;this['_injector']['get'](_0x725820),this['_injector'][_0x22e107(0x1da)](_0x16746b);}},_0x462b26(_0xd744f6[_0x4b6f5f(0x201)],_0x4b6f5f(0x211),_0x2e5626),_0x462b26(_0xd744f6['UniverThreadCommentDataSourcePlugin'],_0x4b6f5f(0x23f),_0x14156a['UniverInstanceType'][_0x4b6f5f(0x1ee)]),_0xd744f6[_0x4b6f5f(0x201)]=_0x2b3e92([_0x14156a[_0x4b6f5f(0x1fd)](_0x28798b[_0x4b6f5f(0x23c)],_0x3be277[_0x4b6f5f(0x20c)],_0x24e1bb['UniverLicensePlugin']),_0x792674(0x1,_0x14156a[_0x4b6f5f(0x1f7)](_0x14156a['Injector'])),_0x792674(0x2,_0x14156a[_0x4b6f5f(0x1ff)])],_0xd744f6[_0x4b6f5f(0x201)]),Object['defineProperty'](_0xd744f6,Symbol[_0x4b6f5f(0x227)],{'value':_0x4b6f5f(0x1de)});}));
|
|
1
|
+
(function(_0x1457aa,_0x1d4bdc){const _0x27193e=_0x32e3,_0x1556a0=_0x1457aa();while(!![]){try{const _0x31ca68=-parseInt(_0x27193e(0xcc))/0x1*(parseInt(_0x27193e(0xf9))/0x2)+parseInt(_0x27193e(0xe7))/0x3+-parseInt(_0x27193e(0xd2))/0x4*(-parseInt(_0x27193e(0xe6))/0x5)+parseInt(_0x27193e(0xee))/0x6*(-parseInt(_0x27193e(0x110))/0x7)+parseInt(_0x27193e(0xd5))/0x8+-parseInt(_0x27193e(0x12c))/0x9+-parseInt(_0x27193e(0x121))/0xa*(-parseInt(_0x27193e(0x119))/0xb);if(_0x31ca68===_0x1d4bdc)break;else _0x1556a0['push'](_0x1556a0['shift']());}catch(_0x4a8745){_0x1556a0['push'](_0x1556a0['shift']());}}}(_0x52fc,0xde8f9),function(_0x441851,_0x3281c3){const _0x464c88=_0x32e3;typeof exports==_0x464c88(0xd9)&&typeof module<'u'?_0x3281c3(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==_0x464c88(0x141)&&define['amd']?define(['exports',_0x464c88(0x132),_0x464c88(0xd1),_0x464c88(0xfe),_0x464c88(0xca),_0x464c88(0xc7),_0x464c88(0x13d),'@univerjs/network'],_0x3281c3):(_0x441851=typeof globalThis<'u'?globalThis:_0x441851||self,_0x3281c3(_0x441851[_0x464c88(0xe0)]={},_0x441851[_0x464c88(0x107)],_0x441851['UniverProLicense'],_0x441851[_0x464c88(0x113)],_0x441851['UniverThreadCommentUi'],_0x441851['UniverThreadComment'],_0x441851[_0x464c88(0x13d)],_0x441851['UniverNetwork']));}(this,function(_0x28ecf5,_0xce7260,_0x2c9960,_0x5da8cd,_0x56da18,_0x287040,_0x2cc827,_0x4728f5){'use strict';const _0x5e1f11=_0x32e3;const _0x26048c=_0x5e1f11(0x13c);var _0x22628e=(_0x5ab85e=>(_0x5ab85e[_0x5ab85e[_0x5e1f11(0xe1)]=0x0]=_0x5e1f11(0xe1),_0x5ab85e[_0x5ab85e[_0x5e1f11(0xd6)]=0x1]=_0x5e1f11(0xd6),_0x5ab85e[_0x5ab85e['UNRECOGNIZED']=-0x1]=_0x5e1f11(0xc8),_0x5ab85e))(_0x22628e||{}),_0x81c14d=(_0x2cbf65=>(_0x2cbf65[_0x2cbf65[_0x5e1f11(0xcb)]=0x0]=_0x5e1f11(0xcb),_0x2cbf65[_0x2cbf65[_0x5e1f11(0x134)]=0x1]='Add',_0x2cbf65[_0x2cbf65[_0x5e1f11(0xe3)]=0x2]=_0x5e1f11(0xe3),_0x2cbf65[_0x2cbf65['Edit']=0x3]=_0x5e1f11(0x122),_0x2cbf65[_0x2cbf65[_0x5e1f11(0xef)]=0x4]=_0x5e1f11(0xef),_0x2cbf65[_0x2cbf65[_0x5e1f11(0x135)]=0x5]='Solve',_0x2cbf65[_0x2cbf65[_0x5e1f11(0xc8)]=-0x1]=_0x5e1f11(0xc8),_0x2cbf65))(_0x81c14d||{});const _0x30bb69=_0x466fd5=>_0x5da8cd[_0x5e1f11(0x118)](new Date(+_0x466fd5))[_0x5e1f11(0x145)](_0x5e1f11(0x128)),_0x584e3b=async(_0x11be40,_0x5acb9b)=>{const _0x5ad06f=_0x5e1f11,_0x27e6a1=_0x11be40[_0x5ad06f(0xf7)](_0x5da8cd[_0x5ad06f(0xf0)]),_0x4f37d6=_0x11be40['get'](_0x4728f5['HTTPService']);_0x5acb9b[_0x5ad06f(0x11d)](_0x2c998b=>{const _0x7bb853=_0x5ad06f;_0x27e6a1[_0x7bb853(0x137)](_0x2c998b)&&_0x5acb9b[_0x7bb853(0x147)](_0x2c998b);}),_0x5acb9b[_0x5ad06f(0x10e)]&&(await _0x4f37d6[_0x5ad06f(0xf7)](_0x5ad06f(0x103),{'params':{'userIDs':[..._0x5acb9b]}}))[_0x5ad06f(0xe5)][_0x5ad06f(0x120)][_0x5ad06f(0x11d)](_0xbfa2d1=>{const _0x34d024=_0x5ad06f;_0xbfa2d1&&_0x27e6a1[_0x34d024(0x109)](_0xbfa2d1);});};var _0x2f50de=Object[_0x5e1f11(0xf8)],_0x56f40c=(_0x34a6f2,_0x36ec7d,_0x1d3e4,_0x5e233a)=>{for(var _0x33058e=_0x5e233a>0x1?void 0x0:_0x5e233a?_0x2f50de(_0x36ec7d,_0x1d3e4):_0x36ec7d,_0x58d428=_0x34a6f2['length']-0x1,_0x53f025;_0x58d428>=0x0;_0x58d428--)(_0x53f025=_0x34a6f2[_0x58d428])&&(_0x33058e=_0x53f025(_0x33058e)||_0x33058e);return _0x33058e;},_0x2df764=(_0x409a4a,_0x101a22)=>(_0x1ccdcf,_0x2c11f3)=>_0x101a22(_0x1ccdcf,_0x2c11f3,_0x409a4a);let _0x320483=class extends _0x5da8cd['Disposable']{constructor(_0x267f61,_0x5ea142,_0x2b3c18,_0x3a6218){const _0x18702f=_0x5e1f11;super(),this['_commentService']=_0x267f61,this[_0x18702f(0xdc)]=_0x5ea142,this[_0x18702f(0x116)]=_0x2b3c18,this[_0x18702f(0x114)]=_0x3a6218,this[_0x18702f(0x13e)](),this[_0x18702f(0x126)]();}[_0x5e1f11(0x126)](){const _0x398b3b=_0x5e1f11;this[_0x398b3b(0x143)](this[_0x398b3b(0xdc)]['commentUpdate$']['pipe'](_0x2cc827['bufferTime'](0x10))[_0x398b3b(0xda)](_0x1df18a=>{const _0x226b02=_0x398b3b,_0x1b960c=new Set();_0x1df18a[_0x226b02(0x11d)](_0x432afd=>{const _0x28cada=_0x226b02;switch(_0x432afd[_0x28cada(0xe9)]){case _0x28cada(0x133):{const _0x2111ae=_0x432afd[_0x28cada(0xf4)][_0x28cada(0xed)];_0x1b960c[_0x28cada(0x133)](_0x2111ae);break;}}}),_0x584e3b(this[_0x226b02(0x114)],_0x1b960c);}));}[_0x5e1f11(0x13e)](){const _0x1cc72c=_0x5e1f11;this[_0x1cc72c(0x143)](this[_0x1cc72c(0xe8)][_0x1cc72c(0x10a)][_0x1cc72c(0xda)](async _0xaf8e07=>{const _0x6ea127=_0x1cc72c;var _0x4ca7f8,_0x1b4c51,_0x3ef746,_0x268f32;const _0x26bc08=(_0x4ca7f8=this[_0x6ea127(0xdc)][_0x6ea127(0xfb)](_0xaf8e07['unitId'])[_0x6ea127(0xf2)](_0x1382c6=>_0x1382c6['threadId']===_0xaf8e07[_0x6ea127(0x11c)]))==null?void 0x0:_0x4ca7f8[_0x6ea127(0xde)];if(!_0x26bc08)return;const {unitId:_0x491ffe,subUnitId:_0x466ed9}=_0x26bc08;switch(_0xaf8e07['user']&&this[_0x6ea127(0x116)][_0x6ea127(0x109)](_0xaf8e07[_0x6ea127(0xcd)]),_0xaf8e07[_0x6ea127(0xe9)]){case _0x81c14d[_0x6ea127(0x134)]:break;case _0x81c14d[_0x6ea127(0xe3)]:{this[_0x6ea127(0xdc)][_0x6ea127(0xd8)](_0x491ffe,_0x466ed9,{'unitId':_0x491ffe,'subUnitId':_0x466ed9,'ref':'','id':_0xaf8e07[_0x6ea127(0xc9)],'dT':_0x30bb69(+_0xaf8e07[_0x6ea127(0x146)]),'threadId':_0xaf8e07[_0x6ea127(0x11c)],'personId':(_0x3ef746=(_0x1b4c51=_0xaf8e07[_0x6ea127(0xcd)])==null?void 0x0:_0x1b4c51['userID'])!=null?_0x3ef746:_0xaf8e07[_0x6ea127(0x130)],'text':JSON['parse'](_0xaf8e07[_0x6ea127(0x10f)]),'parentId':_0x26bc08['id']});break;}case _0x81c14d[_0x6ea127(0xef)]:{const _0x41e311=this[_0x6ea127(0xdc)][_0x6ea127(0x127)](_0x491ffe,_0x466ed9,_0xaf8e07[_0x6ea127(0xc9)]);_0x41e311&&_0x41e311['parentId']&&this['_threadCommentModel'][_0x6ea127(0x11f)](_0x491ffe,_0x466ed9,_0xaf8e07[_0x6ea127(0xc9)]);break;}case _0x81c14d['Edit']:{this[_0x6ea127(0xdc)]['updateComment'](_0x491ffe,_0x466ed9,{'commentId':_0xaf8e07[_0x6ea127(0xc9)],'text':JSON[_0x6ea127(0xdf)](_0xaf8e07[_0x6ea127(0x10f)])});break;}case _0x81c14d['Solve']:{const _0x22a716=(_0x268f32=this[_0x6ea127(0xdc)]['getUnit'](_0xaf8e07[_0x6ea127(0x102)])[_0x6ea127(0xf2)](_0x19d044=>_0x19d044[_0x6ea127(0x11c)]===_0xaf8e07[_0x6ea127(0x11c)]))==null?void 0x0:_0x268f32['root'];_0x22a716&&this[_0x6ea127(0xdc)]['resolveComment'](_0x491ffe,_0x466ed9,_0x22a716['id'],_0xaf8e07[_0x6ea127(0x148)]===_0x22628e[_0x6ea127(0xd6)]);break;}}}));}};_0x320483=_0x56f40c([_0x2df764(0x0,_0x5da8cd[_0x5e1f11(0x111)](_0xce7260[_0x5e1f11(0x117)])),_0x2df764(0x1,_0x5da8cd[_0x5e1f11(0x111)](_0x287040[_0x5e1f11(0xe4)])),_0x2df764(0x2,_0x5da8cd[_0x5e1f11(0x111)](_0x5da8cd[_0x5e1f11(0xf0)])),_0x2df764(0x3,_0x5da8cd[_0x5e1f11(0x111)](_0x5da8cd[_0x5e1f11(0xdd)]))],_0x320483);const _0x2b597f=_0x5e1f11(0xe2),_0x1402f2={};var _0x4129d7=Object[_0x5e1f11(0xf8)],_0x4919d2=(_0x51ea8f,_0x3a06f2,_0x3db7db,_0xb32866)=>{for(var _0x5467d9=_0xb32866>0x1?void 0x0:_0xb32866?_0x4129d7(_0x3a06f2,_0x3db7db):_0x3a06f2,_0x4baad2=_0x51ea8f['length']-0x1,_0x5d407a;_0x4baad2>=0x0;_0x4baad2--)(_0x5d407a=_0x51ea8f[_0x4baad2])&&(_0x5467d9=_0x5d407a(_0x5467d9)||_0x5467d9);return _0x5467d9;},_0x13c8f6=(_0x5d0358,_0x435870)=>(_0x31b9c6,_0x4c2fad)=>_0x435870(_0x31b9c6,_0x4c2fad,_0x5d0358);function _0xc1c50c(_0x37836d,_0x3f6661){const _0x33361d=_0x5e1f11,_0x4e9c09=_0x37836d[_0x33361d(0x10d)][0x0];return{..._0x3f6661,'id':_0x4e9c09[_0x33361d(0xc9)],'resolved':_0x37836d[_0x33361d(0x148)]===0x1,'dT':_0x30bb69(_0x4e9c09[_0x33361d(0x146)]),'personId':_0x4e9c09[_0x33361d(0x130)],'threadId':_0x4e9c09[_0x33361d(0x11c)]};}function _0x2de602(_0x50a1bb,_0x58b8bd,_0x3af674){const _0x4784d1=_0x5e1f11;var _0x53beb1,_0x306506;if(((_0x306506=(_0x53beb1=_0x50a1bb==null?void 0x0:_0x50a1bb[_0x4784d1(0x10d)])==null?void 0x0:_0x53beb1[_0x4784d1(0x10c)])!=null?_0x306506:0x0)>0x0){const _0x14bede=(_0x526f32,_0x5a1a59)=>({'id':_0x526f32['replyId'],'threadId':_0x526f32[_0x4784d1(0x11c)],'dT':_0x30bb69(_0x526f32[_0x4784d1(0x146)]),'personId':_0x526f32['userId'],'resolved':_0x50a1bb[_0x4784d1(0x148)]===_0x22628e[_0x4784d1(0xd6)],'unitId':_0x58b8bd,'subUnitId':_0x3af674,'text':JSON[_0x4784d1(0xdf)](_0x526f32['content']),'parentId':_0x5a1a59}),_0x277d17=_0x14bede(_0x50a1bb[_0x4784d1(0x10d)][0x0]);return{..._0x277d17,'children':_0x50a1bb['replies'][_0x4784d1(0x149)](0x1)['map'](_0x40b8da=>_0x14bede(_0x40b8da,_0x277d17['id']))};}return null;}let _0x91faa2=class{constructor(_0x5f3080,_0x29da7f,_0x3b3a1b){const _0x35bb3c=_0x5e1f11;this[_0x35bb3c(0xdb)]=_0x5f3080,this[_0x35bb3c(0x116)]=_0x29da7f,this[_0x35bb3c(0xce)]=_0x3b3a1b;}async['addComment'](_0x5e2e13){const _0x1fd690=_0x5e1f11;var _0x478f09,_0x2db63c;const {parentId:_0x42e10e,unitId:_0x5e6d7d,text:_0x40797d,threadId:_0x5edf04}=_0x5e2e13,_0x79df63=(_0x2db63c=(_0x478f09=_0x40797d[_0x1fd690(0x105)])==null?void 0x0:_0x478f09[_0x1fd690(0x11a)](_0x44db98=>_0x44db98[_0x1fd690(0x13f)]===_0x5da8cd['CustomRangeType'][_0x1fd690(0x101)])['map'](_0x19a63f=>_0x19a63f[_0x1fd690(0xd0)]))!=null?_0x2db63c:[],_0x431113=JSON['stringify'](_0x40797d),_0x327bf4=(await this[_0x1fd690(0xce)][_0x1fd690(0x12b)](_0x5e6d7d))['getMemberID']();if(_0x42e10e){const _0x127ff5={'memberId':_0x327bf4,'unitId':_0x5e6d7d,'content':_0x431113,'mention':_0x79df63,'threadId':_0x5edf04},_0x4cd452=(await this[_0x1fd690(0xdb)][_0x1fd690(0xd4)](_0x1fd690(0xff)+_0x5e6d7d+_0x1fd690(0x138),{'body':_0x127ff5}))[_0x1fd690(0xe5)][_0x1fd690(0x12f)];return{..._0x5e2e13,'id':_0x4cd452[_0x1fd690(0xc9)],'dT':_0x5da8cd[_0x1fd690(0x118)](+_0x4cd452['createTimestamp'])[_0x1fd690(0x145)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x4cd452[_0x1fd690(0x130)]};}else{const _0x29788b={'memberId':_0x327bf4,'unitId':_0x5e6d7d,'content':_0x431113,'mention':_0x79df63},_0xeecae2=await this[_0x1fd690(0xdb)][_0x1fd690(0xd4)](_0x1fd690(0xff)+_0x5e6d7d+_0x1fd690(0x12e),{'body':_0x29788b});return _0xc1c50c(_0xeecae2[_0x1fd690(0xe5)][_0x1fd690(0xeb)],_0x5e2e13);}}async[_0x5e1f11(0x12a)](_0x551d92){const _0x1a99ce=_0x5e1f11;var _0x10ff8f,_0x484811;const {text:_0x424314,unitId:_0xdf5458}=_0x551d92,_0x2dae8f=(_0x484811=(_0x10ff8f=_0x424314[_0x1a99ce(0x105)])==null?void 0x0:_0x10ff8f[_0x1a99ce(0x11a)](_0x2946bd=>_0x2946bd[_0x1a99ce(0x13f)]===_0x5da8cd[_0x1a99ce(0x115)]['COMMENT'])[_0x1a99ce(0x140)](_0x1daf3f=>_0x1daf3f['rangeId']))!=null?_0x484811:[],_0x5e3694=JSON[_0x1a99ce(0xf3)](_0x424314),_0x5a20ea=_0x551d92['threadId'],_0x3496d9=_0x551d92['id'],_0x2ad014={'memberId':(await this[_0x1a99ce(0xce)][_0x1a99ce(0x12b)](_0xdf5458))[_0x1a99ce(0x13b)](),'unitId':_0xdf5458,'threadId':_0x5a20ea,'mention':_0x2dae8f,'content':_0x5e3694,'replyId':_0x3496d9},_0x2cd18a=await this['_httpService'][_0x1a99ce(0xd4)](_0x1a99ce(0xff)+_0xdf5458+'/edit',{'body':_0x2ad014});return!_0x2cd18a['body'][_0x1a99ce(0xfd)]||_0x2cd18a['body'][_0x1a99ce(0xfd)][_0x1a99ce(0xfc)]===0x1;}async[_0x5e1f11(0xea)](_0x420d79){const _0x25bda6=_0x5e1f11,{unitId:_0x27f666}=_0x420d79,_0x5c7510=_0x420d79[_0x25bda6(0x11c)],_0x3526e5={'memberId':this[_0x25bda6(0x116)]['getCurrentUser']()[_0x25bda6(0x11e)],'unitId':_0x27f666,'threadId':_0x5c7510,'solved':_0x420d79[_0x25bda6(0xd7)]?_0x22628e[_0x25bda6(0xd6)]:_0x22628e['OpenOrReOpen']},_0xfe0475=await this[_0x25bda6(0xdb)][_0x25bda6(0xd4)](_0x25bda6(0xff)+_0x27f666+'/solved',{'body':_0x3526e5});return!_0xfe0475[_0x25bda6(0xe5)][_0x25bda6(0xfd)]||_0xfe0475['body']['error'][_0x25bda6(0xfc)]===0x1;}async[_0x5e1f11(0x11f)](_0x1482f5,_0x2a839a,_0x4f69a0,_0x17f1d3){const _0x3d830d=_0x5e1f11,_0x31b1de={'memberId':(await this[_0x3d830d(0xce)][_0x3d830d(0x12b)](_0x1482f5))[_0x3d830d(0x13b)](),'threadId':_0x4f69a0,'replyId':_0x17f1d3,'unitId':_0x1482f5},_0x467b46=await this[_0x3d830d(0xdb)][_0x3d830d(0xd4)](_0x3d830d(0xff)+_0x1482f5+'/delete',{'body':_0x31b1de});return!_0x467b46[_0x3d830d(0xe5)]['error']||_0x467b46[_0x3d830d(0xe5)][_0x3d830d(0xfd)][_0x3d830d(0xfc)]===0x1;}async[_0x5e1f11(0xfa)](_0x461066,_0x2dbcef,_0xee6630){const _0x387cda=_0x5e1f11,_0x4a5b5e={'unitId':_0x461066,'threadId':_0xee6630},_0x10bec3=await this[_0x387cda(0xdb)][_0x387cda(0xd4)](_0x387cda(0xff)+_0x461066+_0x387cda(0x131),{'body':_0x4a5b5e}),_0x30cdf9=_0xee6630['map'](_0x3f9c01=>_0x2de602(_0x10bec3[_0x387cda(0xe5)][_0x387cda(0x100)][_0x3f9c01],_0x461066,_0x2dbcef))['filter'](Boolean);return Object[_0x387cda(0x112)](_0x10bec3[_0x387cda(0xe5)]['users'])[_0x387cda(0x11d)](_0x3c4323=>{const _0x28864f=_0x387cda;this[_0x28864f(0x116)][_0x28864f(0x109)](_0x3c4323);}),_0x30cdf9;}[_0x5e1f11(0x139)](_0x561725){const _0x2d7a55=_0x5e1f11;return{'id':_0x561725['id'],'threadId':_0x561725[_0x2d7a55(0x11c)],'ref':_0x561725['ref']};}};_0x91faa2=_0x4919d2([_0x13c8f6(0x0,_0x5da8cd['Inject'](_0x4728f5[_0x5e1f11(0xec)])),_0x13c8f6(0x1,_0x5da8cd[_0x5e1f11(0x111)](_0x5da8cd['UserManagerService'])),_0x13c8f6(0x2,_0x5da8cd[_0x5e1f11(0x111)](_0xce7260[_0x5e1f11(0x142)]))],_0x91faa2);var _0x145d3d=Object[_0x5e1f11(0xf8)],_0x2de72f=(_0x4dbdce,_0x1695e3,_0x8e870f,_0x26254e)=>{for(var _0x33ff49=_0x26254e>0x1?void 0x0:_0x26254e?_0x145d3d(_0x1695e3,_0x8e870f):_0x1695e3,_0x256942=_0x4dbdce['length']-0x1,_0x47552f;_0x256942>=0x0;_0x256942--)(_0x47552f=_0x4dbdce[_0x256942])&&(_0x33ff49=_0x47552f(_0x33ff49)||_0x33ff49);return _0x33ff49;},_0x508f1c=(_0x43bb32,_0x1c920b)=>(_0x24123e,_0xec6504)=>_0x1c920b(_0x24123e,_0xec6504,_0x43bb32);let _0x13acb6=class extends _0x5da8cd[_0x5e1f11(0x12d)]{constructor(_0x89a478,_0x4a47d1){const _0xc5c5b=_0x5e1f11;super(),this['_threadCommentDataSourceService']=_0x89a478,this[_0xc5c5b(0x13a)]=_0x4a47d1,this[_0xc5c5b(0x10b)]();}[_0x5e1f11(0x10b)](){const _0x122b08=_0x5e1f11;this[_0x122b08(0x108)]['dataSource']=this[_0x122b08(0x13a)],this[_0x122b08(0x108)][_0x122b08(0x136)]=!0x1;}};_0x13acb6=_0x2de72f([_0x508f1c(0x0,_0x287040['IThreadCommentDataSourceService']),_0x508f1c(0x1,_0x5da8cd[_0x5e1f11(0x111)](_0x91faa2))],_0x13acb6);var _0x24e7b3=Object['defineProperty'],_0xc3aad4=Object[_0x5e1f11(0xf8)],_0x221b82=(_0x2a5a32,_0x11cccb,_0x450808)=>_0x11cccb in _0x2a5a32?_0x24e7b3(_0x2a5a32,_0x11cccb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x450808}):_0x2a5a32[_0x11cccb]=_0x450808,_0x520e90=(_0x1c8b4a,_0x2fb98e,_0x5c208f,_0x400dfc)=>{const _0x4870c2=_0x5e1f11;for(var _0x267189=_0x400dfc>0x1?void 0x0:_0x400dfc?_0xc3aad4(_0x2fb98e,_0x5c208f):_0x2fb98e,_0x1fcc32=_0x1c8b4a[_0x4870c2(0x10c)]-0x1,_0x38d35e;_0x1fcc32>=0x0;_0x1fcc32--)(_0x38d35e=_0x1c8b4a[_0x1fcc32])&&(_0x267189=_0x38d35e(_0x267189)||_0x267189);return _0x267189;},_0xcccfaf=(_0x2c2917,_0x44c7aa)=>(_0x442b5c,_0xff8c6d)=>_0x44c7aa(_0x442b5c,_0xff8c6d,_0x2c2917),_0x1ecf5d=(_0x25fb2e,_0x2dca92,_0x61694c)=>_0x221b82(_0x25fb2e,typeof _0x2dca92!=_0x5e1f11(0x104)?_0x2dca92+'':_0x2dca92,_0x61694c);_0x28ecf5[_0x5e1f11(0xf5)]=class extends _0x5da8cd[_0x5e1f11(0xf1)]{constructor(_0x103bd1=_0x1402f2,_0x2ffc48,_0x46d2b4){const _0x2f3597=_0x5e1f11;super(),this[_0x2f3597(0x125)]=_0x103bd1,this['_injector']=_0x2ffc48,this[_0x2f3597(0xd3)]=_0x46d2b4;const {..._0xbda155}=_0x5da8cd['merge']({},_0x1402f2,this[_0x2f3597(0x125)]);this[_0x2f3597(0xd3)]['setConfig'](_0x2b597f,_0xbda155);}[_0x5e1f11(0x129)](){const _0x236071=_0x5e1f11;[[_0x91faa2],[_0x13acb6],[_0x320483]][_0x236071(0x11d)](_0x3263d2=>{const _0x43d48f=_0x236071;this[_0x43d48f(0x114)][_0x43d48f(0x133)](_0x3263d2);});}['onReady'](){const _0x57db23=_0x5e1f11;this[_0x57db23(0x114)][_0x57db23(0xf7)](_0x13acb6),this['_injector']['get'](_0x320483);}},_0x1ecf5d(_0x28ecf5['UniverThreadCommentDataSourcePlugin'],_0x5e1f11(0xc6),_0x26048c),_0x1ecf5d(_0x28ecf5[_0x5e1f11(0xf5)],_0x5e1f11(0xe9),_0x5da8cd['UniverInstanceType'][_0x5e1f11(0x124)]),_0x28ecf5[_0x5e1f11(0xf5)]=_0x520e90([_0x5da8cd[_0x5e1f11(0x144)](_0x56da18[_0x5e1f11(0xcf)],_0xce7260[_0x5e1f11(0x106)],_0x2c9960[_0x5e1f11(0x11b)]),_0xcccfaf(0x1,_0x5da8cd[_0x5e1f11(0x111)](_0x5da8cd[_0x5e1f11(0xdd)])),_0xcccfaf(0x2,_0x5da8cd['IConfigService'])],_0x28ecf5['UniverThreadCommentDataSourcePlugin']),Object[_0x5e1f11(0xf6)](_0x28ecf5,Symbol[_0x5e1f11(0x14a)],{'value':_0x5e1f11(0x123)});}));function _0x32e3(_0x10f41f,_0x5a2bdb){const _0x52fc6b=_0x52fc();return _0x32e3=function(_0x32e326,_0x21ca14){_0x32e326=_0x32e326-0xc6;let _0x19513c=_0x52fc6b[_0x32e326];return _0x19513c;},_0x32e3(_0x10f41f,_0x5a2bdb);}function _0x52fc(){const _0x5a25ea=['UserManagerService','Plugin','find','stringify','payload','UniverThreadCommentDataSourcePlugin','defineProperty','get','getOwnPropertyDescriptor','849222vnigOq','listComments','getUnit','code','error','@univerjs/core','/universer-api/comment/unit/','comments','COMMENT','unitId','/universer-api/user/list','symbol','customRanges','UniverCollaborationClientPlugin','UniverProCollaborationClient','_threadCommentDataSourceService','addUser','commentUpdate$','_initDataSource','length','replies','size','content','15512brQGWq','Inject','values','UniverCore','_injector','CustomRangeType','_userService','CommentService','dayjs','16313OQjEZy','filter','UniverLicensePlugin','threadId','forEach','userID','deleteComment','users','15570XZIcIW','Edit','Module','UNIVER_UNKNOWN','_config','_initUserSync','getComment','YYYY/MM/DD\x20HH:mm','onStarting','updateComment','requireSession','14834619DbXzKy','Disposable','/add','reply','userId','/list','@univerjs-pro/collaboration-client','add','Add','Solve','syncUpdateMutationToColla','getUser','/reply','saveCommentToSnapshot','_threadCommentDataSource','getMemberID','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rxjs','_init','rangeType','map','function','CollaborationSessionService','disposeWithMe','DependentOn','format','createTimestamp','delete','solved','slice','toStringTag','pluginName','@univerjs/thread-comment','UNRECOGNIZED','replyId','@univerjs/thread-comment-ui','Unknown','1eJDmVb','user','_sessionService','UniverThreadCommentUIPlugin','rangeId','@univerjs-pro/license','1076voFCFG','_configService','post','113960HrNWGw','Solved','resolved','addComment','object','subscribe','_httpService','_threadCommentModel','Injector','root','parse','UniverProThreadCommentDatasource','OpenOrReOpen','thread-comment-data-source.config','Reply','ThreadCommentModel','body','11935VIEsJI','1087836axNDdQ','_commentService','type','resolveComment','comment','HTTPService','personId','930HaZdFc','Delete'];_0x52fc=function(){return _0x5a25ea;};return _0x52fc();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.12.2-experimental.
|
|
3
|
+
"version": "0.12.2-experimental.20251202-7f1a98f",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"rxjs": ">=7.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@univerjs-pro/collaboration-client": "0.12.2-experimental.
|
|
49
|
-
"@univerjs-pro/license": "0.12.2-experimental.
|
|
50
|
-
"@univerjs/
|
|
51
|
-
"@univerjs/
|
|
52
|
-
"@univerjs/thread-comment": "0.12.2-experimental.
|
|
53
|
-
"@univerjs/
|
|
54
|
-
"@univerjs/
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.12.2-experimental.20251202-7f1a98f",
|
|
49
|
+
"@univerjs-pro/license": "0.12.2-experimental.20251202-7f1a98f",
|
|
50
|
+
"@univerjs/network": "0.12.2-experimental.20251202-7f1a98f",
|
|
51
|
+
"@univerjs/thread-comment": "0.12.2-experimental.20251202-7f1a98f",
|
|
52
|
+
"@univerjs/thread-comment-ui": "0.12.2-experimental.20251202-7f1a98f",
|
|
53
|
+
"@univerjs/core": "0.12.2-experimental.20251202-7f1a98f",
|
|
54
|
+
"@univerjs/protocol": "0.1.47"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|