@univerjs-pro/thread-comment-datasource 0.6.10-alpha.0 → 0.6.10-experimental.20250410-b7c4a5b

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 CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x2c8270=_0x25f8;(function(_0x31aecb,_0x5df052){const _0x389b71=_0x25f8,_0x363393=_0x31aecb();while(!![]){try{const _0x185ddd=parseInt(_0x389b71(0x216))/0x1*(-parseInt(_0x389b71(0x203))/0x2)+parseInt(_0x389b71(0x1e1))/0x3*(-parseInt(_0x389b71(0x1da))/0x4)+-parseInt(_0x389b71(0x1d9))/0x5*(-parseInt(_0x389b71(0x1c8))/0x6)+-parseInt(_0x389b71(0x1cf))/0x7+parseInt(_0x389b71(0x1f7))/0x8+-parseInt(_0x389b71(0x1bb))/0x9*(parseInt(_0x389b71(0x1d7))/0xa)+-parseInt(_0x389b71(0x201))/0xb*(-parseInt(_0x389b71(0x205))/0xc);if(_0x185ddd===_0x5df052)break;else _0x363393['push'](_0x363393['shift']());}catch(_0x2be829){_0x363393['push'](_0x363393['shift']());}}}(_0x3437,0x8011f));Object[_0x2c8270(0x1fe)](exports,Symbol[_0x2c8270(0x1f2)],{'value':'Module'});const b=require(_0x2c8270(0x209)),T=require(_0x2c8270(0x1df)),c=require(_0x2c8270(0x211)),j=require(_0x2c8270(0x1c3)),M=require(_0x2c8270(0x214)),w=require('rxjs'),P=require(_0x2c8270(0x22d)),U=_0x2c8270(0x1d8);var I=(_0x1b2028=>(_0x1b2028[_0x1b2028['OpenOrReOpen']=0x0]=_0x2c8270(0x215),_0x1b2028[_0x1b2028[_0x2c8270(0x1de)]=0x1]=_0x2c8270(0x1de),_0x1b2028[_0x1b2028['UNRECOGNIZED']=-0x1]=_0x2c8270(0x224),_0x1b2028))(I||{}),v=(_0x480111=>(_0x480111[_0x480111['Unknown']=0x0]=_0x2c8270(0x1e2),_0x480111[_0x480111[_0x2c8270(0x1bf)]=0x1]='Add',_0x480111[_0x480111['Reply']=0x2]=_0x2c8270(0x1e7),_0x480111[_0x480111[_0x2c8270(0x218)]=0x3]=_0x2c8270(0x218),_0x480111[_0x480111[_0x2c8270(0x1e4)]=0x4]='Delete',_0x480111[_0x480111['Solve']=0x5]=_0x2c8270(0x213),_0x480111[_0x480111[_0x2c8270(0x224)]=-0x1]=_0x2c8270(0x224),_0x480111))(v||{});const f=_0x2d5bb7=>c[_0x2c8270(0x229)](new Date(+_0x2d5bb7))[_0x2c8270(0x21f)](_0x2c8270(0x227)),R=async(_0x594855,_0x12214a)=>{const _0x3b11fb=_0x2c8270,_0x1350aa=_0x594855[_0x3b11fb(0x1ed)](c['UserManagerService']),_0x26e21d=_0x594855['get'](P[_0x3b11fb(0x1ee)]);_0x12214a[_0x3b11fb(0x225)](_0x1c0ef1=>{const _0x151c2b=_0x3b11fb;_0x1350aa[_0x151c2b(0x223)](_0x1c0ef1)&&_0x12214a[_0x151c2b(0x226)](_0x1c0ef1);}),_0x12214a[_0x3b11fb(0x1ff)]&&(await _0x26e21d[_0x3b11fb(0x1ed)]('/universer-api/user/list',{'params':{'userIDs':[..._0x12214a]}}))['body'][_0x3b11fb(0x200)][_0x3b11fb(0x225)](_0x437dd2=>{const _0x2a8080=_0x3b11fb;_0x437dd2&&_0x1350aa[_0x2a8080(0x20d)](_0x437dd2);});};var $=Object[_0x2c8270(0x1b2)],E=(_0x2269c2,_0x477ae1,_0x298d74,_0x326dcb)=>{const _0x3e1b65=_0x2c8270;for(var _0xdab29c=_0x326dcb>0x1?void 0x0:_0x326dcb?$(_0x477ae1,_0x298d74):_0x477ae1,_0x560bf7=_0x2269c2[_0x3e1b65(0x1b9)]-0x1,_0x3c5dbd;_0x560bf7>=0x0;_0x560bf7--)(_0x3c5dbd=_0x2269c2[_0x560bf7])&&(_0xdab29c=_0x3c5dbd(_0xdab29c)||_0xdab29c);return _0xdab29c;},S=(_0x597199,_0x4cebcb)=>(_0x5e1603,_0x3c8fde)=>_0x4cebcb(_0x5e1603,_0x3c8fde,_0x597199);let p=class extends c[_0x2c8270(0x1db)]{constructor(_0x42c749,_0x1dd7f5,_0x4fdf13,_0x2f1401){const _0x2d8a49=_0x2c8270;super(),this[_0x2d8a49(0x217)]=_0x42c749,this[_0x2d8a49(0x1d3)]=_0x1dd7f5,this[_0x2d8a49(0x220)]=_0x4fdf13,this['_injector']=_0x2f1401,this[_0x2d8a49(0x1dd)](),this['_initUserSync']();}[_0x2c8270(0x1cd)](){const _0x31728a=_0x2c8270;this[_0x31728a(0x1eb)](this[_0x31728a(0x1d3)]['commentUpdate$'][_0x31728a(0x1c7)](w[_0x31728a(0x1e6)](0x10))[_0x31728a(0x1b1)](_0x2b49ae=>{const _0x53345b=_0x31728a,_0xb4006f=new Set();_0x2b49ae[_0x53345b(0x225)](_0x55d451=>{const _0x5eed8c=_0x53345b;switch(_0x55d451[_0x5eed8c(0x208)]){case'add':{const _0x38b34b=_0x55d451[_0x5eed8c(0x1b5)][_0x5eed8c(0x1cb)];_0xb4006f[_0x5eed8c(0x1f1)](_0x38b34b);break;}}}),R(this['_injector'],_0xb4006f);}));}[_0x2c8270(0x1dd)](){const _0x3879ed=_0x2c8270;this['disposeWithMe'](this[_0x3879ed(0x217)]['commentUpdate$']['subscribe'](async _0x596551=>{const _0x59bb07=_0x3879ed;var _0x200cfd,_0x176d1a,_0x590891,_0x1e1c98;const _0x59f296=(_0x200cfd=this[_0x59bb07(0x1d3)][_0x59bb07(0x21e)](_0x596551[_0x59bb07(0x202)])['find'](_0x3c0054=>_0x3c0054['threadId']===_0x596551[_0x59bb07(0x1f3)]))==null?void 0x0:_0x200cfd[_0x59bb07(0x1b8)];if(!_0x59f296)return;const {unitId:_0x391b13,subUnitId:_0x804a7d}=_0x59f296;switch(_0x596551[_0x59bb07(0x1dc)]&&this[_0x59bb07(0x220)][_0x59bb07(0x20d)](_0x596551[_0x59bb07(0x1dc)]),_0x596551[_0x59bb07(0x208)]){case v[_0x59bb07(0x1bf)]:break;case v['Reply']:{this['_threadCommentModel'][_0x59bb07(0x1c0)](_0x391b13,_0x804a7d,{'unitId':_0x391b13,'subUnitId':_0x804a7d,'ref':'','id':_0x596551[_0x59bb07(0x1f8)],'dT':f(+_0x596551[_0x59bb07(0x22e)]),'threadId':_0x596551['threadId'],'personId':(_0x590891=(_0x176d1a=_0x596551[_0x59bb07(0x1dc)])==null?void 0x0:_0x176d1a[_0x59bb07(0x1d1)])!=null?_0x590891:_0x596551[_0x59bb07(0x20b)],'text':JSON[_0x59bb07(0x219)](_0x596551[_0x59bb07(0x1fb)]),'parentId':_0x59f296['id']});break;}case v[_0x59bb07(0x1e4)]:{const _0x2b01f1=this[_0x59bb07(0x1d3)]['getComment'](_0x391b13,_0x804a7d,_0x596551[_0x59bb07(0x1f8)]);_0x2b01f1&&_0x2b01f1[_0x59bb07(0x1e8)]&&this['_threadCommentModel']['deleteComment'](_0x391b13,_0x804a7d,_0x596551[_0x59bb07(0x1f8)]);break;}case v['Edit']:{this[_0x59bb07(0x1d3)][_0x59bb07(0x1be)](_0x391b13,_0x804a7d,{'commentId':_0x596551['replyId'],'text':JSON[_0x59bb07(0x219)](_0x596551[_0x59bb07(0x1fb)])});break;}case v[_0x59bb07(0x213)]:{const _0x5f222d=(_0x1e1c98=this['_threadCommentModel'][_0x59bb07(0x21e)](_0x596551[_0x59bb07(0x202)])[_0x59bb07(0x1f0)](_0x181467=>_0x181467['threadId']===_0x596551[_0x59bb07(0x1f3)]))==null?void 0x0:_0x1e1c98[_0x59bb07(0x1b8)];_0x5f222d&&this[_0x59bb07(0x1d3)][_0x59bb07(0x1f5)](_0x391b13,_0x804a7d,_0x5f222d['id'],_0x596551[_0x59bb07(0x20a)]===I[_0x59bb07(0x1de)]);break;}}}));}};function _0x25f8(_0x26471c,_0x4507a0){const _0x3437e6=_0x3437();return _0x25f8=function(_0x25f85c,_0x1385b1){_0x25f85c=_0x25f85c-0x1b0;let _0x1d9aba=_0x3437e6[_0x25f85c];return _0x1d9aba;},_0x25f8(_0x26471c,_0x4507a0);}p=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c[_0x2c8270(0x20c)](M[_0x2c8270(0x21b)])),S(0x2,c['Inject'](c[_0x2c8270(0x1c4)])),S(0x3,c[_0x2c8270(0x20c)](c['Injector']))],p);const q=_0x2c8270(0x1fc),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4d8ba2,_0x42d9d5,_0x7748bf,_0x2aaeca)=>{const _0x169471=_0x2c8270;for(var _0x59f568=_0x2aaeca>0x1?void 0x0:_0x2aaeca?A(_0x42d9d5,_0x7748bf):_0x42d9d5,_0x33e88a=_0x4d8ba2[_0x169471(0x1b9)]-0x1,_0x3d4708;_0x33e88a>=0x0;_0x33e88a--)(_0x3d4708=_0x4d8ba2[_0x33e88a])&&(_0x59f568=_0x3d4708(_0x59f568)||_0x59f568);return _0x59f568;},_=(_0x11885c,_0x3fa214)=>(_0x22e18b,_0x25bf48)=>_0x3fa214(_0x22e18b,_0x25bf48,_0x11885c);function Y(_0x13c9f7,_0x50ce81){const _0x1dacc3=_0x2c8270,_0x44a1c3=_0x13c9f7[_0x1dacc3(0x1e5)][0x0];return{..._0x50ce81,'id':_0x44a1c3[_0x1dacc3(0x1f8)],'resolved':_0x13c9f7[_0x1dacc3(0x20a)]===0x1,'dT':f(_0x44a1c3[_0x1dacc3(0x22e)]),'personId':_0x44a1c3['userId'],'threadId':_0x44a1c3[_0x1dacc3(0x1f3)]};}function G(_0x17c02f,_0x9898ae,_0x4e2e5d){const _0x23d7bb=_0x2c8270;var _0x915e74,_0x4b651d;if(((_0x4b651d=(_0x915e74=_0x17c02f==null?void 0x0:_0x17c02f['replies'])==null?void 0x0:_0x915e74[_0x23d7bb(0x1b9)])!=null?_0x4b651d:0x0)>0x0){const _0x2f8694=(_0x45b3ab,_0x10b6ce)=>({'id':_0x45b3ab['replyId'],'threadId':_0x45b3ab[_0x23d7bb(0x1f3)],'dT':f(_0x45b3ab[_0x23d7bb(0x22e)]),'personId':_0x45b3ab[_0x23d7bb(0x20b)],'resolved':_0x17c02f[_0x23d7bb(0x20a)]===I['Solved'],'unitId':_0x9898ae,'subUnitId':_0x4e2e5d,'text':JSON[_0x23d7bb(0x219)](_0x45b3ab[_0x23d7bb(0x1fb)]),'parentId':_0x10b6ce}),_0x1f0aad=_0x2f8694(_0x17c02f['replies'][0x0]);return{..._0x1f0aad,'children':_0x17c02f[_0x23d7bb(0x1e5)][_0x23d7bb(0x1cc)](0x1)[_0x23d7bb(0x228)](_0x4cb3da=>_0x2f8694(_0x4cb3da,_0x1f0aad['id']))};}return null;}function _0x3437(){const _0x38107b=['Delete','replies','bufferTime','Reply','parentId','COMMENT','UniverLicensePlugin','disposeWithMe','_sessionService','get','HTTPService','getCurrentUser','find','add','toStringTag','threadId','onStarting','resolveComment','/edit','2331224qULARv','replyId','resolved','pluginName','content','thread-comment-data-source.config','CustomRangeType','defineProperty','size','users','4095245bFUyvq','unitId','381704HASMOO','body','36EOMSau','rangeType','CollaborationSessionService','type','@univerjs-pro/collaboration-client','solved','userId','Inject','addUser','_threadCommentDataSource','_config','_httpService','@univerjs/core','Plugin','Solve','@univerjs/thread-comment','OpenOrReOpen','1NCZCvD','_commentService','Edit','parse','/reply','ThreadCommentModel','rangeId','post','getUnit','format','_userService','comment','ref','getUser','UNRECOGNIZED','forEach','delete','YYYY/MM/DD\x20HH:mm','map','dayjs','code','deleteComment','values','@univerjs/network','createTimestamp','UNIVER_UNKNOWN','subscribe','getOwnPropertyDescriptor','_injector','getMemberID','payload','UniverThreadCommentUIPlugin','Injector','root','length','UniverCollaborationClientPlugin','126TOLbVt','/add','_initDataSource','updateComment','Add','addComment','onReady','/delete','@univerjs/thread-comment-ui','UserManagerService','reply','/universer-api/comment/unit/','pipe','60DFoiKu','DependentOn','merge','personId','slice','_initUserSync','UniverThreadCommentDataSourcePlugin','3183257BKfnmR','error','userID','filter','_threadCommentModel','/list','customRanges','stringify','518270hJVoKG','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','336485SntqBT','123668vasTXJ','Disposable','user','_init','Solved','@univerjs-pro/license','requireSession','18KtBJFw','Unknown','_threadCommentDataSourceService'];_0x3437=function(){return _0x38107b;};return _0x3437();}let g=class{constructor(_0x1dbf79,_0x34f1da,_0xe4ffd4,_0x3ab3ab){const _0x17c342=_0x2c8270;this[_0x17c342(0x210)]=_0x1dbf79,this[_0x17c342(0x220)]=_0x34f1da,this[_0x17c342(0x1ec)]=_0xe4ffd4,this[_0x17c342(0x1b3)]=_0x3ab3ab;}async[_0x2c8270(0x1c0)](_0x1b576a){const _0x2ce34b=_0x2c8270;var _0x3cb8d7,_0x103278;const {parentId:_0x1ac7ea,unitId:_0x26dd25,text:_0x45d5f1,threadId:_0xf5885a}=_0x1b576a,_0x1b5b29=(_0x103278=(_0x3cb8d7=_0x45d5f1[_0x2ce34b(0x1d5)])==null?void 0x0:_0x3cb8d7['filter'](_0x1b6b0a=>_0x1b6b0a['rangeType']===c['CustomRangeType'][_0x2ce34b(0x1e9)])[_0x2ce34b(0x228)](_0x1413e4=>_0x1413e4['rangeId']))!=null?_0x103278:[],_0xf7d7bc=JSON[_0x2ce34b(0x1d6)](_0x45d5f1),_0x510351=(await this[_0x2ce34b(0x1ec)][_0x2ce34b(0x1e0)](_0x26dd25))[_0x2ce34b(0x1b4)]();if(_0x1ac7ea){const _0x36775d={'memberId':_0x510351,'unitId':_0x26dd25,'content':_0xf7d7bc,'mention':_0x1b5b29,'threadId':_0xf5885a},_0x46948b=(await this[_0x2ce34b(0x210)]['post'](_0x2ce34b(0x1c6)+_0x26dd25+_0x2ce34b(0x21a),{'body':_0x36775d}))['body'][_0x2ce34b(0x1c5)];return{..._0x1b576a,'id':_0x46948b['replyId'],'dT':c['dayjs'](+_0x46948b[_0x2ce34b(0x22e)])[_0x2ce34b(0x21f)](_0x2ce34b(0x227)),'personId':_0x46948b[_0x2ce34b(0x20b)]};}else{const _0x4739fe={'memberId':_0x510351,'unitId':_0x26dd25,'content':_0xf7d7bc,'mention':_0x1b5b29},_0x5443e1=await this[_0x2ce34b(0x210)]['post'](_0x2ce34b(0x1c6)+_0x26dd25+_0x2ce34b(0x1bc),{'body':_0x4739fe});return Y(_0x5443e1[_0x2ce34b(0x204)][_0x2ce34b(0x221)],_0x1b576a);}}async[_0x2c8270(0x1be)](_0x3f1ba5){const _0x3b5df5=_0x2c8270;var _0xcc0291,_0x389985;const {text:_0xa455df,unitId:_0x2bb6f3}=_0x3f1ba5,_0x2b70e8=(_0x389985=(_0xcc0291=_0xa455df[_0x3b5df5(0x1d5)])==null?void 0x0:_0xcc0291[_0x3b5df5(0x1d2)](_0x52a15e=>_0x52a15e[_0x3b5df5(0x206)]===c[_0x3b5df5(0x1fd)]['COMMENT'])[_0x3b5df5(0x228)](_0x4d8387=>_0x4d8387[_0x3b5df5(0x21c)]))!=null?_0x389985:[],_0x151d31=JSON[_0x3b5df5(0x1d6)](_0xa455df),_0x31c457=_0x3f1ba5[_0x3b5df5(0x1f3)],_0x47e2c1=_0x3f1ba5['id'],_0x2c20bf={'memberId':(await this[_0x3b5df5(0x1ec)][_0x3b5df5(0x1e0)](_0x2bb6f3))['getMemberID'](),'unitId':_0x2bb6f3,'threadId':_0x31c457,'mention':_0x2b70e8,'content':_0x151d31,'replyId':_0x47e2c1},_0x2054cd=await this[_0x3b5df5(0x210)]['post'](_0x3b5df5(0x1c6)+_0x2bb6f3+_0x3b5df5(0x1f6),{'body':_0x2c20bf});return!_0x2054cd[_0x3b5df5(0x204)][_0x3b5df5(0x1d0)]||_0x2054cd[_0x3b5df5(0x204)]['error'][_0x3b5df5(0x22a)]===0x1;}async[_0x2c8270(0x1f5)](_0x1c534f){const _0x196225=_0x2c8270,{unitId:_0x30d8d6}=_0x1c534f,_0x4ee4d1=_0x1c534f['threadId'],_0x531b74={'memberId':this[_0x196225(0x220)][_0x196225(0x1ef)]()[_0x196225(0x1d1)],'unitId':_0x30d8d6,'threadId':_0x4ee4d1,'solved':_0x1c534f[_0x196225(0x1f9)]?I[_0x196225(0x1de)]:I[_0x196225(0x215)]},_0x571e79=await this[_0x196225(0x210)][_0x196225(0x21d)](_0x196225(0x1c6)+_0x30d8d6+'/solved',{'body':_0x531b74});return!_0x571e79['body']['error']||_0x571e79['body']['error'][_0x196225(0x22a)]===0x1;}async[_0x2c8270(0x22b)](_0x1df84d,_0x11cfcf,_0x479bc9,_0x1e156c){const _0x16e779=_0x2c8270,_0x43f335={'memberId':(await this['_sessionService']['requireSession'](_0x1df84d))['getMemberID'](),'threadId':_0x479bc9,'replyId':_0x1e156c,'unitId':_0x1df84d},_0xd6ff58=await this[_0x16e779(0x210)][_0x16e779(0x21d)]('/universer-api/comment/unit/'+_0x1df84d+_0x16e779(0x1c2),{'body':_0x43f335});return!_0xd6ff58[_0x16e779(0x204)][_0x16e779(0x1d0)]||_0xd6ff58[_0x16e779(0x204)][_0x16e779(0x1d0)]['code']===0x1;}async['listComments'](_0x309ec7,_0x2a6d74,_0xbee809){const _0xb8992e=_0x2c8270,_0xd59d0={'unitId':_0x309ec7,'threadId':_0xbee809},_0x556cc4=await this['_httpService']['post'](_0xb8992e(0x1c6)+_0x309ec7+_0xb8992e(0x1d4),{'body':_0xd59d0}),_0x24bb23=_0xbee809[_0xb8992e(0x228)](_0x388e92=>G(_0x556cc4['body']['comments'][_0x388e92],_0x309ec7,_0x2a6d74))[_0xb8992e(0x1d2)](Boolean);return Object[_0xb8992e(0x22c)](_0x556cc4[_0xb8992e(0x204)][_0xb8992e(0x200)])[_0xb8992e(0x225)](_0x2523ac=>{const _0x3ad14f=_0xb8992e;this['_userService'][_0x3ad14f(0x20d)](_0x2523ac);}),_0x24bb23;}['saveCommentToSnapshot'](_0x23b9c7){const _0x5da570=_0x2c8270;return{'id':_0x23b9c7['id'],'threadId':_0x23b9c7[_0x5da570(0x1f3)],'ref':_0x23b9c7[_0x5da570(0x222)]};}};g=x([_(0x0,c[_0x2c8270(0x20c)](P[_0x2c8270(0x1ee)])),_(0x1,c[_0x2c8270(0x20c)](c[_0x2c8270(0x1c4)])),_(0x2,c[_0x2c8270(0x20c)](b[_0x2c8270(0x207)])),_(0x3,c['Inject'](c[_0x2c8270(0x1b7)]))],g);var H=Object[_0x2c8270(0x1b2)],J=(_0x5e60bf,_0x48f300,_0x4e3fa0,_0x3e522f)=>{const _0x2f16a5=_0x2c8270;for(var _0x4727bd=_0x3e522f>0x1?void 0x0:_0x3e522f?H(_0x48f300,_0x4e3fa0):_0x48f300,_0x5134f1=_0x5e60bf[_0x2f16a5(0x1b9)]-0x1,_0x2aa726;_0x5134f1>=0x0;_0x5134f1--)(_0x2aa726=_0x5e60bf[_0x5134f1])&&(_0x4727bd=_0x2aa726(_0x4727bd)||_0x4727bd);return _0x4727bd;},y=(_0x31805c,_0x1ffa5f)=>(_0x2af3f0,_0x586d7c)=>_0x1ffa5f(_0x2af3f0,_0x586d7c,_0x31805c);let C=class extends c['Disposable']{constructor(_0x4e2d30,_0x5d3ece){const _0x2db353=_0x2c8270;super(),this['_threadCommentDataSourceService']=_0x4e2d30,this[_0x2db353(0x20e)]=_0x5d3ece,this[_0x2db353(0x1bd)]();}[_0x2c8270(0x1bd)](){const _0x32ff99=_0x2c8270;this[_0x32ff99(0x1e3)]['dataSource']=this[_0x32ff99(0x20e)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x2c8270(0x1fe)],L=Object['getOwnPropertyDescriptor'],Z=(_0x2bc437,_0x58f40f,_0x11140d)=>_0x58f40f in _0x2bc437?F(_0x2bc437,_0x58f40f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x11140d}):_0x2bc437[_0x58f40f]=_0x11140d,W=(_0x412185,_0x16591d,_0x2ca9dc,_0x4faf95)=>{const _0x23cb0b=_0x2c8270;for(var _0x2ac1e4=_0x4faf95>0x1?void 0x0:_0x4faf95?L(_0x16591d,_0x2ca9dc):_0x16591d,_0x1ddd8e=_0x412185[_0x23cb0b(0x1b9)]-0x1,_0x2e1ea0;_0x1ddd8e>=0x0;_0x1ddd8e--)(_0x2e1ea0=_0x412185[_0x1ddd8e])&&(_0x2ac1e4=_0x2e1ea0(_0x2ac1e4)||_0x2ac1e4);return _0x2ac1e4;},O=(_0x151174,_0xcb9186)=>(_0x3bef74,_0x22e250)=>_0xcb9186(_0x3bef74,_0x22e250,_0x151174),N=(_0x54be47,_0x47b9db,_0x1a6bf8)=>Z(_0x54be47,typeof _0x47b9db!='symbol'?_0x47b9db+'':_0x47b9db,_0x1a6bf8);exports[_0x2c8270(0x1ce)]=class extends c[_0x2c8270(0x212)]{constructor(_0xe80307=D,_0x1387b1,_0x486353){const _0x26ab11=_0x2c8270;super(),this[_0x26ab11(0x20f)]=_0xe80307,this[_0x26ab11(0x1b3)]=_0x1387b1,this['_configService']=_0x486353;const {..._0xc6173}=c[_0x26ab11(0x1ca)]({},D,this[_0x26ab11(0x20f)]);this['_configService']['setConfig'](q,_0xc6173);}[_0x2c8270(0x1f4)](){const _0x51cb87=_0x2c8270;[[g],[C],[p]][_0x51cb87(0x225)](_0x58c002=>{const _0x4cd4e6=_0x51cb87;this[_0x4cd4e6(0x1b3)][_0x4cd4e6(0x1f1)](_0x58c002);});}[_0x2c8270(0x1c1)](){const _0x5850b3=_0x2c8270;this[_0x5850b3(0x1b3)][_0x5850b3(0x1ed)](C),this[_0x5850b3(0x1b3)]['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x2c8270(0x1fa),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c['UniverInstanceType'][_0x2c8270(0x1b0)]),exports[_0x2c8270(0x1ce)]=W([c[_0x2c8270(0x1c9)](j[_0x2c8270(0x1b6)],b[_0x2c8270(0x1ba)],T[_0x2c8270(0x1ea)]),O(0x1,c[_0x2c8270(0x20c)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x2c8270(0x1ce)]);
1
+ 'use strict';const _0x6c1fc9=_0x4aa7;(function(_0xde1ee1,_0x518142){const _0x7f3dcf=_0x4aa7,_0x2a28e2=_0xde1ee1();while(!![]){try{const _0x103f81=-parseInt(_0x7f3dcf(0x20f))/0x1+-parseInt(_0x7f3dcf(0x24e))/0x2*(parseInt(_0x7f3dcf(0x219))/0x3)+parseInt(_0x7f3dcf(0x240))/0x4+parseInt(_0x7f3dcf(0x232))/0x5*(parseInt(_0x7f3dcf(0x1fe))/0x6)+-parseInt(_0x7f3dcf(0x21d))/0x7+-parseInt(_0x7f3dcf(0x1f4))/0x8*(parseInt(_0x7f3dcf(0x235))/0x9)+-parseInt(_0x7f3dcf(0x24f))/0xa*(-parseInt(_0x7f3dcf(0x1f9))/0xb);if(_0x103f81===_0x518142)break;else _0x2a28e2['push'](_0x2a28e2['shift']());}catch(_0x5318ca){_0x2a28e2['push'](_0x2a28e2['shift']());}}}(_0xcc7f,0xf04a5));Object[_0x6c1fc9(0x23a)](exports,Symbol[_0x6c1fc9(0x21b)],{'value':_0x6c1fc9(0x261)});function _0xcc7f(){const _0x400b49=['getUnit','_initUserSync','_injector','bufferTime','replyId','Reply','content','_userService','@univerjs/network','4675750hTsTwM','UniverInstanceType','error','4640715MvMKad','post','Edit','requireSession','rangeType','defineProperty','Add','UniverLicensePlugin','find','UniverThreadCommentDataSourcePlugin','CollaborationSessionService','1195176GrabJO','_commentService','setConfig','deleteComment','map','UNIVER_UNKNOWN','values','comments','/reply','CommentService','@univerjs/thread-comment-ui','threadId','ref','length','42CIIyKL','40XmAaoH','filter','@univerjs/thread-comment','body','onStarting','reply','HTTPService','/edit','UNRECOGNIZED','OpenOrReOpen','rangeId','Delete','subscribe','commentUpdate$','Solve','solved','CustomRangeType','disposeWithMe','Module','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','resolveComment','user','/solved','Plugin','code','_config','parse','Injector','/delete','UniverCollaborationClientPlugin','userId','syncUpdateMutationToColla','Disposable','createTimestamp','symbol','24Pugnyh','root','parentId','comment','personId','9412491PKenib','@univerjs-pro/license','_sessionService','Inject','pipe','6uSNaEH','_configService','COMMENT','users','merge','dataSource','delete','_httpService','/universer-api/user/list','@univerjs-pro/collaboration-client','size','addUser','customRanges','_threadCommentModel','dayjs','add','pluginName','220992JoBebs','_init','_initDataSource','/list','unitId','getCurrentUser','UserManagerService','stringify','thread-comment-data-source.config','IConfigService','28983dcDnkx','get','toStringTag','_threadCommentDataSourceService','11911627DhyEXl','type','_threadCommentDataSource','/universer-api/comment/unit/','YYYY/MM/DD\x20HH:mm','replies','forEach','getOwnPropertyDescriptor','format','UniverThreadCommentUIPlugin','Solved','userID'];_0xcc7f=function(){return _0x400b49;};return _0xcc7f();}const b=require(_0x6c1fc9(0x207)),T=require(_0x6c1fc9(0x1fa)),c=require('@univerjs/core'),j=require(_0x6c1fc9(0x24a)),M=require(_0x6c1fc9(0x251)),w=require('rxjs'),P=require(_0x6c1fc9(0x231)),U=_0x6c1fc9(0x262);var I=(_0x58a633=>(_0x58a633[_0x58a633[_0x6c1fc9(0x258)]=0x0]=_0x6c1fc9(0x258),_0x58a633[_0x58a633[_0x6c1fc9(0x227)]=0x1]=_0x6c1fc9(0x227),_0x58a633[_0x58a633[_0x6c1fc9(0x257)]=-0x1]='UNRECOGNIZED',_0x58a633))(I||{}),v=(_0x592b56=>(_0x592b56[_0x592b56['Unknown']=0x0]='Unknown',_0x592b56[_0x592b56['Add']=0x1]=_0x6c1fc9(0x23b),_0x592b56[_0x592b56[_0x6c1fc9(0x22e)]=0x2]=_0x6c1fc9(0x22e),_0x592b56[_0x592b56['Edit']=0x3]=_0x6c1fc9(0x237),_0x592b56[_0x592b56['Delete']=0x4]=_0x6c1fc9(0x25a),_0x592b56[_0x592b56[_0x6c1fc9(0x25d)]=0x5]='Solve',_0x592b56[_0x592b56['UNRECOGNIZED']=-0x1]=_0x6c1fc9(0x257),_0x592b56))(v||{});function _0x4aa7(_0x79e61a,_0x541549){const _0xcc7fd1=_0xcc7f();return _0x4aa7=function(_0x4aa7a4,_0x16fcb0){_0x4aa7a4=_0x4aa7a4-0x1f2;let _0x5a3708=_0xcc7fd1[_0x4aa7a4];return _0x5a3708;},_0x4aa7(_0x79e61a,_0x541549);}const f=_0x2110ba=>c['dayjs'](new Date(+_0x2110ba))[_0x6c1fc9(0x225)](_0x6c1fc9(0x221)),R=async(_0xa27626,_0x3e7629)=>{const _0x5b703a=_0x6c1fc9,_0x58fc92=_0xa27626[_0x5b703a(0x21a)](c[_0x5b703a(0x215)]),_0x4404e2=_0xa27626[_0x5b703a(0x21a)](P[_0x5b703a(0x255)]);_0x3e7629[_0x5b703a(0x223)](_0x33702b=>{const _0x11d232=_0x5b703a;_0x58fc92['getUser'](_0x33702b)&&_0x3e7629[_0x11d232(0x204)](_0x33702b);}),_0x3e7629[_0x5b703a(0x208)]&&(await _0x4404e2[_0x5b703a(0x21a)](_0x5b703a(0x206),{'params':{'userIDs':[..._0x3e7629]}}))['body']['users'][_0x5b703a(0x223)](_0x296193=>{_0x296193&&_0x58fc92['addUser'](_0x296193);});};var $=Object[_0x6c1fc9(0x224)],E=(_0x42db60,_0x3aa96e,_0x519d3e,_0x2b7f57)=>{for(var _0x8da3ee=_0x2b7f57>0x1?void 0x0:_0x2b7f57?$(_0x3aa96e,_0x519d3e):_0x3aa96e,_0x2164be=_0x42db60['length']-0x1,_0x53857d;_0x2164be>=0x0;_0x2164be--)(_0x53857d=_0x42db60[_0x2164be])&&(_0x8da3ee=_0x53857d(_0x8da3ee)||_0x8da3ee);return _0x8da3ee;},S=(_0x101cec,_0x547c83)=>(_0xb98763,_0xdcae30)=>_0x547c83(_0xb98763,_0xdcae30,_0x101cec);let p=class extends c[_0x6c1fc9(0x270)]{constructor(_0xa46fb7,_0x3ecb09,_0x59fced,_0x1be660){const _0x1c3801=_0x6c1fc9;super(),this['_commentService']=_0xa46fb7,this[_0x1c3801(0x20b)]=_0x3ecb09,this[_0x1c3801(0x230)]=_0x59fced,this[_0x1c3801(0x22b)]=_0x1be660,this[_0x1c3801(0x210)](),this[_0x1c3801(0x22a)]();}[_0x6c1fc9(0x22a)](){const _0x4da515=_0x6c1fc9;this[_0x4da515(0x260)](this['_threadCommentModel'][_0x4da515(0x25c)][_0x4da515(0x1fd)](w[_0x4da515(0x22c)](0x10))[_0x4da515(0x25b)](_0xc40857=>{const _0x21b83c=_0x4da515,_0x441bdb=new Set();_0xc40857[_0x21b83c(0x223)](_0x3acb7b=>{const _0x50d796=_0x21b83c;switch(_0x3acb7b[_0x50d796(0x21e)]){case _0x50d796(0x20d):{const _0x5b0b00=_0x3acb7b['payload'][_0x50d796(0x1f8)];_0x441bdb[_0x50d796(0x20d)](_0x5b0b00);break;}}}),R(this['_injector'],_0x441bdb);}));}['_init'](){const _0x4d2a4b=_0x6c1fc9;this['disposeWithMe'](this[_0x4d2a4b(0x241)]['commentUpdate$']['subscribe'](async _0x5affb8=>{const _0x500036=_0x4d2a4b;var _0x7e71d9,_0x10e91e,_0x2c7434,_0xf28d8f;const _0x205636=(_0x7e71d9=this[_0x500036(0x20b)][_0x500036(0x229)](_0x5affb8[_0x500036(0x213)])[_0x500036(0x23d)](_0x14adfb=>_0x14adfb[_0x500036(0x24b)]===_0x5affb8[_0x500036(0x24b)]))==null?void 0x0:_0x7e71d9[_0x500036(0x1f5)];if(!_0x205636)return;const {unitId:_0x1b030d,subUnitId:_0x3d40e6}=_0x205636;switch(_0x5affb8['user']&&this[_0x500036(0x230)][_0x500036(0x209)](_0x5affb8['user']),_0x5affb8[_0x500036(0x21e)]){case v[_0x500036(0x23b)]:break;case v['Reply']:{this[_0x500036(0x20b)]['addComment'](_0x1b030d,_0x3d40e6,{'unitId':_0x1b030d,'subUnitId':_0x3d40e6,'ref':'','id':_0x5affb8[_0x500036(0x22d)],'dT':f(+_0x5affb8[_0x500036(0x1f2)]),'threadId':_0x5affb8[_0x500036(0x24b)],'personId':(_0x2c7434=(_0x10e91e=_0x5affb8[_0x500036(0x265)])==null?void 0x0:_0x10e91e[_0x500036(0x228)])!=null?_0x2c7434:_0x5affb8['userId'],'text':JSON[_0x500036(0x26a)](_0x5affb8['content']),'parentId':_0x205636['id']});break;}case v[_0x500036(0x25a)]:{const _0x52f4ae=this[_0x500036(0x20b)]['getComment'](_0x1b030d,_0x3d40e6,_0x5affb8[_0x500036(0x22d)]);_0x52f4ae&&_0x52f4ae[_0x500036(0x1f6)]&&this[_0x500036(0x20b)][_0x500036(0x243)](_0x1b030d,_0x3d40e6,_0x5affb8['replyId']);break;}case v[_0x500036(0x237)]:{this['_threadCommentModel']['updateComment'](_0x1b030d,_0x3d40e6,{'commentId':_0x5affb8['replyId'],'text':JSON[_0x500036(0x26a)](_0x5affb8[_0x500036(0x22f)])});break;}case v[_0x500036(0x25d)]:{const _0x4df5bf=(_0xf28d8f=this[_0x500036(0x20b)][_0x500036(0x229)](_0x5affb8[_0x500036(0x213)])['find'](_0x4ea696=>_0x4ea696[_0x500036(0x24b)]===_0x5affb8[_0x500036(0x24b)]))==null?void 0x0:_0xf28d8f[_0x500036(0x1f5)];_0x4df5bf&&this['_threadCommentModel']['resolveComment'](_0x1b030d,_0x3d40e6,_0x4df5bf['id'],_0x5affb8['solved']===I[_0x500036(0x227)]);break;}}}));}};p=E([S(0x0,c[_0x6c1fc9(0x1fc)](b[_0x6c1fc9(0x249)])),S(0x1,c[_0x6c1fc9(0x1fc)](M['ThreadCommentModel'])),S(0x2,c[_0x6c1fc9(0x1fc)](c[_0x6c1fc9(0x215)])),S(0x3,c[_0x6c1fc9(0x1fc)](c[_0x6c1fc9(0x26b)]))],p);const q=_0x6c1fc9(0x217),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x226412,_0x3e4ee1,_0xea2260,_0x29cef0)=>{const _0x3ee8b4=_0x6c1fc9;for(var _0x39e24e=_0x29cef0>0x1?void 0x0:_0x29cef0?A(_0x3e4ee1,_0xea2260):_0x3e4ee1,_0x2f7acf=_0x226412[_0x3ee8b4(0x24d)]-0x1,_0x9f773;_0x2f7acf>=0x0;_0x2f7acf--)(_0x9f773=_0x226412[_0x2f7acf])&&(_0x39e24e=_0x9f773(_0x39e24e)||_0x39e24e);return _0x39e24e;},_=(_0x1c4226,_0x225e89)=>(_0xb917c2,_0x502dab)=>_0x225e89(_0xb917c2,_0x502dab,_0x1c4226);function Y(_0x1e00e5,_0x3ce487){const _0x3d8104=_0x6c1fc9,_0x72fff5=_0x1e00e5[_0x3d8104(0x222)][0x0];return{..._0x3ce487,'id':_0x72fff5[_0x3d8104(0x22d)],'resolved':_0x1e00e5[_0x3d8104(0x25e)]===0x1,'dT':f(_0x72fff5['createTimestamp']),'personId':_0x72fff5[_0x3d8104(0x26e)],'threadId':_0x72fff5['threadId']};}function G(_0xe34498,_0x1c7289,_0x5ea3da){const _0x749201=_0x6c1fc9;var _0x2f3d29,_0x229165;if(((_0x229165=(_0x2f3d29=_0xe34498==null?void 0x0:_0xe34498[_0x749201(0x222)])==null?void 0x0:_0x2f3d29[_0x749201(0x24d)])!=null?_0x229165:0x0)>0x0){const _0x238fdf=(_0x434522,_0x1dc683)=>({'id':_0x434522[_0x749201(0x22d)],'threadId':_0x434522[_0x749201(0x24b)],'dT':f(_0x434522[_0x749201(0x1f2)]),'personId':_0x434522[_0x749201(0x26e)],'resolved':_0xe34498[_0x749201(0x25e)]===I[_0x749201(0x227)],'unitId':_0x1c7289,'subUnitId':_0x5ea3da,'text':JSON['parse'](_0x434522[_0x749201(0x22f)]),'parentId':_0x1dc683}),_0x1699e3=_0x238fdf(_0xe34498[_0x749201(0x222)][0x0]);return{..._0x1699e3,'children':_0xe34498['replies']['slice'](0x1)[_0x749201(0x244)](_0x1d0a39=>_0x238fdf(_0x1d0a39,_0x1699e3['id']))};}return null;}let g=class{constructor(_0x56ed14,_0x3e9b53,_0x39f2e6,_0x283149){const _0x2bc594=_0x6c1fc9;this[_0x2bc594(0x205)]=_0x56ed14,this[_0x2bc594(0x230)]=_0x3e9b53,this['_sessionService']=_0x39f2e6,this[_0x2bc594(0x22b)]=_0x283149;}async['addComment'](_0x51b194){const _0x30b3af=_0x6c1fc9;var _0x5c04e3,_0x8611a1;const {parentId:_0x5c1fb1,unitId:_0x43e34b,text:_0x531f21,threadId:_0x24df69}=_0x51b194,_0x41017c=(_0x8611a1=(_0x5c04e3=_0x531f21[_0x30b3af(0x20a)])==null?void 0x0:_0x5c04e3[_0x30b3af(0x250)](_0x50dbd3=>_0x50dbd3[_0x30b3af(0x239)]===c[_0x30b3af(0x25f)][_0x30b3af(0x200)])['map'](_0x1f7bd1=>_0x1f7bd1[_0x30b3af(0x259)]))!=null?_0x8611a1:[],_0x24aaee=JSON[_0x30b3af(0x216)](_0x531f21),_0x4b7c40=(await this[_0x30b3af(0x1fb)][_0x30b3af(0x238)](_0x43e34b))[_0x30b3af(0x263)]();if(_0x5c1fb1){const _0x1319d9={'memberId':_0x4b7c40,'unitId':_0x43e34b,'content':_0x24aaee,'mention':_0x41017c,'threadId':_0x24df69},_0x332f45=(await this[_0x30b3af(0x205)]['post'](_0x30b3af(0x220)+_0x43e34b+_0x30b3af(0x248),{'body':_0x1319d9}))[_0x30b3af(0x252)][_0x30b3af(0x254)];return{..._0x51b194,'id':_0x332f45[_0x30b3af(0x22d)],'dT':c[_0x30b3af(0x20c)](+_0x332f45[_0x30b3af(0x1f2)])[_0x30b3af(0x225)](_0x30b3af(0x221)),'personId':_0x332f45[_0x30b3af(0x26e)]};}else{const _0xd322ed={'memberId':_0x4b7c40,'unitId':_0x43e34b,'content':_0x24aaee,'mention':_0x41017c},_0x38cd03=await this[_0x30b3af(0x205)][_0x30b3af(0x236)]('/universer-api/comment/unit/'+_0x43e34b+'/add',{'body':_0xd322ed});return Y(_0x38cd03[_0x30b3af(0x252)][_0x30b3af(0x1f7)],_0x51b194);}}async['updateComment'](_0x925af4){const _0x10b040=_0x6c1fc9;var _0x4f9229,_0x2e766e;const {text:_0x62ebc2,unitId:_0x2989b8}=_0x925af4,_0x2f6f84=(_0x2e766e=(_0x4f9229=_0x62ebc2[_0x10b040(0x20a)])==null?void 0x0:_0x4f9229[_0x10b040(0x250)](_0x50e19f=>_0x50e19f[_0x10b040(0x239)]===c[_0x10b040(0x25f)][_0x10b040(0x200)])[_0x10b040(0x244)](_0x2dfa80=>_0x2dfa80[_0x10b040(0x259)]))!=null?_0x2e766e:[],_0x3b1bdd=JSON['stringify'](_0x62ebc2),_0x113ef2=_0x925af4[_0x10b040(0x24b)],_0x5cd6b6=_0x925af4['id'],_0x3f182c={'memberId':(await this[_0x10b040(0x1fb)][_0x10b040(0x238)](_0x2989b8))[_0x10b040(0x263)](),'unitId':_0x2989b8,'threadId':_0x113ef2,'mention':_0x2f6f84,'content':_0x3b1bdd,'replyId':_0x5cd6b6},_0x42ac40=await this[_0x10b040(0x205)][_0x10b040(0x236)](_0x10b040(0x220)+_0x2989b8+_0x10b040(0x256),{'body':_0x3f182c});return!_0x42ac40[_0x10b040(0x252)]['error']||_0x42ac40[_0x10b040(0x252)][_0x10b040(0x234)]['code']===0x1;}async[_0x6c1fc9(0x264)](_0x399979){const _0x1cc023=_0x6c1fc9,{unitId:_0x1f88ba}=_0x399979,_0x44347a=_0x399979[_0x1cc023(0x24b)],_0x3deace={'memberId':this['_userService'][_0x1cc023(0x214)]()[_0x1cc023(0x228)],'unitId':_0x1f88ba,'threadId':_0x44347a,'solved':_0x399979['resolved']?I[_0x1cc023(0x227)]:I[_0x1cc023(0x258)]},_0x1ecf60=await this[_0x1cc023(0x205)][_0x1cc023(0x236)]('/universer-api/comment/unit/'+_0x1f88ba+_0x1cc023(0x266),{'body':_0x3deace});return!_0x1ecf60[_0x1cc023(0x252)][_0x1cc023(0x234)]||_0x1ecf60[_0x1cc023(0x252)][_0x1cc023(0x234)][_0x1cc023(0x268)]===0x1;}async[_0x6c1fc9(0x243)](_0x6b59bf,_0x1378e2,_0x416d69,_0x554021){const _0x3aa024=_0x6c1fc9,_0x5e289c={'memberId':(await this[_0x3aa024(0x1fb)]['requireSession'](_0x6b59bf))[_0x3aa024(0x263)](),'threadId':_0x416d69,'replyId':_0x554021,'unitId':_0x6b59bf},_0x381325=await this[_0x3aa024(0x205)][_0x3aa024(0x236)](_0x3aa024(0x220)+_0x6b59bf+_0x3aa024(0x26c),{'body':_0x5e289c});return!_0x381325[_0x3aa024(0x252)][_0x3aa024(0x234)]||_0x381325[_0x3aa024(0x252)][_0x3aa024(0x234)][_0x3aa024(0x268)]===0x1;}async['listComments'](_0x46d5bd,_0x1a444b,_0xf4c509){const _0x1dbc93=_0x6c1fc9,_0x5ce66e={'unitId':_0x46d5bd,'threadId':_0xf4c509},_0x350264=await this[_0x1dbc93(0x205)][_0x1dbc93(0x236)](_0x1dbc93(0x220)+_0x46d5bd+_0x1dbc93(0x212),{'body':_0x5ce66e}),_0x58a3c9=_0xf4c509[_0x1dbc93(0x244)](_0x18004c=>G(_0x350264[_0x1dbc93(0x252)][_0x1dbc93(0x247)][_0x18004c],_0x46d5bd,_0x1a444b))[_0x1dbc93(0x250)](Boolean);return Object[_0x1dbc93(0x246)](_0x350264[_0x1dbc93(0x252)][_0x1dbc93(0x201)])[_0x1dbc93(0x223)](_0x2de05b=>{const _0x3f204f=_0x1dbc93;this[_0x3f204f(0x230)][_0x3f204f(0x209)](_0x2de05b);}),_0x58a3c9;}['saveCommentToSnapshot'](_0x2cfa81){const _0x51b800=_0x6c1fc9;return{'id':_0x2cfa81['id'],'threadId':_0x2cfa81[_0x51b800(0x24b)],'ref':_0x2cfa81[_0x51b800(0x24c)]};}};g=x([_(0x0,c[_0x6c1fc9(0x1fc)](P[_0x6c1fc9(0x255)])),_(0x1,c[_0x6c1fc9(0x1fc)](c[_0x6c1fc9(0x215)])),_(0x2,c['Inject'](b[_0x6c1fc9(0x23f)])),_(0x3,c[_0x6c1fc9(0x1fc)](c['Injector']))],g);var H=Object[_0x6c1fc9(0x224)],J=(_0xa8fa85,_0x2acb3f,_0x1dfa21,_0x157a91)=>{const _0x8c2da8=_0x6c1fc9;for(var _0x38ca4c=_0x157a91>0x1?void 0x0:_0x157a91?H(_0x2acb3f,_0x1dfa21):_0x2acb3f,_0x1c4bc0=_0xa8fa85[_0x8c2da8(0x24d)]-0x1,_0x204ab8;_0x1c4bc0>=0x0;_0x1c4bc0--)(_0x204ab8=_0xa8fa85[_0x1c4bc0])&&(_0x38ca4c=_0x204ab8(_0x38ca4c)||_0x38ca4c);return _0x38ca4c;},y=(_0x3ab31e,_0x2da06d)=>(_0x3d6aa2,_0x1d6a16)=>_0x2da06d(_0x3d6aa2,_0x1d6a16,_0x3ab31e);let C=class extends c[_0x6c1fc9(0x270)]{constructor(_0x53f800,_0x2c7c0e){const _0x15911f=_0x6c1fc9;super(),this[_0x15911f(0x21c)]=_0x53f800,this['_threadCommentDataSource']=_0x2c7c0e,this[_0x15911f(0x211)]();}['_initDataSource'](){const _0x2d22e5=_0x6c1fc9;this[_0x2d22e5(0x21c)][_0x2d22e5(0x203)]=this[_0x2d22e5(0x21f)],this[_0x2d22e5(0x21c)][_0x2d22e5(0x26f)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object['defineProperty'],L=Object[_0x6c1fc9(0x224)],Z=(_0x41b198,_0x4d54cd,_0x33f873)=>_0x4d54cd in _0x41b198?F(_0x41b198,_0x4d54cd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x33f873}):_0x41b198[_0x4d54cd]=_0x33f873,W=(_0x5f5986,_0x6f221e,_0x2e9d65,_0x5666f)=>{const _0x5838ad=_0x6c1fc9;for(var _0x5bcd44=_0x5666f>0x1?void 0x0:_0x5666f?L(_0x6f221e,_0x2e9d65):_0x6f221e,_0x2f7e50=_0x5f5986[_0x5838ad(0x24d)]-0x1,_0x5418e7;_0x2f7e50>=0x0;_0x2f7e50--)(_0x5418e7=_0x5f5986[_0x2f7e50])&&(_0x5bcd44=_0x5418e7(_0x5bcd44)||_0x5bcd44);return _0x5bcd44;},O=(_0x2bdbab,_0xa4ae00)=>(_0x4652e3,_0x57796e)=>_0xa4ae00(_0x4652e3,_0x57796e,_0x2bdbab),N=(_0x252b2b,_0x4069ae,_0x4635b3)=>Z(_0x252b2b,typeof _0x4069ae!=_0x6c1fc9(0x1f3)?_0x4069ae+'':_0x4069ae,_0x4635b3);exports[_0x6c1fc9(0x23e)]=class extends c[_0x6c1fc9(0x267)]{constructor(_0x4adc21=D,_0x1af92b,_0x21319d){const _0x174898=_0x6c1fc9;super(),this[_0x174898(0x269)]=_0x4adc21,this[_0x174898(0x22b)]=_0x1af92b,this[_0x174898(0x1ff)]=_0x21319d;const {..._0x101070}=c[_0x174898(0x202)]({},D,this[_0x174898(0x269)]);this[_0x174898(0x1ff)][_0x174898(0x242)](q,_0x101070);}[_0x6c1fc9(0x253)](){const _0x4c057d=_0x6c1fc9;[[g],[C],[p]][_0x4c057d(0x223)](_0x2e5b3e=>{const _0x375011=_0x4c057d;this[_0x375011(0x22b)][_0x375011(0x20d)](_0x2e5b3e);});}['onReady'](){const _0x1cb355=_0x6c1fc9;this[_0x1cb355(0x22b)][_0x1cb355(0x21a)](C),this[_0x1cb355(0x22b)][_0x1cb355(0x21a)](p);}},N(exports[_0x6c1fc9(0x23e)],_0x6c1fc9(0x20e),U),N(exports[_0x6c1fc9(0x23e)],_0x6c1fc9(0x21e),c[_0x6c1fc9(0x233)][_0x6c1fc9(0x245)]),exports[_0x6c1fc9(0x23e)]=W([c['DependentOn'](j[_0x6c1fc9(0x226)],b[_0x6c1fc9(0x26d)],T[_0x6c1fc9(0x23c)]),O(0x1,c['Inject'](c[_0x6c1fc9(0x26b)])),O(0x2,c[_0x6c1fc9(0x218)])],exports[_0x6c1fc9(0x23e)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x118477=_0xe34e;(function(_0x356792,_0x421ed7){const _0x2d36a1=_0xe34e,_0x9bf74=_0x356792();while(!![]){try{const _0x171318=-parseInt(_0x2d36a1(0xf2))/0x1+parseInt(_0x2d36a1(0x123))/0x2*(-parseInt(_0x2d36a1(0x134))/0x3)+parseInt(_0x2d36a1(0x13d))/0x4*(parseInt(_0x2d36a1(0x12f))/0x5)+parseInt(_0x2d36a1(0x10d))/0x6+parseInt(_0x2d36a1(0x14b))/0x7+-parseInt(_0x2d36a1(0x12d))/0x8*(parseInt(_0x2d36a1(0x130))/0x9)+parseInt(_0x2d36a1(0x102))/0xa;if(_0x171318===_0x421ed7)break;else _0x9bf74['push'](_0x9bf74['shift']());}catch(_0x4edaba){_0x9bf74['push'](_0x9bf74['shift']());}}}(_0x36d7,0xd0d28));import{CommentService as _0x1448e6,CollaborationSessionService as _0x2a8abb,UniverCollaborationClientPlugin as _0x243904}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4f60b2}from'@univerjs-pro/license';import{dayjs as _0x296005,UserManagerService as _0xca3c4f,Inject as _0x1ab595,Injector as _0x3a9059,Disposable as _0x4abb9d,CustomRangeType as _0x10593c,UniverInstanceType as _0x7eb5b0,DependentOn as _0x652ecb,IConfigService as _0x49fb74,Plugin as _0x5214e1,merge as _0x5d8e9c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x255d00}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1fe52e,IThreadCommentDataSourceService as _0x37829d}from'@univerjs/thread-comment';import{bufferTime as _0x1403eb}from'rxjs';import{HTTPService as _0x1b49ae}from'@univerjs/network';const W=_0x118477(0x10c);var I=(_0x13c7fe=>(_0x13c7fe[_0x13c7fe['OpenOrReOpen']=0x0]=_0x118477(0x13c),_0x13c7fe[_0x13c7fe[_0x118477(0x10b)]=0x1]=_0x118477(0x10b),_0x13c7fe[_0x13c7fe[_0x118477(0xf8)]=-0x1]=_0x118477(0xf8),_0x13c7fe))(I||{}),v=(_0x5f4174=>(_0x5f4174[_0x5f4174[_0x118477(0x101)]=0x0]=_0x118477(0x101),_0x5f4174[_0x5f4174[_0x118477(0xef)]=0x1]=_0x118477(0xef),_0x5f4174[_0x5f4174[_0x118477(0x138)]=0x2]=_0x118477(0x138),_0x5f4174[_0x5f4174[_0x118477(0xfa)]=0x3]='Edit',_0x5f4174[_0x5f4174['Delete']=0x4]=_0x118477(0x127),_0x5f4174[_0x5f4174[_0x118477(0x122)]=0x5]='Solve',_0x5f4174[_0x5f4174[_0x118477(0xf8)]=-0x1]=_0x118477(0xf8),_0x5f4174))(v||{});const D=_0x1dc453=>_0x296005(new Date(+_0x1dc453))[_0x118477(0x108)](_0x118477(0x13b)),B=async(_0xc92a9f,_0x376fea)=>{const _0x4e178a=_0x118477,_0x322ed4=_0xc92a9f[_0x4e178a(0x126)](_0xca3c4f),_0x398372=_0xc92a9f[_0x4e178a(0x126)](_0x1b49ae);_0x376fea[_0x4e178a(0x14e)](_0x42be50=>{_0x322ed4['getUser'](_0x42be50)&&_0x376fea['delete'](_0x42be50);}),_0x376fea[_0x4e178a(0xfb)]&&(await _0x398372[_0x4e178a(0x126)](_0x4e178a(0x124),{'params':{'userIDs':[..._0x376fea]}}))['body'][_0x4e178a(0x13a)][_0x4e178a(0x14e)](_0x6f3e97=>{const _0x2fe8b9=_0x4e178a;_0x6f3e97&&_0x322ed4[_0x2fe8b9(0xfe)](_0x6f3e97);});};var K=Object[_0x118477(0x11b)],V=(_0x3d39c3,_0x5f4370,_0x1ed8f7,_0x48dc82)=>{const _0x4e890e=_0x118477;for(var _0x58e24f=_0x48dc82>0x1?void 0x0:_0x48dc82?K(_0x5f4370,_0x1ed8f7):_0x5f4370,_0x29d8a7=_0x3d39c3[_0x4e890e(0x141)]-0x1,_0x468cbe;_0x29d8a7>=0x0;_0x29d8a7--)(_0x468cbe=_0x3d39c3[_0x29d8a7])&&(_0x58e24f=_0x468cbe(_0x58e24f)||_0x58e24f);return _0x58e24f;},p=(_0x5dd42c,_0x580dc0)=>(_0x4dec05,_0x2409d8)=>_0x580dc0(_0x4dec05,_0x2409d8,_0x5dd42c);function _0x36d7(){const _0x294c58=['onStarting','onReady','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2180784XrkWAa','content','replies','user','resolved','threadId','updateComment','subscribe','_init','_config','/reply','disposeWithMe','_commentService','add','getOwnPropertyDescriptor','symbol','_threadCommentDataSource','body','_threadCommentModel','reply','saveCommentToSnapshot','Solve','58UmgRaM','/universer-api/user/list','createTimestamp','get','Delete','userID','_httpService','find','map','customRanges','16XjotCw','parentId','28990nQXqNv','6921549SSRdRC','post','getMemberID','_initDataSource','154731ZzSdml','replyId','rangeId','setConfig','Reply','type','users','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','92BDjrTF','requireSession','solved','pluginName','length','rangeType','COMMENT','deleteComment','userId','UNIVER_UNKNOWN','_configService','unitId','code','thread-comment-data-source.config','2792944shbMQL','_injector','getCurrentUser','forEach','stringify','Add','getUnit','addComment','1183907CTygxX','slice','commentUpdate$','payload','_initUserSync','_sessionService','UNRECOGNIZED','/universer-api/comment/unit/','Edit','size','error','filter','addUser','_threadCommentDataSourceService','root','Unknown','41772880dDYuKy','ref','resolveComment','values','/delete','_userService','format'];_0x36d7=function(){return _0x294c58;};return _0x36d7();}let S=class extends _0x4abb9d{constructor(_0x32cc53,_0x2eedc6,_0x32ddad,_0x2e2d90){const _0x37de2a=_0x118477;super(),this[_0x37de2a(0x119)]=_0x32cc53,this[_0x37de2a(0x11f)]=_0x2eedc6,this['_userService']=_0x32ddad,this[_0x37de2a(0x14c)]=_0x2e2d90,this[_0x37de2a(0x115)](),this[_0x37de2a(0xf6)]();}[_0x118477(0xf6)](){const _0xd3df71=_0x118477;this[_0xd3df71(0x118)](this[_0xd3df71(0x11f)][_0xd3df71(0xf4)]['pipe'](_0x1403eb(0x10))[_0xd3df71(0x114)](_0x1becab=>{const _0x54b6a2=_0xd3df71,_0x1b030b=new Set();_0x1becab[_0x54b6a2(0x14e)](_0x355b96=>{const _0x381ec4=_0x54b6a2;switch(_0x355b96['type']){case _0x381ec4(0x11a):{const _0x5838f2=_0x355b96[_0x381ec4(0xf5)]['personId'];_0x1b030b[_0x381ec4(0x11a)](_0x5838f2);break;}}}),B(this[_0x54b6a2(0x14c)],_0x1b030b);}));}['_init'](){const _0x3b8eac=_0x118477;this[_0x3b8eac(0x118)](this[_0x3b8eac(0x119)][_0x3b8eac(0xf4)]['subscribe'](async _0x5deda8=>{const _0x1f6b8b=_0x3b8eac;var _0x3852ed,_0x21f3d0,_0x534d04,_0x4d992c;const _0x4f73e3=(_0x3852ed=this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf0)](_0x5deda8[_0x1f6b8b(0x148)])[_0x1f6b8b(0x12a)](_0x16eb4c=>_0x16eb4c[_0x1f6b8b(0x112)]===_0x5deda8[_0x1f6b8b(0x112)]))==null?void 0x0:_0x3852ed[_0x1f6b8b(0x100)];if(!_0x4f73e3)return;const {unitId:_0x3717ab,subUnitId:_0x4ca158}=_0x4f73e3;switch(_0x5deda8[_0x1f6b8b(0x110)]&&this[_0x1f6b8b(0x107)][_0x1f6b8b(0xfe)](_0x5deda8[_0x1f6b8b(0x110)]),_0x5deda8[_0x1f6b8b(0x139)]){case v['Add']:break;case v[_0x1f6b8b(0x138)]:{this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf1)](_0x3717ab,_0x4ca158,{'unitId':_0x3717ab,'subUnitId':_0x4ca158,'ref':'','id':_0x5deda8[_0x1f6b8b(0x135)],'dT':D(+_0x5deda8[_0x1f6b8b(0x125)]),'threadId':_0x5deda8['threadId'],'personId':(_0x534d04=(_0x21f3d0=_0x5deda8['user'])==null?void 0x0:_0x21f3d0[_0x1f6b8b(0x128)])!=null?_0x534d04:_0x5deda8['userId'],'text':JSON['parse'](_0x5deda8[_0x1f6b8b(0x10e)]),'parentId':_0x4f73e3['id']});break;}case v[_0x1f6b8b(0x127)]:{const _0x325985=this[_0x1f6b8b(0x11f)]['getComment'](_0x3717ab,_0x4ca158,_0x5deda8[_0x1f6b8b(0x135)]);_0x325985&&_0x325985[_0x1f6b8b(0x12e)]&&this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x144)](_0x3717ab,_0x4ca158,_0x5deda8[_0x1f6b8b(0x135)]);break;}case v[_0x1f6b8b(0xfa)]:{this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x113)](_0x3717ab,_0x4ca158,{'commentId':_0x5deda8['replyId'],'text':JSON['parse'](_0x5deda8[_0x1f6b8b(0x10e)])});break;}case v[_0x1f6b8b(0x122)]:{const _0x4ce40f=(_0x4d992c=this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf0)](_0x5deda8['unitId'])[_0x1f6b8b(0x12a)](_0xffd30a=>_0xffd30a[_0x1f6b8b(0x112)]===_0x5deda8[_0x1f6b8b(0x112)]))==null?void 0x0:_0x4d992c[_0x1f6b8b(0x100)];_0x4ce40f&&this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x104)](_0x3717ab,_0x4ca158,_0x4ce40f['id'],_0x5deda8[_0x1f6b8b(0x13f)]===I[_0x1f6b8b(0x10b)]);break;}}}));}};S=V([p(0x0,_0x1ab595(_0x1448e6)),p(0x1,_0x1ab595(_0x1fe52e)),p(0x2,_0x1ab595(_0xca3c4f)),p(0x3,_0x1ab595(_0x3a9059))],S);const z=_0x118477(0x14a),M={};var k=Object[_0x118477(0x11b)],Q=(_0x1e4742,_0x4d3e9a,_0x273d1d,_0x4f2df3)=>{const _0x27aca1=_0x118477;for(var _0x3be03b=_0x4f2df3>0x1?void 0x0:_0x4f2df3?k(_0x4d3e9a,_0x273d1d):_0x4d3e9a,_0xbf39fa=_0x1e4742[_0x27aca1(0x141)]-0x1,_0x300423;_0xbf39fa>=0x0;_0xbf39fa--)(_0x300423=_0x1e4742[_0xbf39fa])&&(_0x3be03b=_0x300423(_0x3be03b)||_0x3be03b);return _0x3be03b;},_=(_0x45c4c3,_0x447a68)=>(_0x5e19d6,_0x29c6d5)=>_0x447a68(_0x5e19d6,_0x29c6d5,_0x45c4c3);function X(_0x54f60b,_0xbb5053){const _0x56a932=_0x118477,_0x25e1bc=_0x54f60b[_0x56a932(0x10f)][0x0];return{..._0xbb5053,'id':_0x25e1bc['replyId'],'resolved':_0x54f60b['solved']===0x1,'dT':D(_0x25e1bc['createTimestamp']),'personId':_0x25e1bc['userId'],'threadId':_0x25e1bc[_0x56a932(0x112)]};}function ee(_0x8ad35d,_0x1fa37d,_0x2f5dca){const _0x123d9f=_0x118477;var _0x20fce6,_0x378fcc;if(((_0x378fcc=(_0x20fce6=_0x8ad35d==null?void 0x0:_0x8ad35d[_0x123d9f(0x10f)])==null?void 0x0:_0x20fce6[_0x123d9f(0x141)])!=null?_0x378fcc:0x0)>0x0){const _0x424112=(_0x34cc90,_0x201ad9)=>({'id':_0x34cc90[_0x123d9f(0x135)],'threadId':_0x34cc90[_0x123d9f(0x112)],'dT':D(_0x34cc90[_0x123d9f(0x125)]),'personId':_0x34cc90[_0x123d9f(0x145)],'resolved':_0x8ad35d['solved']===I['Solved'],'unitId':_0x1fa37d,'subUnitId':_0x2f5dca,'text':JSON['parse'](_0x34cc90[_0x123d9f(0x10e)]),'parentId':_0x201ad9}),_0x5a2f81=_0x424112(_0x8ad35d[_0x123d9f(0x10f)][0x0]);return{..._0x5a2f81,'children':_0x8ad35d[_0x123d9f(0x10f)][_0x123d9f(0xf3)](0x1)[_0x123d9f(0x12b)](_0x3af4cb=>_0x424112(_0x3af4cb,_0x5a2f81['id']))};}return null;}let f=class{constructor(_0x2e4232,_0x571946,_0x2b2350,_0x5aa143){const _0x555bb2=_0x118477;this[_0x555bb2(0x129)]=_0x2e4232,this[_0x555bb2(0x107)]=_0x571946,this['_sessionService']=_0x2b2350,this[_0x555bb2(0x14c)]=_0x5aa143;}async[_0x118477(0xf1)](_0x3278bc){const _0x3288cb=_0x118477;var _0x9670c2,_0x8a2778;const {parentId:_0x84bda0,unitId:_0x1c265d,text:_0x1a4439,threadId:_0x957720}=_0x3278bc,_0xf022dd=(_0x8a2778=(_0x9670c2=_0x1a4439[_0x3288cb(0x12c)])==null?void 0x0:_0x9670c2[_0x3288cb(0xfd)](_0x3e8fe1=>_0x3e8fe1[_0x3288cb(0x142)]===_0x10593c['COMMENT'])[_0x3288cb(0x12b)](_0x117e9c=>_0x117e9c[_0x3288cb(0x136)]))!=null?_0x8a2778:[],_0x4b994c=JSON[_0x3288cb(0x14f)](_0x1a4439),_0x329119=(await this[_0x3288cb(0xf7)]['requireSession'](_0x1c265d))['getMemberID']();if(_0x84bda0){const _0x2dc62a={'memberId':_0x329119,'unitId':_0x1c265d,'content':_0x4b994c,'mention':_0xf022dd,'threadId':_0x957720},_0x1c52c3=(await this['_httpService'][_0x3288cb(0x131)]('/universer-api/comment/unit/'+_0x1c265d+_0x3288cb(0x117),{'body':_0x2dc62a}))[_0x3288cb(0x11e)][_0x3288cb(0x120)];return{..._0x3278bc,'id':_0x1c52c3[_0x3288cb(0x135)],'dT':_0x296005(+_0x1c52c3[_0x3288cb(0x125)])['format'](_0x3288cb(0x13b)),'personId':_0x1c52c3[_0x3288cb(0x145)]};}else{const _0x2b64c6={'memberId':_0x329119,'unitId':_0x1c265d,'content':_0x4b994c,'mention':_0xf022dd},_0x24c3c7=await this['_httpService'][_0x3288cb(0x131)](_0x3288cb(0xf9)+_0x1c265d+'/add',{'body':_0x2b64c6});return X(_0x24c3c7[_0x3288cb(0x11e)]['comment'],_0x3278bc);}}async[_0x118477(0x113)](_0xe00c8f){const _0x57a494=_0x118477;var _0x47ef0b,_0x53da94;const {text:_0x86bad4,unitId:_0x212f2f}=_0xe00c8f,_0x50b099=(_0x53da94=(_0x47ef0b=_0x86bad4[_0x57a494(0x12c)])==null?void 0x0:_0x47ef0b[_0x57a494(0xfd)](_0x1be0d1=>_0x1be0d1['rangeType']===_0x10593c[_0x57a494(0x143)])['map'](_0x3e5b82=>_0x3e5b82[_0x57a494(0x136)]))!=null?_0x53da94:[],_0x2af862=JSON[_0x57a494(0x14f)](_0x86bad4),_0x3ccbb9=_0xe00c8f['threadId'],_0x3d1289=_0xe00c8f['id'],_0x2bedaf={'memberId':(await this[_0x57a494(0xf7)][_0x57a494(0x13e)](_0x212f2f))['getMemberID'](),'unitId':_0x212f2f,'threadId':_0x3ccbb9,'mention':_0x50b099,'content':_0x2af862,'replyId':_0x3d1289},_0x14cadf=await this[_0x57a494(0x129)][_0x57a494(0x131)]('/universer-api/comment/unit/'+_0x212f2f+'/edit',{'body':_0x2bedaf});return!_0x14cadf[_0x57a494(0x11e)]['error']||_0x14cadf[_0x57a494(0x11e)]['error']['code']===0x1;}async[_0x118477(0x104)](_0x4f3a82){const _0x2ccdf9=_0x118477,{unitId:_0xcabc6a}=_0x4f3a82,_0x53252e=_0x4f3a82['threadId'],_0x176400={'memberId':this[_0x2ccdf9(0x107)][_0x2ccdf9(0x14d)]()[_0x2ccdf9(0x128)],'unitId':_0xcabc6a,'threadId':_0x53252e,'solved':_0x4f3a82[_0x2ccdf9(0x111)]?I['Solved']:I[_0x2ccdf9(0x13c)]},_0x1ad112=await this[_0x2ccdf9(0x129)][_0x2ccdf9(0x131)](_0x2ccdf9(0xf9)+_0xcabc6a+'/solved',{'body':_0x176400});return!_0x1ad112[_0x2ccdf9(0x11e)][_0x2ccdf9(0xfc)]||_0x1ad112[_0x2ccdf9(0x11e)][_0x2ccdf9(0xfc)][_0x2ccdf9(0x149)]===0x1;}async[_0x118477(0x144)](_0x2e6380,_0xe4d9ce,_0x3542f0,_0x442b72){const _0x4ad93c=_0x118477,_0x64f8d0={'memberId':(await this[_0x4ad93c(0xf7)][_0x4ad93c(0x13e)](_0x2e6380))[_0x4ad93c(0x132)](),'threadId':_0x3542f0,'replyId':_0x442b72,'unitId':_0x2e6380},_0x412f4d=await this['_httpService']['post'](_0x4ad93c(0xf9)+_0x2e6380+_0x4ad93c(0x106),{'body':_0x64f8d0});return!_0x412f4d['body'][_0x4ad93c(0xfc)]||_0x412f4d[_0x4ad93c(0x11e)]['error'][_0x4ad93c(0x149)]===0x1;}async['listComments'](_0x5183f0,_0x50a108,_0x379701){const _0x4d7f97=_0x118477,_0x12cd3d={'unitId':_0x5183f0,'threadId':_0x379701},_0x545f1e=await this['_httpService'][_0x4d7f97(0x131)](_0x4d7f97(0xf9)+_0x5183f0+'/list',{'body':_0x12cd3d}),_0x51b7d4=_0x379701[_0x4d7f97(0x12b)](_0x1aeba1=>ee(_0x545f1e['body']['comments'][_0x1aeba1],_0x5183f0,_0x50a108))[_0x4d7f97(0xfd)](Boolean);return Object[_0x4d7f97(0x105)](_0x545f1e[_0x4d7f97(0x11e)][_0x4d7f97(0x13a)])[_0x4d7f97(0x14e)](_0x568663=>{const _0x333980=_0x4d7f97;this[_0x333980(0x107)]['addUser'](_0x568663);}),_0x51b7d4;}[_0x118477(0x121)](_0x3ca7a7){const _0x49e717=_0x118477;return{'id':_0x3ca7a7['id'],'threadId':_0x3ca7a7[_0x49e717(0x112)],'ref':_0x3ca7a7[_0x49e717(0x103)]};}};f=Q([_(0x0,_0x1ab595(_0x1b49ae)),_(0x1,_0x1ab595(_0xca3c4f)),_(0x2,_0x1ab595(_0x2a8abb)),_(0x3,_0x1ab595(_0x3a9059))],f);var re=Object[_0x118477(0x11b)],te=(_0xfc5abf,_0x28b52f,_0x5dc7aa,_0x1a91d6)=>{const _0x484aba=_0x118477;for(var _0x225b02=_0x1a91d6>0x1?void 0x0:_0x1a91d6?re(_0x28b52f,_0x5dc7aa):_0x28b52f,_0x36eee3=_0xfc5abf[_0x484aba(0x141)]-0x1,_0x286e57;_0x36eee3>=0x0;_0x36eee3--)(_0x286e57=_0xfc5abf[_0x36eee3])&&(_0x225b02=_0x286e57(_0x225b02)||_0x225b02);return _0x225b02;},N=(_0x424c8f,_0xe6aaae)=>(_0x1c2d12,_0x4153e2)=>_0xe6aaae(_0x1c2d12,_0x4153e2,_0x424c8f);let g=class extends _0x4abb9d{constructor(_0x478d19,_0x417653){const _0x429921=_0x118477;super(),this['_threadCommentDataSourceService']=_0x478d19,this[_0x429921(0x11d)]=_0x417653,this[_0x429921(0x133)]();}[_0x118477(0x133)](){const _0x2adad2=_0x118477;this[_0x2adad2(0xff)]['dataSource']=this['_threadCommentDataSource'],this[_0x2adad2(0xff)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x37829d),N(0x1,_0x1ab595(f))],g);function _0xe34e(_0xd14904,_0x4ca8cc){const _0x36d711=_0x36d7();return _0xe34e=function(_0xe34e5e,_0x6fb233){_0xe34e5e=_0xe34e5e-0xef;let _0x470e37=_0x36d711[_0xe34e5e];return _0x470e37;},_0xe34e(_0xd14904,_0x4ca8cc);}var se=Object['defineProperty'],oe=Object[_0x118477(0x11b)],ne=(_0x41765d,_0x4be810,_0x3d8bb5)=>_0x4be810 in _0x41765d?se(_0x41765d,_0x4be810,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d8bb5}):_0x41765d[_0x4be810]=_0x3d8bb5,ie=(_0x4f0d42,_0x3a1394,_0x5f2734,_0x337f79)=>{const _0x1ce97a=_0x118477;for(var _0x464754=_0x337f79>0x1?void 0x0:_0x337f79?oe(_0x3a1394,_0x5f2734):_0x3a1394,_0xbb9e3f=_0x4f0d42[_0x1ce97a(0x141)]-0x1,_0x251a7e;_0xbb9e3f>=0x0;_0xbb9e3f--)(_0x251a7e=_0x4f0d42[_0xbb9e3f])&&(_0x464754=_0x251a7e(_0x464754)||_0x464754);return _0x464754;},w=(_0x35d8af,_0x4e94d9)=>(_0x1600c3,_0x4a321b)=>_0x4e94d9(_0x1600c3,_0x4a321b,_0x35d8af),$=(_0x2b6dc6,_0x2ac1cc,_0x5cacfc)=>ne(_0x2b6dc6,typeof _0x2ac1cc!=_0x118477(0x11c)?_0x2ac1cc+'':_0x2ac1cc,_0x5cacfc);let b=class extends _0x5214e1{constructor(_0x5b3517=M,_0x38e68f,_0x29e4d4){const _0x3353e9=_0x118477;super(),this[_0x3353e9(0x116)]=_0x5b3517,this[_0x3353e9(0x14c)]=_0x38e68f,this[_0x3353e9(0x147)]=_0x29e4d4;const {..._0x39ea6a}=_0x5d8e9c({},M,this['_config']);this[_0x3353e9(0x147)][_0x3353e9(0x137)](z,_0x39ea6a);}[_0x118477(0x109)](){const _0x542123=_0x118477;[[f],[g],[S]][_0x542123(0x14e)](_0xdd5c79=>{const _0x3fe582=_0x542123;this[_0x3fe582(0x14c)][_0x3fe582(0x11a)](_0xdd5c79);});}[_0x118477(0x10a)](){const _0x3fe665=_0x118477;this[_0x3fe665(0x14c)][_0x3fe665(0x126)](g),this['_injector'][_0x3fe665(0x126)](S);}};$(b,_0x118477(0x140),W),$(b,'type',_0x7eb5b0[_0x118477(0x146)]),b=ie([_0x652ecb(_0x255d00,_0x243904,_0x4f60b2),w(0x1,_0x1ab595(_0x3a9059)),w(0x2,_0x49fb74)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4bcf3b=_0x4b0a;(function(_0x5d4aa3,_0x27b74a){const _0x1938f1=_0x4b0a,_0x46812a=_0x5d4aa3();while(!![]){try{const _0x4f7f8d=parseInt(_0x1938f1(0x117))/0x1*(-parseInt(_0x1938f1(0x104))/0x2)+-parseInt(_0x1938f1(0x126))/0x3*(-parseInt(_0x1938f1(0xdf))/0x4)+parseInt(_0x1938f1(0x137))/0x5*(-parseInt(_0x1938f1(0x102))/0x6)+parseInt(_0x1938f1(0x141))/0x7+-parseInt(_0x1938f1(0x103))/0x8*(parseInt(_0x1938f1(0x108))/0x9)+-parseInt(_0x1938f1(0xee))/0xa+parseInt(_0x1938f1(0xe1))/0xb;if(_0x4f7f8d===_0x27b74a)break;else _0x46812a['push'](_0x46812a['shift']());}catch(_0x10b810){_0x46812a['push'](_0x46812a['shift']());}}}(_0x47ad,0x27e59));import{CommentService as _0x83588b,CollaborationSessionService as _0x458bdb,UniverCollaborationClientPlugin as _0xea194d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1aea52}from'@univerjs-pro/license';import{dayjs as _0x3b08f4,UserManagerService as _0x37fd21,Inject as _0x161a21,Injector as _0x927e70,Disposable as _0x25e7ab,CustomRangeType as _0x3952a4,UniverInstanceType as _0x3883ec,DependentOn as _0x38da6b,IConfigService as _0x3b5e7a,Plugin as _0x50cfac,merge as _0x4db1d8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xae96b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9e96ea,IThreadCommentDataSourceService as _0x2c3b05}from'@univerjs/thread-comment';function _0x4b0a(_0x348d5a,_0x5b7977){const _0x47ad90=_0x47ad();return _0x4b0a=function(_0x4b0a51,_0x1b781d){_0x4b0a51=_0x4b0a51-0xdd;let _0x344a33=_0x47ad90[_0x4b0a51];return _0x344a33;},_0x4b0a(_0x348d5a,_0x5b7977);}import{bufferTime as _0x3d5838}from'rxjs';import{HTTPService as _0xce3572}from'@univerjs/network';const W=_0x4bcf3b(0xfe);var I=(_0x51a1c1=>(_0x51a1c1[_0x51a1c1[_0x4bcf3b(0x109)]=0x0]='OpenOrReOpen',_0x51a1c1[_0x51a1c1[_0x4bcf3b(0xe5)]=0x1]=_0x4bcf3b(0xe5),_0x51a1c1[_0x51a1c1[_0x4bcf3b(0xe4)]=-0x1]=_0x4bcf3b(0xe4),_0x51a1c1))(I||{}),v=(_0x51b3ad=>(_0x51b3ad[_0x51b3ad['Unknown']=0x0]=_0x4bcf3b(0xfc),_0x51b3ad[_0x51b3ad[_0x4bcf3b(0x11c)]=0x1]='Add',_0x51b3ad[_0x51b3ad[_0x4bcf3b(0x112)]=0x2]='Reply',_0x51b3ad[_0x51b3ad[_0x4bcf3b(0x11a)]=0x3]=_0x4bcf3b(0x11a),_0x51b3ad[_0x51b3ad[_0x4bcf3b(0xde)]=0x4]=_0x4bcf3b(0xde),_0x51b3ad[_0x51b3ad[_0x4bcf3b(0xf7)]=0x5]=_0x4bcf3b(0xf7),_0x51b3ad[_0x51b3ad[_0x4bcf3b(0xe4)]=-0x1]=_0x4bcf3b(0xe4),_0x51b3ad))(v||{});const D=_0x234ba5=>_0x3b08f4(new Date(+_0x234ba5))[_0x4bcf3b(0x105)](_0x4bcf3b(0x13c)),B=async(_0x529a8f,_0x1a7447)=>{const _0xf7a6af=_0x4bcf3b,_0x397a12=_0x529a8f['get'](_0x37fd21),_0x5446b1=_0x529a8f[_0xf7a6af(0xe6)](_0xce3572);_0x1a7447[_0xf7a6af(0x107)](_0x3e3f10=>{const _0x112c4e=_0xf7a6af;_0x397a12[_0x112c4e(0x115)](_0x3e3f10)&&_0x1a7447[_0x112c4e(0x124)](_0x3e3f10);}),_0x1a7447[_0xf7a6af(0xf5)]&&(await _0x5446b1[_0xf7a6af(0xe6)](_0xf7a6af(0xf9),{'params':{'userIDs':[..._0x1a7447]}}))[_0xf7a6af(0x10b)][_0xf7a6af(0xe7)]['forEach'](_0x164a14=>{const _0x191846=_0xf7a6af;_0x164a14&&_0x397a12[_0x191846(0x142)](_0x164a14);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x100a5e,_0x560e73,_0x2502d3,_0x3062dc)=>{const _0x3f4c73=_0x4bcf3b;for(var _0x12aca1=_0x3062dc>0x1?void 0x0:_0x3062dc?K(_0x560e73,_0x2502d3):_0x560e73,_0x4f2f31=_0x100a5e[_0x3f4c73(0xf3)]-0x1,_0x2a7d1c;_0x4f2f31>=0x0;_0x4f2f31--)(_0x2a7d1c=_0x100a5e[_0x4f2f31])&&(_0x12aca1=_0x2a7d1c(_0x12aca1)||_0x12aca1);return _0x12aca1;},p=(_0x231072,_0x28fa94)=>(_0x31b134,_0x470fa1)=>_0x28fa94(_0x31b134,_0x470fa1,_0x231072);let S=class extends _0x25e7ab{constructor(_0x28454f,_0x5b35bd,_0x54266c,_0x416962){const _0x12ef17=_0x4bcf3b;super(),this[_0x12ef17(0xff)]=_0x28454f,this[_0x12ef17(0xdd)]=_0x5b35bd,this['_userService']=_0x54266c,this[_0x12ef17(0xea)]=_0x416962,this['_init'](),this[_0x12ef17(0x138)]();}[_0x4bcf3b(0x138)](){const _0x2ff0bb=_0x4bcf3b;this['disposeWithMe'](this[_0x2ff0bb(0xdd)][_0x2ff0bb(0x116)]['pipe'](_0x3d5838(0x10))[_0x2ff0bb(0xf1)](_0x63ee7a=>{const _0x16cb10=_0x2ff0bb,_0xc5c271=new Set();_0x63ee7a[_0x16cb10(0x107)](_0x114533=>{const _0x2fa961=_0x16cb10;switch(_0x114533[_0x2fa961(0xf8)]){case _0x2fa961(0xed):{const _0xa0f175=_0x114533[_0x2fa961(0xe0)][_0x2fa961(0x135)];_0xc5c271['add'](_0xa0f175);break;}}}),B(this[_0x16cb10(0xea)],_0xc5c271);}));}['_init'](){const _0xcfbfa7=_0x4bcf3b;this[_0xcfbfa7(0x130)](this[_0xcfbfa7(0xff)]['commentUpdate$'][_0xcfbfa7(0xf1)](async _0x33e80d=>{const _0x445a1c=_0xcfbfa7;var _0x4ac686,_0x306132,_0x422f8c,_0x1231d7;const _0x2f81d1=(_0x4ac686=this['_threadCommentModel'][_0x445a1c(0x101)](_0x33e80d[_0x445a1c(0x125)])[_0x445a1c(0xe2)](_0x32204a=>_0x32204a[_0x445a1c(0x127)]===_0x33e80d[_0x445a1c(0x127)]))==null?void 0x0:_0x4ac686['root'];if(!_0x2f81d1)return;const {unitId:_0x4812e7,subUnitId:_0x41de77}=_0x2f81d1;switch(_0x33e80d[_0x445a1c(0x131)]&&this['_userService']['addUser'](_0x33e80d[_0x445a1c(0x131)]),_0x33e80d[_0x445a1c(0xf8)]){case v[_0x445a1c(0x11c)]:break;case v['Reply']:{this[_0x445a1c(0xdd)][_0x445a1c(0x114)](_0x4812e7,_0x41de77,{'unitId':_0x4812e7,'subUnitId':_0x41de77,'ref':'','id':_0x33e80d[_0x445a1c(0x110)],'dT':D(+_0x33e80d[_0x445a1c(0xfd)]),'threadId':_0x33e80d['threadId'],'personId':(_0x422f8c=(_0x306132=_0x33e80d[_0x445a1c(0x131)])==null?void 0x0:_0x306132[_0x445a1c(0x13d)])!=null?_0x422f8c:_0x33e80d['userId'],'text':JSON[_0x445a1c(0x106)](_0x33e80d[_0x445a1c(0x12c)]),'parentId':_0x2f81d1['id']});break;}case v[_0x445a1c(0xde)]:{const _0x57d055=this['_threadCommentModel'][_0x445a1c(0x121)](_0x4812e7,_0x41de77,_0x33e80d['replyId']);_0x57d055&&_0x57d055[_0x445a1c(0x129)]&&this[_0x445a1c(0xdd)][_0x445a1c(0xef)](_0x4812e7,_0x41de77,_0x33e80d[_0x445a1c(0x110)]);break;}case v[_0x445a1c(0x11a)]:{this[_0x445a1c(0xdd)][_0x445a1c(0x13e)](_0x4812e7,_0x41de77,{'commentId':_0x33e80d[_0x445a1c(0x110)],'text':JSON[_0x445a1c(0x106)](_0x33e80d[_0x445a1c(0x12c)])});break;}case v[_0x445a1c(0xf7)]:{const _0x187d74=(_0x1231d7=this[_0x445a1c(0xdd)]['getUnit'](_0x33e80d[_0x445a1c(0x125)])[_0x445a1c(0xe2)](_0x2f2cb7=>_0x2f2cb7['threadId']===_0x33e80d[_0x445a1c(0x127)]))==null?void 0x0:_0x1231d7[_0x445a1c(0x12d)];_0x187d74&&this[_0x445a1c(0xdd)]['resolveComment'](_0x4812e7,_0x41de77,_0x187d74['id'],_0x33e80d[_0x445a1c(0x122)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x161a21(_0x83588b)),p(0x1,_0x161a21(_0x9e96ea)),p(0x2,_0x161a21(_0x37fd21)),p(0x3,_0x161a21(_0x927e70))],S);function _0x47ad(){const _0x44e57c=['_config','onStarting','_injector','slice','comments','add','2290760dyseLr','deleteComment','getCurrentUser','subscribe','_threadCommentDataSourceService','length','onReady','size','_threadCommentDataSource','Solve','type','/universer-api/user/list','requireSession','pluginName','Unknown','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','_initDataSource','getUnit','30qpzhOy','124296xbletk','2aYjKLS','format','parse','forEach','99NcINYn','OpenOrReOpen','COMMENT','body','getOwnPropertyDescriptor','ref','setConfig','/list','replyId','values','Reply','error','addComment','getUser','commentUpdate$','216563RCqXAV','resolved','/delete','Edit','_sessionService','Add','/edit','symbol','map','defineProperty','getComment','solved','post','delete','unitId','700401YXRBHL','threadId','UNIVER_UNKNOWN','parentId','rangeType','getMemberID','content','root','filter','reply','disposeWithMe','user','dataSource','stringify','_httpService','personId','_configService','24605oPWfWU','_initUserSync','code','/universer-api/comment/unit/','comment','YYYY/MM/DD\x20HH:mm','userID','updateComment','/reply','_userService','797244QOYqlX','addUser','/solved','rangeId','replies','_threadCommentModel','Delete','4hdBTKL','payload','5029299TOBXhA','find','userId','UNRECOGNIZED','Solved','get','users'];_0x47ad=function(){return _0x44e57c;};return _0x47ad();}const z='thread-comment-data-source.config',M={};var k=Object[_0x4bcf3b(0x10c)],Q=(_0x479733,_0x3280bf,_0x39b25b,_0x3a53ed)=>{const _0x169f62=_0x4bcf3b;for(var _0x1cf334=_0x3a53ed>0x1?void 0x0:_0x3a53ed?k(_0x3280bf,_0x39b25b):_0x3280bf,_0x37813a=_0x479733[_0x169f62(0xf3)]-0x1,_0x2d994d;_0x37813a>=0x0;_0x37813a--)(_0x2d994d=_0x479733[_0x37813a])&&(_0x1cf334=_0x2d994d(_0x1cf334)||_0x1cf334);return _0x1cf334;},_=(_0x5dfe21,_0x47e486)=>(_0x33f678,_0x4b1e68)=>_0x47e486(_0x33f678,_0x4b1e68,_0x5dfe21);function X(_0x125bd2,_0x1548bb){const _0x255fe1=_0x4bcf3b,_0x2dd4e8=_0x125bd2[_0x255fe1(0x145)][0x0];return{..._0x1548bb,'id':_0x2dd4e8[_0x255fe1(0x110)],'resolved':_0x125bd2[_0x255fe1(0x122)]===0x1,'dT':D(_0x2dd4e8[_0x255fe1(0xfd)]),'personId':_0x2dd4e8[_0x255fe1(0xe3)],'threadId':_0x2dd4e8['threadId']};}function ee(_0x481b1e,_0x240ec4,_0x43bd9c){const _0xda3bef=_0x4bcf3b;var _0x48c472,_0x2000ea;if(((_0x2000ea=(_0x48c472=_0x481b1e==null?void 0x0:_0x481b1e['replies'])==null?void 0x0:_0x48c472['length'])!=null?_0x2000ea:0x0)>0x0){const _0x3d4b6c=(_0x3e83d4,_0x587583)=>({'id':_0x3e83d4[_0xda3bef(0x110)],'threadId':_0x3e83d4['threadId'],'dT':D(_0x3e83d4[_0xda3bef(0xfd)]),'personId':_0x3e83d4['userId'],'resolved':_0x481b1e['solved']===I[_0xda3bef(0xe5)],'unitId':_0x240ec4,'subUnitId':_0x43bd9c,'text':JSON['parse'](_0x3e83d4[_0xda3bef(0x12c)]),'parentId':_0x587583}),_0x1fbc83=_0x3d4b6c(_0x481b1e[_0xda3bef(0x145)][0x0]);return{..._0x1fbc83,'children':_0x481b1e[_0xda3bef(0x145)][_0xda3bef(0xeb)](0x1)[_0xda3bef(0x11f)](_0x4416c4=>_0x3d4b6c(_0x4416c4,_0x1fbc83['id']))};}return null;}let f=class{constructor(_0x1871a2,_0x2032f2,_0xd1a0d5,_0x2936d8){this['_httpService']=_0x1871a2,this['_userService']=_0x2032f2,this['_sessionService']=_0xd1a0d5,this['_injector']=_0x2936d8;}async[_0x4bcf3b(0x114)](_0x2e6f0f){const _0x53e556=_0x4bcf3b;var _0x2bc05d,_0x30a40e;const {parentId:_0x50920,unitId:_0x3ad35a,text:_0x991dc1,threadId:_0x413057}=_0x2e6f0f,_0x30fd3f=(_0x30a40e=(_0x2bc05d=_0x991dc1['customRanges'])==null?void 0x0:_0x2bc05d[_0x53e556(0x12e)](_0x424e67=>_0x424e67['rangeType']===_0x3952a4[_0x53e556(0x10a)])[_0x53e556(0x11f)](_0x2292ca=>_0x2292ca[_0x53e556(0x144)]))!=null?_0x30a40e:[],_0x246297=JSON[_0x53e556(0x133)](_0x991dc1),_0x1de0b1=(await this[_0x53e556(0x11b)]['requireSession'](_0x3ad35a))[_0x53e556(0x12b)]();if(_0x50920){const _0x168b7c={'memberId':_0x1de0b1,'unitId':_0x3ad35a,'content':_0x246297,'mention':_0x30fd3f,'threadId':_0x413057},_0x36b012=(await this['_httpService'][_0x53e556(0x123)](_0x53e556(0x13a)+_0x3ad35a+_0x53e556(0x13f),{'body':_0x168b7c}))[_0x53e556(0x10b)][_0x53e556(0x12f)];return{..._0x2e6f0f,'id':_0x36b012[_0x53e556(0x110)],'dT':_0x3b08f4(+_0x36b012[_0x53e556(0xfd)])[_0x53e556(0x105)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x36b012['userId']};}else{const _0x3e438c={'memberId':_0x1de0b1,'unitId':_0x3ad35a,'content':_0x246297,'mention':_0x30fd3f},_0x34b36f=await this[_0x53e556(0x134)]['post'](_0x53e556(0x13a)+_0x3ad35a+'/add',{'body':_0x3e438c});return X(_0x34b36f['body'][_0x53e556(0x13b)],_0x2e6f0f);}}async[_0x4bcf3b(0x13e)](_0x5e3c44){const _0x4018f8=_0x4bcf3b;var _0x20c9f7,_0x136728;const {text:_0x365650,unitId:_0x524094}=_0x5e3c44,_0x4d957d=(_0x136728=(_0x20c9f7=_0x365650['customRanges'])==null?void 0x0:_0x20c9f7[_0x4018f8(0x12e)](_0x41386a=>_0x41386a[_0x4018f8(0x12a)]===_0x3952a4['COMMENT'])[_0x4018f8(0x11f)](_0x4791ef=>_0x4791ef[_0x4018f8(0x144)]))!=null?_0x136728:[],_0x317e66=JSON['stringify'](_0x365650),_0x1a6726=_0x5e3c44[_0x4018f8(0x127)],_0x176d53=_0x5e3c44['id'],_0x293769={'memberId':(await this[_0x4018f8(0x11b)][_0x4018f8(0xfa)](_0x524094))[_0x4018f8(0x12b)](),'unitId':_0x524094,'threadId':_0x1a6726,'mention':_0x4d957d,'content':_0x317e66,'replyId':_0x176d53},_0x140db9=await this[_0x4018f8(0x134)][_0x4018f8(0x123)](_0x4018f8(0x13a)+_0x524094+_0x4018f8(0x11d),{'body':_0x293769});return!_0x140db9[_0x4018f8(0x10b)]['error']||_0x140db9[_0x4018f8(0x10b)][_0x4018f8(0x113)][_0x4018f8(0x139)]===0x1;}async['resolveComment'](_0x3ae827){const _0xd6fd1b=_0x4bcf3b,{unitId:_0x4ca93b}=_0x3ae827,_0x1f30ee=_0x3ae827[_0xd6fd1b(0x127)],_0x1edd9f={'memberId':this['_userService'][_0xd6fd1b(0xf0)]()[_0xd6fd1b(0x13d)],'unitId':_0x4ca93b,'threadId':_0x1f30ee,'solved':_0x3ae827[_0xd6fd1b(0x118)]?I[_0xd6fd1b(0xe5)]:I[_0xd6fd1b(0x109)]},_0x11eb5d=await this[_0xd6fd1b(0x134)][_0xd6fd1b(0x123)](_0xd6fd1b(0x13a)+_0x4ca93b+_0xd6fd1b(0x143),{'body':_0x1edd9f});return!_0x11eb5d[_0xd6fd1b(0x10b)][_0xd6fd1b(0x113)]||_0x11eb5d[_0xd6fd1b(0x10b)]['error'][_0xd6fd1b(0x139)]===0x1;}async['deleteComment'](_0x58559a,_0x673e21,_0x38b59c,_0x23168a){const _0x364b63=_0x4bcf3b,_0x1442d3={'memberId':(await this[_0x364b63(0x11b)]['requireSession'](_0x58559a))[_0x364b63(0x12b)](),'threadId':_0x38b59c,'replyId':_0x23168a,'unitId':_0x58559a},_0x443051=await this[_0x364b63(0x134)]['post'](_0x364b63(0x13a)+_0x58559a+_0x364b63(0x119),{'body':_0x1442d3});return!_0x443051[_0x364b63(0x10b)]['error']||_0x443051[_0x364b63(0x10b)][_0x364b63(0x113)][_0x364b63(0x139)]===0x1;}async['listComments'](_0x4942b0,_0x5d0259,_0x28218d){const _0x317705=_0x4bcf3b,_0x182df6={'unitId':_0x4942b0,'threadId':_0x28218d},_0xdccdf2=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4942b0+_0x317705(0x10f),{'body':_0x182df6}),_0x46484e=_0x28218d[_0x317705(0x11f)](_0x26414a=>ee(_0xdccdf2['body'][_0x317705(0xec)][_0x26414a],_0x4942b0,_0x5d0259))[_0x317705(0x12e)](Boolean);return Object[_0x317705(0x111)](_0xdccdf2['body'][_0x317705(0xe7)])[_0x317705(0x107)](_0xfd18e6=>{const _0x49b256=_0x317705;this[_0x49b256(0x140)][_0x49b256(0x142)](_0xfd18e6);}),_0x46484e;}['saveCommentToSnapshot'](_0x5795d6){const _0x21d60a=_0x4bcf3b;return{'id':_0x5795d6['id'],'threadId':_0x5795d6[_0x21d60a(0x127)],'ref':_0x5795d6[_0x21d60a(0x10d)]};}};f=Q([_(0x0,_0x161a21(_0xce3572)),_(0x1,_0x161a21(_0x37fd21)),_(0x2,_0x161a21(_0x458bdb)),_(0x3,_0x161a21(_0x927e70))],f);var re=Object[_0x4bcf3b(0x10c)],te=(_0x53cc44,_0x3daa28,_0x2c63e6,_0x2d375b)=>{for(var _0x2b384c=_0x2d375b>0x1?void 0x0:_0x2d375b?re(_0x3daa28,_0x2c63e6):_0x3daa28,_0x286d00=_0x53cc44['length']-0x1,_0x10b984;_0x286d00>=0x0;_0x286d00--)(_0x10b984=_0x53cc44[_0x286d00])&&(_0x2b384c=_0x10b984(_0x2b384c)||_0x2b384c);return _0x2b384c;},N=(_0x519a07,_0x2609b3)=>(_0x505f40,_0x1f614b)=>_0x2609b3(_0x505f40,_0x1f614b,_0x519a07);let g=class extends _0x25e7ab{constructor(_0x2b8ca4,_0xa9a398){const _0x540ffa=_0x4bcf3b;super(),this['_threadCommentDataSourceService']=_0x2b8ca4,this['_threadCommentDataSource']=_0xa9a398,this[_0x540ffa(0x100)]();}[_0x4bcf3b(0x100)](){const _0x2067b5=_0x4bcf3b;this[_0x2067b5(0xf2)][_0x2067b5(0x132)]=this[_0x2067b5(0xf6)],this[_0x2067b5(0xf2)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2c3b05),N(0x1,_0x161a21(f))],g);var se=Object[_0x4bcf3b(0x120)],oe=Object[_0x4bcf3b(0x10c)],ne=(_0x1b76b3,_0x352c8c,_0x4e52b2)=>_0x352c8c in _0x1b76b3?se(_0x1b76b3,_0x352c8c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e52b2}):_0x1b76b3[_0x352c8c]=_0x4e52b2,ie=(_0x2a1ec1,_0x3272e7,_0x57a24d,_0x329a00)=>{const _0x59f59d=_0x4bcf3b;for(var _0x391e43=_0x329a00>0x1?void 0x0:_0x329a00?oe(_0x3272e7,_0x57a24d):_0x3272e7,_0x53a687=_0x2a1ec1[_0x59f59d(0xf3)]-0x1,_0xc6ea54;_0x53a687>=0x0;_0x53a687--)(_0xc6ea54=_0x2a1ec1[_0x53a687])&&(_0x391e43=_0xc6ea54(_0x391e43)||_0x391e43);return _0x391e43;},w=(_0x437b53,_0x181fba)=>(_0x2c9bb3,_0x190193)=>_0x181fba(_0x2c9bb3,_0x190193,_0x437b53),$=(_0xbbfd82,_0x480019,_0x100dfe)=>ne(_0xbbfd82,typeof _0x480019!=_0x4bcf3b(0x11e)?_0x480019+'':_0x480019,_0x100dfe);let b=class extends _0x50cfac{constructor(_0xd1817d=M,_0x974b15,_0x427d1b){const _0x5356cf=_0x4bcf3b;super(),this[_0x5356cf(0xe8)]=_0xd1817d,this[_0x5356cf(0xea)]=_0x974b15,this[_0x5356cf(0x136)]=_0x427d1b;const {..._0x2c47af}=_0x4db1d8({},M,this[_0x5356cf(0xe8)]);this[_0x5356cf(0x136)][_0x5356cf(0x10e)](z,_0x2c47af);}[_0x4bcf3b(0xe9)](){const _0x290117=_0x4bcf3b;[[f],[g],[S]][_0x290117(0x107)](_0x252c08=>{const _0x3510ad=_0x290117;this[_0x3510ad(0xea)][_0x3510ad(0xed)](_0x252c08);});}[_0x4bcf3b(0xf4)](){const _0x425ef7=_0x4bcf3b;this[_0x425ef7(0xea)]['get'](g),this['_injector']['get'](S);}};$(b,_0x4bcf3b(0xfb),W),$(b,_0x4bcf3b(0xf8),_0x3883ec[_0x4bcf3b(0x128)]),b=ie([_0x38da6b(_0xae96b7,_0xea194d,_0x1aea52),w(0x1,_0x161a21(_0x927e70)),w(0x2,_0x3b5e7a)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x118477=_0xe34e;(function(_0x356792,_0x421ed7){const _0x2d36a1=_0xe34e,_0x9bf74=_0x356792();while(!![]){try{const _0x171318=-parseInt(_0x2d36a1(0xf2))/0x1+parseInt(_0x2d36a1(0x123))/0x2*(-parseInt(_0x2d36a1(0x134))/0x3)+parseInt(_0x2d36a1(0x13d))/0x4*(parseInt(_0x2d36a1(0x12f))/0x5)+parseInt(_0x2d36a1(0x10d))/0x6+parseInt(_0x2d36a1(0x14b))/0x7+-parseInt(_0x2d36a1(0x12d))/0x8*(parseInt(_0x2d36a1(0x130))/0x9)+parseInt(_0x2d36a1(0x102))/0xa;if(_0x171318===_0x421ed7)break;else _0x9bf74['push'](_0x9bf74['shift']());}catch(_0x4edaba){_0x9bf74['push'](_0x9bf74['shift']());}}}(_0x36d7,0xd0d28));import{CommentService as _0x1448e6,CollaborationSessionService as _0x2a8abb,UniverCollaborationClientPlugin as _0x243904}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4f60b2}from'@univerjs-pro/license';import{dayjs as _0x296005,UserManagerService as _0xca3c4f,Inject as _0x1ab595,Injector as _0x3a9059,Disposable as _0x4abb9d,CustomRangeType as _0x10593c,UniverInstanceType as _0x7eb5b0,DependentOn as _0x652ecb,IConfigService as _0x49fb74,Plugin as _0x5214e1,merge as _0x5d8e9c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x255d00}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1fe52e,IThreadCommentDataSourceService as _0x37829d}from'@univerjs/thread-comment';import{bufferTime as _0x1403eb}from'rxjs';import{HTTPService as _0x1b49ae}from'@univerjs/network';const W=_0x118477(0x10c);var I=(_0x13c7fe=>(_0x13c7fe[_0x13c7fe['OpenOrReOpen']=0x0]=_0x118477(0x13c),_0x13c7fe[_0x13c7fe[_0x118477(0x10b)]=0x1]=_0x118477(0x10b),_0x13c7fe[_0x13c7fe[_0x118477(0xf8)]=-0x1]=_0x118477(0xf8),_0x13c7fe))(I||{}),v=(_0x5f4174=>(_0x5f4174[_0x5f4174[_0x118477(0x101)]=0x0]=_0x118477(0x101),_0x5f4174[_0x5f4174[_0x118477(0xef)]=0x1]=_0x118477(0xef),_0x5f4174[_0x5f4174[_0x118477(0x138)]=0x2]=_0x118477(0x138),_0x5f4174[_0x5f4174[_0x118477(0xfa)]=0x3]='Edit',_0x5f4174[_0x5f4174['Delete']=0x4]=_0x118477(0x127),_0x5f4174[_0x5f4174[_0x118477(0x122)]=0x5]='Solve',_0x5f4174[_0x5f4174[_0x118477(0xf8)]=-0x1]=_0x118477(0xf8),_0x5f4174))(v||{});const D=_0x1dc453=>_0x296005(new Date(+_0x1dc453))[_0x118477(0x108)](_0x118477(0x13b)),B=async(_0xc92a9f,_0x376fea)=>{const _0x4e178a=_0x118477,_0x322ed4=_0xc92a9f[_0x4e178a(0x126)](_0xca3c4f),_0x398372=_0xc92a9f[_0x4e178a(0x126)](_0x1b49ae);_0x376fea[_0x4e178a(0x14e)](_0x42be50=>{_0x322ed4['getUser'](_0x42be50)&&_0x376fea['delete'](_0x42be50);}),_0x376fea[_0x4e178a(0xfb)]&&(await _0x398372[_0x4e178a(0x126)](_0x4e178a(0x124),{'params':{'userIDs':[..._0x376fea]}}))['body'][_0x4e178a(0x13a)][_0x4e178a(0x14e)](_0x6f3e97=>{const _0x2fe8b9=_0x4e178a;_0x6f3e97&&_0x322ed4[_0x2fe8b9(0xfe)](_0x6f3e97);});};var K=Object[_0x118477(0x11b)],V=(_0x3d39c3,_0x5f4370,_0x1ed8f7,_0x48dc82)=>{const _0x4e890e=_0x118477;for(var _0x58e24f=_0x48dc82>0x1?void 0x0:_0x48dc82?K(_0x5f4370,_0x1ed8f7):_0x5f4370,_0x29d8a7=_0x3d39c3[_0x4e890e(0x141)]-0x1,_0x468cbe;_0x29d8a7>=0x0;_0x29d8a7--)(_0x468cbe=_0x3d39c3[_0x29d8a7])&&(_0x58e24f=_0x468cbe(_0x58e24f)||_0x58e24f);return _0x58e24f;},p=(_0x5dd42c,_0x580dc0)=>(_0x4dec05,_0x2409d8)=>_0x580dc0(_0x4dec05,_0x2409d8,_0x5dd42c);function _0x36d7(){const _0x294c58=['onStarting','onReady','Solved','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','2180784XrkWAa','content','replies','user','resolved','threadId','updateComment','subscribe','_init','_config','/reply','disposeWithMe','_commentService','add','getOwnPropertyDescriptor','symbol','_threadCommentDataSource','body','_threadCommentModel','reply','saveCommentToSnapshot','Solve','58UmgRaM','/universer-api/user/list','createTimestamp','get','Delete','userID','_httpService','find','map','customRanges','16XjotCw','parentId','28990nQXqNv','6921549SSRdRC','post','getMemberID','_initDataSource','154731ZzSdml','replyId','rangeId','setConfig','Reply','type','users','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','92BDjrTF','requireSession','solved','pluginName','length','rangeType','COMMENT','deleteComment','userId','UNIVER_UNKNOWN','_configService','unitId','code','thread-comment-data-source.config','2792944shbMQL','_injector','getCurrentUser','forEach','stringify','Add','getUnit','addComment','1183907CTygxX','slice','commentUpdate$','payload','_initUserSync','_sessionService','UNRECOGNIZED','/universer-api/comment/unit/','Edit','size','error','filter','addUser','_threadCommentDataSourceService','root','Unknown','41772880dDYuKy','ref','resolveComment','values','/delete','_userService','format'];_0x36d7=function(){return _0x294c58;};return _0x36d7();}let S=class extends _0x4abb9d{constructor(_0x32cc53,_0x2eedc6,_0x32ddad,_0x2e2d90){const _0x37de2a=_0x118477;super(),this[_0x37de2a(0x119)]=_0x32cc53,this[_0x37de2a(0x11f)]=_0x2eedc6,this['_userService']=_0x32ddad,this[_0x37de2a(0x14c)]=_0x2e2d90,this[_0x37de2a(0x115)](),this[_0x37de2a(0xf6)]();}[_0x118477(0xf6)](){const _0xd3df71=_0x118477;this[_0xd3df71(0x118)](this[_0xd3df71(0x11f)][_0xd3df71(0xf4)]['pipe'](_0x1403eb(0x10))[_0xd3df71(0x114)](_0x1becab=>{const _0x54b6a2=_0xd3df71,_0x1b030b=new Set();_0x1becab[_0x54b6a2(0x14e)](_0x355b96=>{const _0x381ec4=_0x54b6a2;switch(_0x355b96['type']){case _0x381ec4(0x11a):{const _0x5838f2=_0x355b96[_0x381ec4(0xf5)]['personId'];_0x1b030b[_0x381ec4(0x11a)](_0x5838f2);break;}}}),B(this[_0x54b6a2(0x14c)],_0x1b030b);}));}['_init'](){const _0x3b8eac=_0x118477;this[_0x3b8eac(0x118)](this[_0x3b8eac(0x119)][_0x3b8eac(0xf4)]['subscribe'](async _0x5deda8=>{const _0x1f6b8b=_0x3b8eac;var _0x3852ed,_0x21f3d0,_0x534d04,_0x4d992c;const _0x4f73e3=(_0x3852ed=this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf0)](_0x5deda8[_0x1f6b8b(0x148)])[_0x1f6b8b(0x12a)](_0x16eb4c=>_0x16eb4c[_0x1f6b8b(0x112)]===_0x5deda8[_0x1f6b8b(0x112)]))==null?void 0x0:_0x3852ed[_0x1f6b8b(0x100)];if(!_0x4f73e3)return;const {unitId:_0x3717ab,subUnitId:_0x4ca158}=_0x4f73e3;switch(_0x5deda8[_0x1f6b8b(0x110)]&&this[_0x1f6b8b(0x107)][_0x1f6b8b(0xfe)](_0x5deda8[_0x1f6b8b(0x110)]),_0x5deda8[_0x1f6b8b(0x139)]){case v['Add']:break;case v[_0x1f6b8b(0x138)]:{this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf1)](_0x3717ab,_0x4ca158,{'unitId':_0x3717ab,'subUnitId':_0x4ca158,'ref':'','id':_0x5deda8[_0x1f6b8b(0x135)],'dT':D(+_0x5deda8[_0x1f6b8b(0x125)]),'threadId':_0x5deda8['threadId'],'personId':(_0x534d04=(_0x21f3d0=_0x5deda8['user'])==null?void 0x0:_0x21f3d0[_0x1f6b8b(0x128)])!=null?_0x534d04:_0x5deda8['userId'],'text':JSON['parse'](_0x5deda8[_0x1f6b8b(0x10e)]),'parentId':_0x4f73e3['id']});break;}case v[_0x1f6b8b(0x127)]:{const _0x325985=this[_0x1f6b8b(0x11f)]['getComment'](_0x3717ab,_0x4ca158,_0x5deda8[_0x1f6b8b(0x135)]);_0x325985&&_0x325985[_0x1f6b8b(0x12e)]&&this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x144)](_0x3717ab,_0x4ca158,_0x5deda8[_0x1f6b8b(0x135)]);break;}case v[_0x1f6b8b(0xfa)]:{this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x113)](_0x3717ab,_0x4ca158,{'commentId':_0x5deda8['replyId'],'text':JSON['parse'](_0x5deda8[_0x1f6b8b(0x10e)])});break;}case v[_0x1f6b8b(0x122)]:{const _0x4ce40f=(_0x4d992c=this[_0x1f6b8b(0x11f)][_0x1f6b8b(0xf0)](_0x5deda8['unitId'])[_0x1f6b8b(0x12a)](_0xffd30a=>_0xffd30a[_0x1f6b8b(0x112)]===_0x5deda8[_0x1f6b8b(0x112)]))==null?void 0x0:_0x4d992c[_0x1f6b8b(0x100)];_0x4ce40f&&this[_0x1f6b8b(0x11f)][_0x1f6b8b(0x104)](_0x3717ab,_0x4ca158,_0x4ce40f['id'],_0x5deda8[_0x1f6b8b(0x13f)]===I[_0x1f6b8b(0x10b)]);break;}}}));}};S=V([p(0x0,_0x1ab595(_0x1448e6)),p(0x1,_0x1ab595(_0x1fe52e)),p(0x2,_0x1ab595(_0xca3c4f)),p(0x3,_0x1ab595(_0x3a9059))],S);const z=_0x118477(0x14a),M={};var k=Object[_0x118477(0x11b)],Q=(_0x1e4742,_0x4d3e9a,_0x273d1d,_0x4f2df3)=>{const _0x27aca1=_0x118477;for(var _0x3be03b=_0x4f2df3>0x1?void 0x0:_0x4f2df3?k(_0x4d3e9a,_0x273d1d):_0x4d3e9a,_0xbf39fa=_0x1e4742[_0x27aca1(0x141)]-0x1,_0x300423;_0xbf39fa>=0x0;_0xbf39fa--)(_0x300423=_0x1e4742[_0xbf39fa])&&(_0x3be03b=_0x300423(_0x3be03b)||_0x3be03b);return _0x3be03b;},_=(_0x45c4c3,_0x447a68)=>(_0x5e19d6,_0x29c6d5)=>_0x447a68(_0x5e19d6,_0x29c6d5,_0x45c4c3);function X(_0x54f60b,_0xbb5053){const _0x56a932=_0x118477,_0x25e1bc=_0x54f60b[_0x56a932(0x10f)][0x0];return{..._0xbb5053,'id':_0x25e1bc['replyId'],'resolved':_0x54f60b['solved']===0x1,'dT':D(_0x25e1bc['createTimestamp']),'personId':_0x25e1bc['userId'],'threadId':_0x25e1bc[_0x56a932(0x112)]};}function ee(_0x8ad35d,_0x1fa37d,_0x2f5dca){const _0x123d9f=_0x118477;var _0x20fce6,_0x378fcc;if(((_0x378fcc=(_0x20fce6=_0x8ad35d==null?void 0x0:_0x8ad35d[_0x123d9f(0x10f)])==null?void 0x0:_0x20fce6[_0x123d9f(0x141)])!=null?_0x378fcc:0x0)>0x0){const _0x424112=(_0x34cc90,_0x201ad9)=>({'id':_0x34cc90[_0x123d9f(0x135)],'threadId':_0x34cc90[_0x123d9f(0x112)],'dT':D(_0x34cc90[_0x123d9f(0x125)]),'personId':_0x34cc90[_0x123d9f(0x145)],'resolved':_0x8ad35d['solved']===I['Solved'],'unitId':_0x1fa37d,'subUnitId':_0x2f5dca,'text':JSON['parse'](_0x34cc90[_0x123d9f(0x10e)]),'parentId':_0x201ad9}),_0x5a2f81=_0x424112(_0x8ad35d[_0x123d9f(0x10f)][0x0]);return{..._0x5a2f81,'children':_0x8ad35d[_0x123d9f(0x10f)][_0x123d9f(0xf3)](0x1)[_0x123d9f(0x12b)](_0x3af4cb=>_0x424112(_0x3af4cb,_0x5a2f81['id']))};}return null;}let f=class{constructor(_0x2e4232,_0x571946,_0x2b2350,_0x5aa143){const _0x555bb2=_0x118477;this[_0x555bb2(0x129)]=_0x2e4232,this[_0x555bb2(0x107)]=_0x571946,this['_sessionService']=_0x2b2350,this[_0x555bb2(0x14c)]=_0x5aa143;}async[_0x118477(0xf1)](_0x3278bc){const _0x3288cb=_0x118477;var _0x9670c2,_0x8a2778;const {parentId:_0x84bda0,unitId:_0x1c265d,text:_0x1a4439,threadId:_0x957720}=_0x3278bc,_0xf022dd=(_0x8a2778=(_0x9670c2=_0x1a4439[_0x3288cb(0x12c)])==null?void 0x0:_0x9670c2[_0x3288cb(0xfd)](_0x3e8fe1=>_0x3e8fe1[_0x3288cb(0x142)]===_0x10593c['COMMENT'])[_0x3288cb(0x12b)](_0x117e9c=>_0x117e9c[_0x3288cb(0x136)]))!=null?_0x8a2778:[],_0x4b994c=JSON[_0x3288cb(0x14f)](_0x1a4439),_0x329119=(await this[_0x3288cb(0xf7)]['requireSession'](_0x1c265d))['getMemberID']();if(_0x84bda0){const _0x2dc62a={'memberId':_0x329119,'unitId':_0x1c265d,'content':_0x4b994c,'mention':_0xf022dd,'threadId':_0x957720},_0x1c52c3=(await this['_httpService'][_0x3288cb(0x131)]('/universer-api/comment/unit/'+_0x1c265d+_0x3288cb(0x117),{'body':_0x2dc62a}))[_0x3288cb(0x11e)][_0x3288cb(0x120)];return{..._0x3278bc,'id':_0x1c52c3[_0x3288cb(0x135)],'dT':_0x296005(+_0x1c52c3[_0x3288cb(0x125)])['format'](_0x3288cb(0x13b)),'personId':_0x1c52c3[_0x3288cb(0x145)]};}else{const _0x2b64c6={'memberId':_0x329119,'unitId':_0x1c265d,'content':_0x4b994c,'mention':_0xf022dd},_0x24c3c7=await this['_httpService'][_0x3288cb(0x131)](_0x3288cb(0xf9)+_0x1c265d+'/add',{'body':_0x2b64c6});return X(_0x24c3c7[_0x3288cb(0x11e)]['comment'],_0x3278bc);}}async[_0x118477(0x113)](_0xe00c8f){const _0x57a494=_0x118477;var _0x47ef0b,_0x53da94;const {text:_0x86bad4,unitId:_0x212f2f}=_0xe00c8f,_0x50b099=(_0x53da94=(_0x47ef0b=_0x86bad4[_0x57a494(0x12c)])==null?void 0x0:_0x47ef0b[_0x57a494(0xfd)](_0x1be0d1=>_0x1be0d1['rangeType']===_0x10593c[_0x57a494(0x143)])['map'](_0x3e5b82=>_0x3e5b82[_0x57a494(0x136)]))!=null?_0x53da94:[],_0x2af862=JSON[_0x57a494(0x14f)](_0x86bad4),_0x3ccbb9=_0xe00c8f['threadId'],_0x3d1289=_0xe00c8f['id'],_0x2bedaf={'memberId':(await this[_0x57a494(0xf7)][_0x57a494(0x13e)](_0x212f2f))['getMemberID'](),'unitId':_0x212f2f,'threadId':_0x3ccbb9,'mention':_0x50b099,'content':_0x2af862,'replyId':_0x3d1289},_0x14cadf=await this[_0x57a494(0x129)][_0x57a494(0x131)]('/universer-api/comment/unit/'+_0x212f2f+'/edit',{'body':_0x2bedaf});return!_0x14cadf[_0x57a494(0x11e)]['error']||_0x14cadf[_0x57a494(0x11e)]['error']['code']===0x1;}async[_0x118477(0x104)](_0x4f3a82){const _0x2ccdf9=_0x118477,{unitId:_0xcabc6a}=_0x4f3a82,_0x53252e=_0x4f3a82['threadId'],_0x176400={'memberId':this[_0x2ccdf9(0x107)][_0x2ccdf9(0x14d)]()[_0x2ccdf9(0x128)],'unitId':_0xcabc6a,'threadId':_0x53252e,'solved':_0x4f3a82[_0x2ccdf9(0x111)]?I['Solved']:I[_0x2ccdf9(0x13c)]},_0x1ad112=await this[_0x2ccdf9(0x129)][_0x2ccdf9(0x131)](_0x2ccdf9(0xf9)+_0xcabc6a+'/solved',{'body':_0x176400});return!_0x1ad112[_0x2ccdf9(0x11e)][_0x2ccdf9(0xfc)]||_0x1ad112[_0x2ccdf9(0x11e)][_0x2ccdf9(0xfc)][_0x2ccdf9(0x149)]===0x1;}async[_0x118477(0x144)](_0x2e6380,_0xe4d9ce,_0x3542f0,_0x442b72){const _0x4ad93c=_0x118477,_0x64f8d0={'memberId':(await this[_0x4ad93c(0xf7)][_0x4ad93c(0x13e)](_0x2e6380))[_0x4ad93c(0x132)](),'threadId':_0x3542f0,'replyId':_0x442b72,'unitId':_0x2e6380},_0x412f4d=await this['_httpService']['post'](_0x4ad93c(0xf9)+_0x2e6380+_0x4ad93c(0x106),{'body':_0x64f8d0});return!_0x412f4d['body'][_0x4ad93c(0xfc)]||_0x412f4d[_0x4ad93c(0x11e)]['error'][_0x4ad93c(0x149)]===0x1;}async['listComments'](_0x5183f0,_0x50a108,_0x379701){const _0x4d7f97=_0x118477,_0x12cd3d={'unitId':_0x5183f0,'threadId':_0x379701},_0x545f1e=await this['_httpService'][_0x4d7f97(0x131)](_0x4d7f97(0xf9)+_0x5183f0+'/list',{'body':_0x12cd3d}),_0x51b7d4=_0x379701[_0x4d7f97(0x12b)](_0x1aeba1=>ee(_0x545f1e['body']['comments'][_0x1aeba1],_0x5183f0,_0x50a108))[_0x4d7f97(0xfd)](Boolean);return Object[_0x4d7f97(0x105)](_0x545f1e[_0x4d7f97(0x11e)][_0x4d7f97(0x13a)])[_0x4d7f97(0x14e)](_0x568663=>{const _0x333980=_0x4d7f97;this[_0x333980(0x107)]['addUser'](_0x568663);}),_0x51b7d4;}[_0x118477(0x121)](_0x3ca7a7){const _0x49e717=_0x118477;return{'id':_0x3ca7a7['id'],'threadId':_0x3ca7a7[_0x49e717(0x112)],'ref':_0x3ca7a7[_0x49e717(0x103)]};}};f=Q([_(0x0,_0x1ab595(_0x1b49ae)),_(0x1,_0x1ab595(_0xca3c4f)),_(0x2,_0x1ab595(_0x2a8abb)),_(0x3,_0x1ab595(_0x3a9059))],f);var re=Object[_0x118477(0x11b)],te=(_0xfc5abf,_0x28b52f,_0x5dc7aa,_0x1a91d6)=>{const _0x484aba=_0x118477;for(var _0x225b02=_0x1a91d6>0x1?void 0x0:_0x1a91d6?re(_0x28b52f,_0x5dc7aa):_0x28b52f,_0x36eee3=_0xfc5abf[_0x484aba(0x141)]-0x1,_0x286e57;_0x36eee3>=0x0;_0x36eee3--)(_0x286e57=_0xfc5abf[_0x36eee3])&&(_0x225b02=_0x286e57(_0x225b02)||_0x225b02);return _0x225b02;},N=(_0x424c8f,_0xe6aaae)=>(_0x1c2d12,_0x4153e2)=>_0xe6aaae(_0x1c2d12,_0x4153e2,_0x424c8f);let g=class extends _0x4abb9d{constructor(_0x478d19,_0x417653){const _0x429921=_0x118477;super(),this['_threadCommentDataSourceService']=_0x478d19,this[_0x429921(0x11d)]=_0x417653,this[_0x429921(0x133)]();}[_0x118477(0x133)](){const _0x2adad2=_0x118477;this[_0x2adad2(0xff)]['dataSource']=this['_threadCommentDataSource'],this[_0x2adad2(0xff)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x37829d),N(0x1,_0x1ab595(f))],g);function _0xe34e(_0xd14904,_0x4ca8cc){const _0x36d711=_0x36d7();return _0xe34e=function(_0xe34e5e,_0x6fb233){_0xe34e5e=_0xe34e5e-0xef;let _0x470e37=_0x36d711[_0xe34e5e];return _0x470e37;},_0xe34e(_0xd14904,_0x4ca8cc);}var se=Object['defineProperty'],oe=Object[_0x118477(0x11b)],ne=(_0x41765d,_0x4be810,_0x3d8bb5)=>_0x4be810 in _0x41765d?se(_0x41765d,_0x4be810,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d8bb5}):_0x41765d[_0x4be810]=_0x3d8bb5,ie=(_0x4f0d42,_0x3a1394,_0x5f2734,_0x337f79)=>{const _0x1ce97a=_0x118477;for(var _0x464754=_0x337f79>0x1?void 0x0:_0x337f79?oe(_0x3a1394,_0x5f2734):_0x3a1394,_0xbb9e3f=_0x4f0d42[_0x1ce97a(0x141)]-0x1,_0x251a7e;_0xbb9e3f>=0x0;_0xbb9e3f--)(_0x251a7e=_0x4f0d42[_0xbb9e3f])&&(_0x464754=_0x251a7e(_0x464754)||_0x464754);return _0x464754;},w=(_0x35d8af,_0x4e94d9)=>(_0x1600c3,_0x4a321b)=>_0x4e94d9(_0x1600c3,_0x4a321b,_0x35d8af),$=(_0x2b6dc6,_0x2ac1cc,_0x5cacfc)=>ne(_0x2b6dc6,typeof _0x2ac1cc!=_0x118477(0x11c)?_0x2ac1cc+'':_0x2ac1cc,_0x5cacfc);let b=class extends _0x5214e1{constructor(_0x5b3517=M,_0x38e68f,_0x29e4d4){const _0x3353e9=_0x118477;super(),this[_0x3353e9(0x116)]=_0x5b3517,this[_0x3353e9(0x14c)]=_0x38e68f,this[_0x3353e9(0x147)]=_0x29e4d4;const {..._0x39ea6a}=_0x5d8e9c({},M,this['_config']);this[_0x3353e9(0x147)][_0x3353e9(0x137)](z,_0x39ea6a);}[_0x118477(0x109)](){const _0x542123=_0x118477;[[f],[g],[S]][_0x542123(0x14e)](_0xdd5c79=>{const _0x3fe582=_0x542123;this[_0x3fe582(0x14c)][_0x3fe582(0x11a)](_0xdd5c79);});}[_0x118477(0x10a)](){const _0x3fe665=_0x118477;this[_0x3fe665(0x14c)][_0x3fe665(0x126)](g),this['_injector'][_0x3fe665(0x126)](S);}};$(b,_0x118477(0x140),W),$(b,'type',_0x7eb5b0[_0x118477(0x146)]),b=ie([_0x652ecb(_0x255d00,_0x243904,_0x4f60b2),w(0x1,_0x1ab595(_0x3a9059)),w(0x2,_0x49fb74)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x4bcf3b=_0x4b0a;(function(_0x5d4aa3,_0x27b74a){const _0x1938f1=_0x4b0a,_0x46812a=_0x5d4aa3();while(!![]){try{const _0x4f7f8d=parseInt(_0x1938f1(0x117))/0x1*(-parseInt(_0x1938f1(0x104))/0x2)+-parseInt(_0x1938f1(0x126))/0x3*(-parseInt(_0x1938f1(0xdf))/0x4)+parseInt(_0x1938f1(0x137))/0x5*(-parseInt(_0x1938f1(0x102))/0x6)+parseInt(_0x1938f1(0x141))/0x7+-parseInt(_0x1938f1(0x103))/0x8*(parseInt(_0x1938f1(0x108))/0x9)+-parseInt(_0x1938f1(0xee))/0xa+parseInt(_0x1938f1(0xe1))/0xb;if(_0x4f7f8d===_0x27b74a)break;else _0x46812a['push'](_0x46812a['shift']());}catch(_0x10b810){_0x46812a['push'](_0x46812a['shift']());}}}(_0x47ad,0x27e59));import{CommentService as _0x83588b,CollaborationSessionService as _0x458bdb,UniverCollaborationClientPlugin as _0xea194d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1aea52}from'@univerjs-pro/license';import{dayjs as _0x3b08f4,UserManagerService as _0x37fd21,Inject as _0x161a21,Injector as _0x927e70,Disposable as _0x25e7ab,CustomRangeType as _0x3952a4,UniverInstanceType as _0x3883ec,DependentOn as _0x38da6b,IConfigService as _0x3b5e7a,Plugin as _0x50cfac,merge as _0x4db1d8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xae96b7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x9e96ea,IThreadCommentDataSourceService as _0x2c3b05}from'@univerjs/thread-comment';function _0x4b0a(_0x348d5a,_0x5b7977){const _0x47ad90=_0x47ad();return _0x4b0a=function(_0x4b0a51,_0x1b781d){_0x4b0a51=_0x4b0a51-0xdd;let _0x344a33=_0x47ad90[_0x4b0a51];return _0x344a33;},_0x4b0a(_0x348d5a,_0x5b7977);}import{bufferTime as _0x3d5838}from'rxjs';import{HTTPService as _0xce3572}from'@univerjs/network';const W=_0x4bcf3b(0xfe);var I=(_0x51a1c1=>(_0x51a1c1[_0x51a1c1[_0x4bcf3b(0x109)]=0x0]='OpenOrReOpen',_0x51a1c1[_0x51a1c1[_0x4bcf3b(0xe5)]=0x1]=_0x4bcf3b(0xe5),_0x51a1c1[_0x51a1c1[_0x4bcf3b(0xe4)]=-0x1]=_0x4bcf3b(0xe4),_0x51a1c1))(I||{}),v=(_0x51b3ad=>(_0x51b3ad[_0x51b3ad['Unknown']=0x0]=_0x4bcf3b(0xfc),_0x51b3ad[_0x51b3ad[_0x4bcf3b(0x11c)]=0x1]='Add',_0x51b3ad[_0x51b3ad[_0x4bcf3b(0x112)]=0x2]='Reply',_0x51b3ad[_0x51b3ad[_0x4bcf3b(0x11a)]=0x3]=_0x4bcf3b(0x11a),_0x51b3ad[_0x51b3ad[_0x4bcf3b(0xde)]=0x4]=_0x4bcf3b(0xde),_0x51b3ad[_0x51b3ad[_0x4bcf3b(0xf7)]=0x5]=_0x4bcf3b(0xf7),_0x51b3ad[_0x51b3ad[_0x4bcf3b(0xe4)]=-0x1]=_0x4bcf3b(0xe4),_0x51b3ad))(v||{});const D=_0x234ba5=>_0x3b08f4(new Date(+_0x234ba5))[_0x4bcf3b(0x105)](_0x4bcf3b(0x13c)),B=async(_0x529a8f,_0x1a7447)=>{const _0xf7a6af=_0x4bcf3b,_0x397a12=_0x529a8f['get'](_0x37fd21),_0x5446b1=_0x529a8f[_0xf7a6af(0xe6)](_0xce3572);_0x1a7447[_0xf7a6af(0x107)](_0x3e3f10=>{const _0x112c4e=_0xf7a6af;_0x397a12[_0x112c4e(0x115)](_0x3e3f10)&&_0x1a7447[_0x112c4e(0x124)](_0x3e3f10);}),_0x1a7447[_0xf7a6af(0xf5)]&&(await _0x5446b1[_0xf7a6af(0xe6)](_0xf7a6af(0xf9),{'params':{'userIDs':[..._0x1a7447]}}))[_0xf7a6af(0x10b)][_0xf7a6af(0xe7)]['forEach'](_0x164a14=>{const _0x191846=_0xf7a6af;_0x164a14&&_0x397a12[_0x191846(0x142)](_0x164a14);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x100a5e,_0x560e73,_0x2502d3,_0x3062dc)=>{const _0x3f4c73=_0x4bcf3b;for(var _0x12aca1=_0x3062dc>0x1?void 0x0:_0x3062dc?K(_0x560e73,_0x2502d3):_0x560e73,_0x4f2f31=_0x100a5e[_0x3f4c73(0xf3)]-0x1,_0x2a7d1c;_0x4f2f31>=0x0;_0x4f2f31--)(_0x2a7d1c=_0x100a5e[_0x4f2f31])&&(_0x12aca1=_0x2a7d1c(_0x12aca1)||_0x12aca1);return _0x12aca1;},p=(_0x231072,_0x28fa94)=>(_0x31b134,_0x470fa1)=>_0x28fa94(_0x31b134,_0x470fa1,_0x231072);let S=class extends _0x25e7ab{constructor(_0x28454f,_0x5b35bd,_0x54266c,_0x416962){const _0x12ef17=_0x4bcf3b;super(),this[_0x12ef17(0xff)]=_0x28454f,this[_0x12ef17(0xdd)]=_0x5b35bd,this['_userService']=_0x54266c,this[_0x12ef17(0xea)]=_0x416962,this['_init'](),this[_0x12ef17(0x138)]();}[_0x4bcf3b(0x138)](){const _0x2ff0bb=_0x4bcf3b;this['disposeWithMe'](this[_0x2ff0bb(0xdd)][_0x2ff0bb(0x116)]['pipe'](_0x3d5838(0x10))[_0x2ff0bb(0xf1)](_0x63ee7a=>{const _0x16cb10=_0x2ff0bb,_0xc5c271=new Set();_0x63ee7a[_0x16cb10(0x107)](_0x114533=>{const _0x2fa961=_0x16cb10;switch(_0x114533[_0x2fa961(0xf8)]){case _0x2fa961(0xed):{const _0xa0f175=_0x114533[_0x2fa961(0xe0)][_0x2fa961(0x135)];_0xc5c271['add'](_0xa0f175);break;}}}),B(this[_0x16cb10(0xea)],_0xc5c271);}));}['_init'](){const _0xcfbfa7=_0x4bcf3b;this[_0xcfbfa7(0x130)](this[_0xcfbfa7(0xff)]['commentUpdate$'][_0xcfbfa7(0xf1)](async _0x33e80d=>{const _0x445a1c=_0xcfbfa7;var _0x4ac686,_0x306132,_0x422f8c,_0x1231d7;const _0x2f81d1=(_0x4ac686=this['_threadCommentModel'][_0x445a1c(0x101)](_0x33e80d[_0x445a1c(0x125)])[_0x445a1c(0xe2)](_0x32204a=>_0x32204a[_0x445a1c(0x127)]===_0x33e80d[_0x445a1c(0x127)]))==null?void 0x0:_0x4ac686['root'];if(!_0x2f81d1)return;const {unitId:_0x4812e7,subUnitId:_0x41de77}=_0x2f81d1;switch(_0x33e80d[_0x445a1c(0x131)]&&this['_userService']['addUser'](_0x33e80d[_0x445a1c(0x131)]),_0x33e80d[_0x445a1c(0xf8)]){case v[_0x445a1c(0x11c)]:break;case v['Reply']:{this[_0x445a1c(0xdd)][_0x445a1c(0x114)](_0x4812e7,_0x41de77,{'unitId':_0x4812e7,'subUnitId':_0x41de77,'ref':'','id':_0x33e80d[_0x445a1c(0x110)],'dT':D(+_0x33e80d[_0x445a1c(0xfd)]),'threadId':_0x33e80d['threadId'],'personId':(_0x422f8c=(_0x306132=_0x33e80d[_0x445a1c(0x131)])==null?void 0x0:_0x306132[_0x445a1c(0x13d)])!=null?_0x422f8c:_0x33e80d['userId'],'text':JSON[_0x445a1c(0x106)](_0x33e80d[_0x445a1c(0x12c)]),'parentId':_0x2f81d1['id']});break;}case v[_0x445a1c(0xde)]:{const _0x57d055=this['_threadCommentModel'][_0x445a1c(0x121)](_0x4812e7,_0x41de77,_0x33e80d['replyId']);_0x57d055&&_0x57d055[_0x445a1c(0x129)]&&this[_0x445a1c(0xdd)][_0x445a1c(0xef)](_0x4812e7,_0x41de77,_0x33e80d[_0x445a1c(0x110)]);break;}case v[_0x445a1c(0x11a)]:{this[_0x445a1c(0xdd)][_0x445a1c(0x13e)](_0x4812e7,_0x41de77,{'commentId':_0x33e80d[_0x445a1c(0x110)],'text':JSON[_0x445a1c(0x106)](_0x33e80d[_0x445a1c(0x12c)])});break;}case v[_0x445a1c(0xf7)]:{const _0x187d74=(_0x1231d7=this[_0x445a1c(0xdd)]['getUnit'](_0x33e80d[_0x445a1c(0x125)])[_0x445a1c(0xe2)](_0x2f2cb7=>_0x2f2cb7['threadId']===_0x33e80d[_0x445a1c(0x127)]))==null?void 0x0:_0x1231d7[_0x445a1c(0x12d)];_0x187d74&&this[_0x445a1c(0xdd)]['resolveComment'](_0x4812e7,_0x41de77,_0x187d74['id'],_0x33e80d[_0x445a1c(0x122)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x161a21(_0x83588b)),p(0x1,_0x161a21(_0x9e96ea)),p(0x2,_0x161a21(_0x37fd21)),p(0x3,_0x161a21(_0x927e70))],S);function _0x47ad(){const _0x44e57c=['_config','onStarting','_injector','slice','comments','add','2290760dyseLr','deleteComment','getCurrentUser','subscribe','_threadCommentDataSourceService','length','onReady','size','_threadCommentDataSource','Solve','type','/universer-api/user/list','requireSession','pluginName','Unknown','createTimestamp','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','_initDataSource','getUnit','30qpzhOy','124296xbletk','2aYjKLS','format','parse','forEach','99NcINYn','OpenOrReOpen','COMMENT','body','getOwnPropertyDescriptor','ref','setConfig','/list','replyId','values','Reply','error','addComment','getUser','commentUpdate$','216563RCqXAV','resolved','/delete','Edit','_sessionService','Add','/edit','symbol','map','defineProperty','getComment','solved','post','delete','unitId','700401YXRBHL','threadId','UNIVER_UNKNOWN','parentId','rangeType','getMemberID','content','root','filter','reply','disposeWithMe','user','dataSource','stringify','_httpService','personId','_configService','24605oPWfWU','_initUserSync','code','/universer-api/comment/unit/','comment','YYYY/MM/DD\x20HH:mm','userID','updateComment','/reply','_userService','797244QOYqlX','addUser','/solved','rangeId','replies','_threadCommentModel','Delete','4hdBTKL','payload','5029299TOBXhA','find','userId','UNRECOGNIZED','Solved','get','users'];_0x47ad=function(){return _0x44e57c;};return _0x47ad();}const z='thread-comment-data-source.config',M={};var k=Object[_0x4bcf3b(0x10c)],Q=(_0x479733,_0x3280bf,_0x39b25b,_0x3a53ed)=>{const _0x169f62=_0x4bcf3b;for(var _0x1cf334=_0x3a53ed>0x1?void 0x0:_0x3a53ed?k(_0x3280bf,_0x39b25b):_0x3280bf,_0x37813a=_0x479733[_0x169f62(0xf3)]-0x1,_0x2d994d;_0x37813a>=0x0;_0x37813a--)(_0x2d994d=_0x479733[_0x37813a])&&(_0x1cf334=_0x2d994d(_0x1cf334)||_0x1cf334);return _0x1cf334;},_=(_0x5dfe21,_0x47e486)=>(_0x33f678,_0x4b1e68)=>_0x47e486(_0x33f678,_0x4b1e68,_0x5dfe21);function X(_0x125bd2,_0x1548bb){const _0x255fe1=_0x4bcf3b,_0x2dd4e8=_0x125bd2[_0x255fe1(0x145)][0x0];return{..._0x1548bb,'id':_0x2dd4e8[_0x255fe1(0x110)],'resolved':_0x125bd2[_0x255fe1(0x122)]===0x1,'dT':D(_0x2dd4e8[_0x255fe1(0xfd)]),'personId':_0x2dd4e8[_0x255fe1(0xe3)],'threadId':_0x2dd4e8['threadId']};}function ee(_0x481b1e,_0x240ec4,_0x43bd9c){const _0xda3bef=_0x4bcf3b;var _0x48c472,_0x2000ea;if(((_0x2000ea=(_0x48c472=_0x481b1e==null?void 0x0:_0x481b1e['replies'])==null?void 0x0:_0x48c472['length'])!=null?_0x2000ea:0x0)>0x0){const _0x3d4b6c=(_0x3e83d4,_0x587583)=>({'id':_0x3e83d4[_0xda3bef(0x110)],'threadId':_0x3e83d4['threadId'],'dT':D(_0x3e83d4[_0xda3bef(0xfd)]),'personId':_0x3e83d4['userId'],'resolved':_0x481b1e['solved']===I[_0xda3bef(0xe5)],'unitId':_0x240ec4,'subUnitId':_0x43bd9c,'text':JSON['parse'](_0x3e83d4[_0xda3bef(0x12c)]),'parentId':_0x587583}),_0x1fbc83=_0x3d4b6c(_0x481b1e[_0xda3bef(0x145)][0x0]);return{..._0x1fbc83,'children':_0x481b1e[_0xda3bef(0x145)][_0xda3bef(0xeb)](0x1)[_0xda3bef(0x11f)](_0x4416c4=>_0x3d4b6c(_0x4416c4,_0x1fbc83['id']))};}return null;}let f=class{constructor(_0x1871a2,_0x2032f2,_0xd1a0d5,_0x2936d8){this['_httpService']=_0x1871a2,this['_userService']=_0x2032f2,this['_sessionService']=_0xd1a0d5,this['_injector']=_0x2936d8;}async[_0x4bcf3b(0x114)](_0x2e6f0f){const _0x53e556=_0x4bcf3b;var _0x2bc05d,_0x30a40e;const {parentId:_0x50920,unitId:_0x3ad35a,text:_0x991dc1,threadId:_0x413057}=_0x2e6f0f,_0x30fd3f=(_0x30a40e=(_0x2bc05d=_0x991dc1['customRanges'])==null?void 0x0:_0x2bc05d[_0x53e556(0x12e)](_0x424e67=>_0x424e67['rangeType']===_0x3952a4[_0x53e556(0x10a)])[_0x53e556(0x11f)](_0x2292ca=>_0x2292ca[_0x53e556(0x144)]))!=null?_0x30a40e:[],_0x246297=JSON[_0x53e556(0x133)](_0x991dc1),_0x1de0b1=(await this[_0x53e556(0x11b)]['requireSession'](_0x3ad35a))[_0x53e556(0x12b)]();if(_0x50920){const _0x168b7c={'memberId':_0x1de0b1,'unitId':_0x3ad35a,'content':_0x246297,'mention':_0x30fd3f,'threadId':_0x413057},_0x36b012=(await this['_httpService'][_0x53e556(0x123)](_0x53e556(0x13a)+_0x3ad35a+_0x53e556(0x13f),{'body':_0x168b7c}))[_0x53e556(0x10b)][_0x53e556(0x12f)];return{..._0x2e6f0f,'id':_0x36b012[_0x53e556(0x110)],'dT':_0x3b08f4(+_0x36b012[_0x53e556(0xfd)])[_0x53e556(0x105)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x36b012['userId']};}else{const _0x3e438c={'memberId':_0x1de0b1,'unitId':_0x3ad35a,'content':_0x246297,'mention':_0x30fd3f},_0x34b36f=await this[_0x53e556(0x134)]['post'](_0x53e556(0x13a)+_0x3ad35a+'/add',{'body':_0x3e438c});return X(_0x34b36f['body'][_0x53e556(0x13b)],_0x2e6f0f);}}async[_0x4bcf3b(0x13e)](_0x5e3c44){const _0x4018f8=_0x4bcf3b;var _0x20c9f7,_0x136728;const {text:_0x365650,unitId:_0x524094}=_0x5e3c44,_0x4d957d=(_0x136728=(_0x20c9f7=_0x365650['customRanges'])==null?void 0x0:_0x20c9f7[_0x4018f8(0x12e)](_0x41386a=>_0x41386a[_0x4018f8(0x12a)]===_0x3952a4['COMMENT'])[_0x4018f8(0x11f)](_0x4791ef=>_0x4791ef[_0x4018f8(0x144)]))!=null?_0x136728:[],_0x317e66=JSON['stringify'](_0x365650),_0x1a6726=_0x5e3c44[_0x4018f8(0x127)],_0x176d53=_0x5e3c44['id'],_0x293769={'memberId':(await this[_0x4018f8(0x11b)][_0x4018f8(0xfa)](_0x524094))[_0x4018f8(0x12b)](),'unitId':_0x524094,'threadId':_0x1a6726,'mention':_0x4d957d,'content':_0x317e66,'replyId':_0x176d53},_0x140db9=await this[_0x4018f8(0x134)][_0x4018f8(0x123)](_0x4018f8(0x13a)+_0x524094+_0x4018f8(0x11d),{'body':_0x293769});return!_0x140db9[_0x4018f8(0x10b)]['error']||_0x140db9[_0x4018f8(0x10b)][_0x4018f8(0x113)][_0x4018f8(0x139)]===0x1;}async['resolveComment'](_0x3ae827){const _0xd6fd1b=_0x4bcf3b,{unitId:_0x4ca93b}=_0x3ae827,_0x1f30ee=_0x3ae827[_0xd6fd1b(0x127)],_0x1edd9f={'memberId':this['_userService'][_0xd6fd1b(0xf0)]()[_0xd6fd1b(0x13d)],'unitId':_0x4ca93b,'threadId':_0x1f30ee,'solved':_0x3ae827[_0xd6fd1b(0x118)]?I[_0xd6fd1b(0xe5)]:I[_0xd6fd1b(0x109)]},_0x11eb5d=await this[_0xd6fd1b(0x134)][_0xd6fd1b(0x123)](_0xd6fd1b(0x13a)+_0x4ca93b+_0xd6fd1b(0x143),{'body':_0x1edd9f});return!_0x11eb5d[_0xd6fd1b(0x10b)][_0xd6fd1b(0x113)]||_0x11eb5d[_0xd6fd1b(0x10b)]['error'][_0xd6fd1b(0x139)]===0x1;}async['deleteComment'](_0x58559a,_0x673e21,_0x38b59c,_0x23168a){const _0x364b63=_0x4bcf3b,_0x1442d3={'memberId':(await this[_0x364b63(0x11b)]['requireSession'](_0x58559a))[_0x364b63(0x12b)](),'threadId':_0x38b59c,'replyId':_0x23168a,'unitId':_0x58559a},_0x443051=await this[_0x364b63(0x134)]['post'](_0x364b63(0x13a)+_0x58559a+_0x364b63(0x119),{'body':_0x1442d3});return!_0x443051[_0x364b63(0x10b)]['error']||_0x443051[_0x364b63(0x10b)][_0x364b63(0x113)][_0x364b63(0x139)]===0x1;}async['listComments'](_0x4942b0,_0x5d0259,_0x28218d){const _0x317705=_0x4bcf3b,_0x182df6={'unitId':_0x4942b0,'threadId':_0x28218d},_0xdccdf2=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4942b0+_0x317705(0x10f),{'body':_0x182df6}),_0x46484e=_0x28218d[_0x317705(0x11f)](_0x26414a=>ee(_0xdccdf2['body'][_0x317705(0xec)][_0x26414a],_0x4942b0,_0x5d0259))[_0x317705(0x12e)](Boolean);return Object[_0x317705(0x111)](_0xdccdf2['body'][_0x317705(0xe7)])[_0x317705(0x107)](_0xfd18e6=>{const _0x49b256=_0x317705;this[_0x49b256(0x140)][_0x49b256(0x142)](_0xfd18e6);}),_0x46484e;}['saveCommentToSnapshot'](_0x5795d6){const _0x21d60a=_0x4bcf3b;return{'id':_0x5795d6['id'],'threadId':_0x5795d6[_0x21d60a(0x127)],'ref':_0x5795d6[_0x21d60a(0x10d)]};}};f=Q([_(0x0,_0x161a21(_0xce3572)),_(0x1,_0x161a21(_0x37fd21)),_(0x2,_0x161a21(_0x458bdb)),_(0x3,_0x161a21(_0x927e70))],f);var re=Object[_0x4bcf3b(0x10c)],te=(_0x53cc44,_0x3daa28,_0x2c63e6,_0x2d375b)=>{for(var _0x2b384c=_0x2d375b>0x1?void 0x0:_0x2d375b?re(_0x3daa28,_0x2c63e6):_0x3daa28,_0x286d00=_0x53cc44['length']-0x1,_0x10b984;_0x286d00>=0x0;_0x286d00--)(_0x10b984=_0x53cc44[_0x286d00])&&(_0x2b384c=_0x10b984(_0x2b384c)||_0x2b384c);return _0x2b384c;},N=(_0x519a07,_0x2609b3)=>(_0x505f40,_0x1f614b)=>_0x2609b3(_0x505f40,_0x1f614b,_0x519a07);let g=class extends _0x25e7ab{constructor(_0x2b8ca4,_0xa9a398){const _0x540ffa=_0x4bcf3b;super(),this['_threadCommentDataSourceService']=_0x2b8ca4,this['_threadCommentDataSource']=_0xa9a398,this[_0x540ffa(0x100)]();}[_0x4bcf3b(0x100)](){const _0x2067b5=_0x4bcf3b;this[_0x2067b5(0xf2)][_0x2067b5(0x132)]=this[_0x2067b5(0xf6)],this[_0x2067b5(0xf2)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2c3b05),N(0x1,_0x161a21(f))],g);var se=Object[_0x4bcf3b(0x120)],oe=Object[_0x4bcf3b(0x10c)],ne=(_0x1b76b3,_0x352c8c,_0x4e52b2)=>_0x352c8c in _0x1b76b3?se(_0x1b76b3,_0x352c8c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e52b2}):_0x1b76b3[_0x352c8c]=_0x4e52b2,ie=(_0x2a1ec1,_0x3272e7,_0x57a24d,_0x329a00)=>{const _0x59f59d=_0x4bcf3b;for(var _0x391e43=_0x329a00>0x1?void 0x0:_0x329a00?oe(_0x3272e7,_0x57a24d):_0x3272e7,_0x53a687=_0x2a1ec1[_0x59f59d(0xf3)]-0x1,_0xc6ea54;_0x53a687>=0x0;_0x53a687--)(_0xc6ea54=_0x2a1ec1[_0x53a687])&&(_0x391e43=_0xc6ea54(_0x391e43)||_0x391e43);return _0x391e43;},w=(_0x437b53,_0x181fba)=>(_0x2c9bb3,_0x190193)=>_0x181fba(_0x2c9bb3,_0x190193,_0x437b53),$=(_0xbbfd82,_0x480019,_0x100dfe)=>ne(_0xbbfd82,typeof _0x480019!=_0x4bcf3b(0x11e)?_0x480019+'':_0x480019,_0x100dfe);let b=class extends _0x50cfac{constructor(_0xd1817d=M,_0x974b15,_0x427d1b){const _0x5356cf=_0x4bcf3b;super(),this[_0x5356cf(0xe8)]=_0xd1817d,this[_0x5356cf(0xea)]=_0x974b15,this[_0x5356cf(0x136)]=_0x427d1b;const {..._0x2c47af}=_0x4db1d8({},M,this[_0x5356cf(0xe8)]);this[_0x5356cf(0x136)][_0x5356cf(0x10e)](z,_0x2c47af);}[_0x4bcf3b(0xe9)](){const _0x290117=_0x4bcf3b;[[f],[g],[S]][_0x290117(0x107)](_0x252c08=>{const _0x3510ad=_0x290117;this[_0x3510ad(0xea)][_0x3510ad(0xed)](_0x252c08);});}[_0x4bcf3b(0xf4)](){const _0x425ef7=_0x4bcf3b;this[_0x425ef7(0xea)]['get'](g),this['_injector']['get'](S);}};$(b,_0x4bcf3b(0xfb),W),$(b,_0x4bcf3b(0xf8),_0x3883ec[_0x4bcf3b(0x128)]),b=ie([_0x38da6b(_0xae96b7,_0xea194d,_0x1aea52),w(0x1,_0x161a21(_0x927e70)),w(0x2,_0x3b5e7a)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x57fc(){const _0x4fa579=['saveCommentToSnapshot','solved','Inject','UniverInstanceType','dataSource','_initUserSync','format','dayjs','_threadCommentModel','_sessionService','get','/universer-api/comment/unit/','@univerjs/core','personId','ThreadCommentModel','UniverProCollaborationClient','toStringTag','setConfig','body','CollaborationSessionService','requireSession','/reply','stringify','defineProperty','userId','/list','CustomRangeType','onReady','_injector','replyId','userID','getUnit','@univerjs/thread-comment','rangeId','addUser','getUser','@univerjs/thread-comment-ui','add','_threadCommentDataSourceService','addComment','getOwnPropertyDescriptor','_httpService','UserManagerService','_init','filter','YYYY/MM/DD\x20HH:mm','exports','_initDataSource','resolved','deleteComment','Edit','CommentService','onStarting','error','/delete','UniverThreadComment','resolveComment','UniverCore','size','Solved','UNRECOGNIZED','replies','UniverLicensePlugin','unitId','_commentService','getMemberID','COMMENT','bufferTime','updateComment','user','rxjs','UNIVER_UNKNOWN','10915968fLZzOu','subscribe','getComment','merge','Delete','customRanges','commentUpdate$','thread-comment-data-source.config','@univerjs-pro/license','OpenOrReOpen','forEach','ref','@univerjs-pro/collaboration-client','users','createTimestamp','Injector','type','DependentOn','_userService','UniverProThreadCommentDatasource','parentId','object','rangeType','Solve','245845LxVpjX','post','getCurrentUser','code','Disposable','parse','length','UniverCollaborationClientPlugin','1071376otJoUi','reply','_configService','root','1702269JmdxPZ','_config','/edit','syncUpdateMutationToColla','threadId','HTTPService','/universer-api/user/list','comments','151645UJHRtU','disposeWithMe','_threadCommentDataSource','Add','UniverThreadCommentDataSourcePlugin','Reply','comment','content','find','5745901PBztIG','delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','@univerjs/network','slice','40FSTGOa','4739046FRkobQ'];_0x57fc=function(){return _0x4fa579;};return _0x57fc();}function _0x4724(_0x13665b,_0x4caee6){const _0x57fc86=_0x57fc();return _0x4724=function(_0x47241b,_0x3b38a9){_0x47241b=_0x47241b-0x11e;let _0xbfaa9b=_0x57fc86[_0x47241b];return _0xbfaa9b;},_0x4724(_0x13665b,_0x4caee6);}(function(_0xc6cfa9,_0x4769b4){const _0x535a2b=_0x4724,_0x5bd43a=_0xc6cfa9();while(!![]){try{const _0x3111ad=parseInt(_0x535a2b(0x17b))/0x1+parseInt(_0x535a2b(0x183))/0x2+-parseInt(_0x535a2b(0x187))/0x3+parseInt(_0x535a2b(0x19e))/0x4*(parseInt(_0x535a2b(0x18f))/0x5)+parseInt(_0x535a2b(0x19f))/0x6+parseInt(_0x535a2b(0x198))/0x7+-parseInt(_0x535a2b(0x163))/0x8;if(_0x3111ad===_0x4769b4)break;else _0x5bd43a['push'](_0x5bd43a['shift']());}catch(_0x212ea7){_0x5bd43a['push'](_0x5bd43a['shift']());}}}(_0x57fc,0xba6c4),function(_0x43ab63,_0x587279){const _0x1782e6=_0x4724;typeof exports==_0x1782e6(0x178)&&typeof module<'u'?_0x587279(exports,require(_0x1782e6(0x16f)),require(_0x1782e6(0x16b)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require(_0x1782e6(0x13b)),require(_0x1782e6(0x161)),require(_0x1782e6(0x19c))):typeof define=='function'&&define['amd']?define([_0x1782e6(0x149),_0x1782e6(0x16f),'@univerjs-pro/license',_0x1782e6(0x127),_0x1782e6(0x13f),_0x1782e6(0x13b),_0x1782e6(0x161),_0x1782e6(0x19c)],_0x587279):(_0x43ab63=typeof globalThis<'u'?globalThis:_0x43ab63||self,_0x587279(_0x43ab63[_0x1782e6(0x176)]={},_0x43ab63[_0x1782e6(0x12a)],_0x43ab63['UniverProLicense'],_0x43ab63[_0x1782e6(0x154)],_0x43ab63['UniverThreadCommentUi'],_0x43ab63[_0x1782e6(0x152)],_0x43ab63[_0x1782e6(0x161)],_0x43ab63['UniverNetwork']));}(this,function(_0x2fd12b,_0x5f4e77,_0x33036e,_0x14da9b,_0x4dbacd,_0x565617,_0x176efb,_0x321d5e){'use strict';const _0x47c346=_0x4724;const _0x34747b=_0x47c346(0x19a);var _0x314a6f=(_0x13cbee=>(_0x13cbee[_0x13cbee[_0x47c346(0x16c)]=0x0]=_0x47c346(0x16c),_0x13cbee[_0x13cbee[_0x47c346(0x156)]=0x1]=_0x47c346(0x156),_0x13cbee[_0x13cbee[_0x47c346(0x157)]=-0x1]=_0x47c346(0x157),_0x13cbee))(_0x314a6f||{}),_0x250803=(_0x191b92=>(_0x191b92[_0x191b92['Unknown']=0x0]='Unknown',_0x191b92[_0x191b92['Add']=0x1]=_0x47c346(0x192),_0x191b92[_0x191b92[_0x47c346(0x194)]=0x2]='Reply',_0x191b92[_0x191b92['Edit']=0x3]=_0x47c346(0x14d),_0x191b92[_0x191b92['Delete']=0x4]=_0x47c346(0x167),_0x191b92[_0x191b92[_0x47c346(0x17a)]=0x5]='Solve',_0x191b92[_0x191b92[_0x47c346(0x157)]=-0x1]='UNRECOGNIZED',_0x191b92))(_0x250803||{});const _0x480270=_0x4c9d6d=>_0x14da9b[_0x47c346(0x122)](new Date(+_0x4c9d6d))[_0x47c346(0x121)](_0x47c346(0x148)),_0x487bce=async(_0x39ed40,_0x3e5ed5)=>{const _0x4475ca=_0x47c346,_0x2f9652=_0x39ed40[_0x4475ca(0x125)](_0x14da9b[_0x4475ca(0x145)]),_0x2a4d1a=_0x39ed40['get'](_0x321d5e[_0x4475ca(0x18c)]);_0x3e5ed5[_0x4475ca(0x16d)](_0x3e8352=>{const _0x47647b=_0x4475ca;_0x2f9652[_0x47647b(0x13e)](_0x3e8352)&&_0x3e5ed5[_0x47647b(0x199)](_0x3e8352);}),_0x3e5ed5[_0x4475ca(0x155)]&&(await _0x2a4d1a['get'](_0x4475ca(0x18d),{'params':{'userIDs':[..._0x3e5ed5]}}))[_0x4475ca(0x12d)][_0x4475ca(0x170)]['forEach'](_0x23f48c=>{const _0x1622af=_0x4475ca;_0x23f48c&&_0x2f9652[_0x1622af(0x13d)](_0x23f48c);});};var _0x28c777=Object['getOwnPropertyDescriptor'],_0x5c2ad0=(_0x32fb2b,_0x4afd8f,_0x3efe72,_0x2e4422)=>{for(var _0x20ed43=_0x2e4422>0x1?void 0x0:_0x2e4422?_0x28c777(_0x4afd8f,_0x3efe72):_0x4afd8f,_0x513c40=_0x32fb2b['length']-0x1,_0x30b958;_0x513c40>=0x0;_0x513c40--)(_0x30b958=_0x32fb2b[_0x513c40])&&(_0x20ed43=_0x30b958(_0x20ed43)||_0x20ed43);return _0x20ed43;},_0x3ac03e=(_0xdc7b27,_0x3a550f)=>(_0x5c9f90,_0x15b7eb)=>_0x3a550f(_0x5c9f90,_0x15b7eb,_0xdc7b27);let _0x1311dc=class extends _0x14da9b[_0x47c346(0x17f)]{constructor(_0x49621c,_0x2edd77,_0x27de5b,_0x46ca2c){const _0x4ac366=_0x47c346;super(),this['_commentService']=_0x49621c,this['_threadCommentModel']=_0x2edd77,this['_userService']=_0x27de5b,this[_0x4ac366(0x137)]=_0x46ca2c,this[_0x4ac366(0x146)](),this[_0x4ac366(0x120)]();}[_0x47c346(0x120)](){const _0x3f1396=_0x47c346;this[_0x3f1396(0x190)](this[_0x3f1396(0x123)][_0x3f1396(0x169)]['pipe'](_0x176efb[_0x3f1396(0x15e)](0x10))[_0x3f1396(0x164)](_0x31f174=>{const _0x2e4a06=_0x3f1396,_0x5244d0=new Set();_0x31f174[_0x2e4a06(0x16d)](_0x1806eb=>{const _0x5696e6=_0x2e4a06;switch(_0x1806eb[_0x5696e6(0x173)]){case _0x5696e6(0x140):{const _0x493b32=_0x1806eb['payload'][_0x5696e6(0x128)];_0x5244d0[_0x5696e6(0x140)](_0x493b32);break;}}}),_0x487bce(this['_injector'],_0x5244d0);}));}['_init'](){const _0x2a3110=_0x47c346;this[_0x2a3110(0x190)](this[_0x2a3110(0x15b)][_0x2a3110(0x169)]['subscribe'](async _0x2aad0c=>{const _0x53afd5=_0x2a3110;var _0x28ffbb,_0x13a530,_0xd4018,_0x2e0b0a;const _0x3fb413=(_0x28ffbb=this[_0x53afd5(0x123)][_0x53afd5(0x13a)](_0x2aad0c[_0x53afd5(0x15a)])[_0x53afd5(0x197)](_0x7ea0f=>_0x7ea0f['threadId']===_0x2aad0c[_0x53afd5(0x18b)]))==null?void 0x0:_0x28ffbb['root'];if(!_0x3fb413)return;const {unitId:_0x318920,subUnitId:_0x253323}=_0x3fb413;switch(_0x2aad0c[_0x53afd5(0x160)]&&this[_0x53afd5(0x175)][_0x53afd5(0x13d)](_0x2aad0c['user']),_0x2aad0c[_0x53afd5(0x173)]){case _0x250803[_0x53afd5(0x192)]:break;case _0x250803['Reply']:{this[_0x53afd5(0x123)][_0x53afd5(0x142)](_0x318920,_0x253323,{'unitId':_0x318920,'subUnitId':_0x253323,'ref':'','id':_0x2aad0c['replyId'],'dT':_0x480270(+_0x2aad0c[_0x53afd5(0x171)]),'threadId':_0x2aad0c[_0x53afd5(0x18b)],'personId':(_0xd4018=(_0x13a530=_0x2aad0c[_0x53afd5(0x160)])==null?void 0x0:_0x13a530[_0x53afd5(0x139)])!=null?_0xd4018:_0x2aad0c[_0x53afd5(0x133)],'text':JSON[_0x53afd5(0x180)](_0x2aad0c[_0x53afd5(0x196)]),'parentId':_0x3fb413['id']});break;}case _0x250803[_0x53afd5(0x167)]:{const _0x1fb606=this['_threadCommentModel'][_0x53afd5(0x165)](_0x318920,_0x253323,_0x2aad0c[_0x53afd5(0x138)]);_0x1fb606&&_0x1fb606[_0x53afd5(0x177)]&&this[_0x53afd5(0x123)][_0x53afd5(0x14c)](_0x318920,_0x253323,_0x2aad0c[_0x53afd5(0x138)]);break;}case _0x250803['Edit']:{this[_0x53afd5(0x123)][_0x53afd5(0x15f)](_0x318920,_0x253323,{'commentId':_0x2aad0c['replyId'],'text':JSON[_0x53afd5(0x180)](_0x2aad0c[_0x53afd5(0x196)])});break;}case _0x250803[_0x53afd5(0x17a)]:{const _0x1847a4=(_0x2e0b0a=this['_threadCommentModel'][_0x53afd5(0x13a)](_0x2aad0c[_0x53afd5(0x15a)])['find'](_0x2b6f40=>_0x2b6f40['threadId']===_0x2aad0c['threadId']))==null?void 0x0:_0x2e0b0a[_0x53afd5(0x186)];_0x1847a4&&this[_0x53afd5(0x123)][_0x53afd5(0x153)](_0x318920,_0x253323,_0x1847a4['id'],_0x2aad0c[_0x53afd5(0x1a1)]===_0x314a6f[_0x53afd5(0x156)]);break;}}}));}};_0x1311dc=_0x5c2ad0([_0x3ac03e(0x0,_0x14da9b[_0x47c346(0x1a2)](_0x5f4e77[_0x47c346(0x14e)])),_0x3ac03e(0x1,_0x14da9b[_0x47c346(0x1a2)](_0x565617[_0x47c346(0x129)])),_0x3ac03e(0x2,_0x14da9b['Inject'](_0x14da9b[_0x47c346(0x145)])),_0x3ac03e(0x3,_0x14da9b[_0x47c346(0x1a2)](_0x14da9b[_0x47c346(0x172)]))],_0x1311dc);const _0x17f210=_0x47c346(0x16a),_0x157de8={};var _0xdcd3a7=Object['getOwnPropertyDescriptor'],_0x34c7b4=(_0x225f17,_0x247b40,_0x1bfea3,_0x1564ed)=>{const _0x3e636c=_0x47c346;for(var _0x101ca8=_0x1564ed>0x1?void 0x0:_0x1564ed?_0xdcd3a7(_0x247b40,_0x1bfea3):_0x247b40,_0x15749b=_0x225f17[_0x3e636c(0x181)]-0x1,_0x275f87;_0x15749b>=0x0;_0x15749b--)(_0x275f87=_0x225f17[_0x15749b])&&(_0x101ca8=_0x275f87(_0x101ca8)||_0x101ca8);return _0x101ca8;},_0x487847=(_0x27af3c,_0x28c9b6)=>(_0x178612,_0x420fbd)=>_0x28c9b6(_0x178612,_0x420fbd,_0x27af3c);function _0x3ae681(_0x29b014,_0x37a62e){const _0x12be14=_0x47c346,_0x2ef74a=_0x29b014['replies'][0x0];return{..._0x37a62e,'id':_0x2ef74a[_0x12be14(0x138)],'resolved':_0x29b014[_0x12be14(0x1a1)]===0x1,'dT':_0x480270(_0x2ef74a[_0x12be14(0x171)]),'personId':_0x2ef74a[_0x12be14(0x133)],'threadId':_0x2ef74a[_0x12be14(0x18b)]};}function _0x1ad3d4(_0x3ac632,_0x418031,_0x5ca85b){const _0x5b9f8b=_0x47c346;var _0x15035c,_0x3451d4;if(((_0x3451d4=(_0x15035c=_0x3ac632==null?void 0x0:_0x3ac632[_0x5b9f8b(0x158)])==null?void 0x0:_0x15035c['length'])!=null?_0x3451d4:0x0)>0x0){const _0xd271e8=(_0x404330,_0x575bcd)=>({'id':_0x404330[_0x5b9f8b(0x138)],'threadId':_0x404330[_0x5b9f8b(0x18b)],'dT':_0x480270(_0x404330[_0x5b9f8b(0x171)]),'personId':_0x404330[_0x5b9f8b(0x133)],'resolved':_0x3ac632[_0x5b9f8b(0x1a1)]===_0x314a6f[_0x5b9f8b(0x156)],'unitId':_0x418031,'subUnitId':_0x5ca85b,'text':JSON['parse'](_0x404330[_0x5b9f8b(0x196)]),'parentId':_0x575bcd}),_0x27dfb9=_0xd271e8(_0x3ac632[_0x5b9f8b(0x158)][0x0]);return{..._0x27dfb9,'children':_0x3ac632['replies'][_0x5b9f8b(0x19d)](0x1)[_0x5b9f8b(0x19b)](_0x2ce00d=>_0xd271e8(_0x2ce00d,_0x27dfb9['id']))};}return null;}let _0x40eb98=class{constructor(_0x421d49,_0x597853,_0x247e02,_0x571955){const _0x100781=_0x47c346;this[_0x100781(0x144)]=_0x421d49,this[_0x100781(0x175)]=_0x597853,this[_0x100781(0x124)]=_0x247e02,this['_injector']=_0x571955;}async['addComment'](_0xb721){const _0x31a520=_0x47c346;var _0x186682,_0x2e8e3f;const {parentId:_0x328996,unitId:_0xbf8718,text:_0x4d307d,threadId:_0x2efb2c}=_0xb721,_0x4c240b=(_0x2e8e3f=(_0x186682=_0x4d307d[_0x31a520(0x168)])==null?void 0x0:_0x186682[_0x31a520(0x147)](_0x38adf0=>_0x38adf0[_0x31a520(0x179)]===_0x14da9b[_0x31a520(0x135)]['COMMENT'])[_0x31a520(0x19b)](_0x10961c=>_0x10961c[_0x31a520(0x13c)]))!=null?_0x2e8e3f:[],_0x207f6d=JSON[_0x31a520(0x131)](_0x4d307d),_0x26f6ef=(await this[_0x31a520(0x124)]['requireSession'](_0xbf8718))[_0x31a520(0x15c)]();if(_0x328996){const _0x57869a={'memberId':_0x26f6ef,'unitId':_0xbf8718,'content':_0x207f6d,'mention':_0x4c240b,'threadId':_0x2efb2c},_0x2332ca=(await this[_0x31a520(0x144)][_0x31a520(0x17c)]('/universer-api/comment/unit/'+_0xbf8718+_0x31a520(0x130),{'body':_0x57869a}))[_0x31a520(0x12d)][_0x31a520(0x184)];return{..._0xb721,'id':_0x2332ca[_0x31a520(0x138)],'dT':_0x14da9b[_0x31a520(0x122)](+_0x2332ca[_0x31a520(0x171)])[_0x31a520(0x121)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2332ca[_0x31a520(0x133)]};}else{const _0x60d63c={'memberId':_0x26f6ef,'unitId':_0xbf8718,'content':_0x207f6d,'mention':_0x4c240b},_0x36cd60=await this[_0x31a520(0x144)][_0x31a520(0x17c)](_0x31a520(0x126)+_0xbf8718+'/add',{'body':_0x60d63c});return _0x3ae681(_0x36cd60[_0x31a520(0x12d)][_0x31a520(0x195)],_0xb721);}}async['updateComment'](_0x1ceff5){const _0x479557=_0x47c346;var _0x4fd7bd,_0x4af6a7;const {text:_0x2c8ad4,unitId:_0x58793d}=_0x1ceff5,_0x5cefb7=(_0x4af6a7=(_0x4fd7bd=_0x2c8ad4[_0x479557(0x168)])==null?void 0x0:_0x4fd7bd[_0x479557(0x147)](_0x54f38d=>_0x54f38d['rangeType']===_0x14da9b[_0x479557(0x135)][_0x479557(0x15d)])[_0x479557(0x19b)](_0x4b9c13=>_0x4b9c13[_0x479557(0x13c)]))!=null?_0x4af6a7:[],_0x63d4b0=JSON['stringify'](_0x2c8ad4),_0x16032b=_0x1ceff5[_0x479557(0x18b)],_0x33e476=_0x1ceff5['id'],_0x536c8a={'memberId':(await this[_0x479557(0x124)][_0x479557(0x12f)](_0x58793d))[_0x479557(0x15c)](),'unitId':_0x58793d,'threadId':_0x16032b,'mention':_0x5cefb7,'content':_0x63d4b0,'replyId':_0x33e476},_0x4522ed=await this['_httpService']['post'](_0x479557(0x126)+_0x58793d+_0x479557(0x189),{'body':_0x536c8a});return!_0x4522ed[_0x479557(0x12d)][_0x479557(0x150)]||_0x4522ed[_0x479557(0x12d)][_0x479557(0x150)]['code']===0x1;}async[_0x47c346(0x153)](_0x2a20d3){const _0x4d0537=_0x47c346,{unitId:_0x47471e}=_0x2a20d3,_0x24785c=_0x2a20d3['threadId'],_0xbfc099={'memberId':this[_0x4d0537(0x175)][_0x4d0537(0x17d)]()[_0x4d0537(0x139)],'unitId':_0x47471e,'threadId':_0x24785c,'solved':_0x2a20d3[_0x4d0537(0x14b)]?_0x314a6f[_0x4d0537(0x156)]:_0x314a6f[_0x4d0537(0x16c)]},_0x281d1d=await this[_0x4d0537(0x144)]['post']('/universer-api/comment/unit/'+_0x47471e+'/solved',{'body':_0xbfc099});return!_0x281d1d[_0x4d0537(0x12d)]['error']||_0x281d1d[_0x4d0537(0x12d)]['error']['code']===0x1;}async[_0x47c346(0x14c)](_0x3b01c2,_0x3010ea,_0x245fc0,_0x25747a){const _0x16b619=_0x47c346,_0x2b85c7={'memberId':(await this[_0x16b619(0x124)]['requireSession'](_0x3b01c2))[_0x16b619(0x15c)](),'threadId':_0x245fc0,'replyId':_0x25747a,'unitId':_0x3b01c2},_0xe405bf=await this['_httpService'][_0x16b619(0x17c)]('/universer-api/comment/unit/'+_0x3b01c2+_0x16b619(0x151),{'body':_0x2b85c7});return!_0xe405bf[_0x16b619(0x12d)][_0x16b619(0x150)]||_0xe405bf[_0x16b619(0x12d)]['error'][_0x16b619(0x17e)]===0x1;}async['listComments'](_0x151354,_0x4f32bb,_0x5e24c6){const _0xab8cce=_0x47c346,_0x5489f9={'unitId':_0x151354,'threadId':_0x5e24c6},_0x333dcd=await this[_0xab8cce(0x144)][_0xab8cce(0x17c)](_0xab8cce(0x126)+_0x151354+_0xab8cce(0x134),{'body':_0x5489f9}),_0x4ada1e=_0x5e24c6[_0xab8cce(0x19b)](_0x55486b=>_0x1ad3d4(_0x333dcd[_0xab8cce(0x12d)][_0xab8cce(0x18e)][_0x55486b],_0x151354,_0x4f32bb))['filter'](Boolean);return Object['values'](_0x333dcd[_0xab8cce(0x12d)][_0xab8cce(0x170)])[_0xab8cce(0x16d)](_0x3ef8e5=>{const _0x2b9076=_0xab8cce;this[_0x2b9076(0x175)]['addUser'](_0x3ef8e5);}),_0x4ada1e;}[_0x47c346(0x1a0)](_0x2ee603){const _0x5a4445=_0x47c346;return{'id':_0x2ee603['id'],'threadId':_0x2ee603[_0x5a4445(0x18b)],'ref':_0x2ee603[_0x5a4445(0x16e)]};}};_0x40eb98=_0x34c7b4([_0x487847(0x0,_0x14da9b[_0x47c346(0x1a2)](_0x321d5e['HTTPService'])),_0x487847(0x1,_0x14da9b[_0x47c346(0x1a2)](_0x14da9b[_0x47c346(0x145)])),_0x487847(0x2,_0x14da9b[_0x47c346(0x1a2)](_0x5f4e77[_0x47c346(0x12e)])),_0x487847(0x3,_0x14da9b[_0x47c346(0x1a2)](_0x14da9b['Injector']))],_0x40eb98);var _0x2a40d7=Object[_0x47c346(0x143)],_0x3699e7=(_0x5c3dc5,_0x2d17c8,_0x5b1a6e,_0x3daedf)=>{const _0x5eac97=_0x47c346;for(var _0x142dda=_0x3daedf>0x1?void 0x0:_0x3daedf?_0x2a40d7(_0x2d17c8,_0x5b1a6e):_0x2d17c8,_0x5d21=_0x5c3dc5[_0x5eac97(0x181)]-0x1,_0x37e26d;_0x5d21>=0x0;_0x5d21--)(_0x37e26d=_0x5c3dc5[_0x5d21])&&(_0x142dda=_0x37e26d(_0x142dda)||_0x142dda);return _0x142dda;},_0x473284=(_0x562417,_0x54811c)=>(_0xcfdbb1,_0x4efb2c)=>_0x54811c(_0xcfdbb1,_0x4efb2c,_0x562417);let _0x3860c6=class extends _0x14da9b[_0x47c346(0x17f)]{constructor(_0x49f74a,_0xcc9f1c){const _0x263ea1=_0x47c346;super(),this[_0x263ea1(0x141)]=_0x49f74a,this['_threadCommentDataSource']=_0xcc9f1c,this[_0x263ea1(0x14a)]();}[_0x47c346(0x14a)](){const _0x29f08f=_0x47c346;this[_0x29f08f(0x141)][_0x29f08f(0x11f)]=this[_0x29f08f(0x191)],this['_threadCommentDataSourceService'][_0x29f08f(0x18a)]=!0x1;}};_0x3860c6=_0x3699e7([_0x473284(0x0,_0x565617['IThreadCommentDataSourceService']),_0x473284(0x1,_0x14da9b['Inject'](_0x40eb98))],_0x3860c6);var _0x416996=Object[_0x47c346(0x132)],_0x260ead=Object[_0x47c346(0x143)],_0x5308f8=(_0x2997d0,_0x4833bf,_0x213226)=>_0x4833bf in _0x2997d0?_0x416996(_0x2997d0,_0x4833bf,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x213226}):_0x2997d0[_0x4833bf]=_0x213226,_0x5ceca4=(_0x4207bf,_0x2aa405,_0x2b9207,_0x478b46)=>{for(var _0x19f5e4=_0x478b46>0x1?void 0x0:_0x478b46?_0x260ead(_0x2aa405,_0x2b9207):_0x2aa405,_0x40931a=_0x4207bf['length']-0x1,_0x4caa70;_0x40931a>=0x0;_0x40931a--)(_0x4caa70=_0x4207bf[_0x40931a])&&(_0x19f5e4=_0x4caa70(_0x19f5e4)||_0x19f5e4);return _0x19f5e4;},_0x52b6a7=(_0x54baa6,_0x8a967f)=>(_0x22fca5,_0x57a211)=>_0x8a967f(_0x22fca5,_0x57a211,_0x54baa6),_0x13e52a=(_0x4a360e,_0xf27441,_0x2ea689)=>_0x5308f8(_0x4a360e,typeof _0xf27441!='symbol'?_0xf27441+'':_0xf27441,_0x2ea689);_0x2fd12b[_0x47c346(0x193)]=class extends _0x14da9b['Plugin']{constructor(_0x56f9a1=_0x157de8,_0xad8a78,_0x11015b){const _0x322217=_0x47c346;super(),this[_0x322217(0x188)]=_0x56f9a1,this[_0x322217(0x137)]=_0xad8a78,this[_0x322217(0x185)]=_0x11015b;const {..._0x1708a1}=_0x14da9b[_0x322217(0x166)]({},_0x157de8,this[_0x322217(0x188)]);this['_configService'][_0x322217(0x12c)](_0x17f210,_0x1708a1);}[_0x47c346(0x14f)](){const _0x5920fe=_0x47c346;[[_0x40eb98],[_0x3860c6],[_0x1311dc]][_0x5920fe(0x16d)](_0x55fe7c=>{const _0x4ac28c=_0x5920fe;this[_0x4ac28c(0x137)][_0x4ac28c(0x140)](_0x55fe7c);});}[_0x47c346(0x136)](){const _0x5ca0a0=_0x47c346;this['_injector'][_0x5ca0a0(0x125)](_0x3860c6),this[_0x5ca0a0(0x137)]['get'](_0x1311dc);}},_0x13e52a(_0x2fd12b[_0x47c346(0x193)],'pluginName',_0x34747b),_0x13e52a(_0x2fd12b[_0x47c346(0x193)],'type',_0x14da9b[_0x47c346(0x11e)][_0x47c346(0x162)]),_0x2fd12b[_0x47c346(0x193)]=_0x5ceca4([_0x14da9b[_0x47c346(0x174)](_0x4dbacd['UniverThreadCommentUIPlugin'],_0x5f4e77[_0x47c346(0x182)],_0x33036e[_0x47c346(0x159)]),_0x52b6a7(0x1,_0x14da9b[_0x47c346(0x1a2)](_0x14da9b[_0x47c346(0x172)])),_0x52b6a7(0x2,_0x14da9b['IConfigService'])],_0x2fd12b[_0x47c346(0x193)]),Object[_0x47c346(0x132)](_0x2fd12b,Symbol[_0x47c346(0x12b)],{'value':'Module'});}));
1
+ (function(_0x76bc87,_0x4fec8b){const _0x29f2f9=_0x192a,_0x3eb833=_0x76bc87();while(!![]){try{const _0x2c5a8b=parseInt(_0x29f2f9(0x18d))/0x1+-parseInt(_0x29f2f9(0x1ba))/0x2*(parseInt(_0x29f2f9(0x1db))/0x3)+parseInt(_0x29f2f9(0x17d))/0x4+parseInt(_0x29f2f9(0x186))/0x5*(-parseInt(_0x29f2f9(0x1b2))/0x6)+parseInt(_0x29f2f9(0x1ec))/0x7+parseInt(_0x29f2f9(0x1ad))/0x8*(-parseInt(_0x29f2f9(0x1f2))/0x9)+parseInt(_0x29f2f9(0x191))/0xa;if(_0x2c5a8b===_0x4fec8b)break;else _0x3eb833['push'](_0x3eb833['shift']());}catch(_0x5702d7){_0x3eb833['push'](_0x3eb833['shift']());}}}(_0xaeb8,0xeaf1d),function(_0x5cb840,_0x4111d8){const _0x8d1591=_0x192a;typeof exports=='object'&&typeof module<'u'?_0x4111d8(exports,require(_0x8d1591(0x1c7)),require(_0x8d1591(0x1d7)),require(_0x8d1591(0x1f4)),require('@univerjs/thread-comment-ui'),require(_0x8d1591(0x185)),require(_0x8d1591(0x190)),require(_0x8d1591(0x19e))):typeof define==_0x8d1591(0x178)&&define[_0x8d1591(0x1b6)]?define([_0x8d1591(0x1c9),_0x8d1591(0x1c7),_0x8d1591(0x1d7),_0x8d1591(0x1f4),_0x8d1591(0x1f3),_0x8d1591(0x185),_0x8d1591(0x190),'@univerjs/network'],_0x4111d8):(_0x5cb840=typeof globalThis<'u'?globalThis:_0x5cb840||self,_0x4111d8(_0x5cb840[_0x8d1591(0x17b)]={},_0x5cb840['UniverProCollaborationClient'],_0x5cb840[_0x8d1591(0x1a3)],_0x5cb840['UniverCore'],_0x5cb840['UniverThreadCommentUi'],_0x5cb840[_0x8d1591(0x1f0)],_0x5cb840['rxjs'],_0x5cb840['UniverNetwork']));}(this,function(_0x43f8aa,_0x53f586,_0x1e53be,_0x121713,_0x253457,_0x5c30e5,_0x2ea804,_0x28c9bf){'use strict';const _0x511744=_0x192a;const _0x28e132=_0x511744(0x1e5);var _0xe45650=(_0x298f71=>(_0x298f71[_0x298f71[_0x511744(0x1a5)]=0x0]='OpenOrReOpen',_0x298f71[_0x298f71[_0x511744(0x1cf)]=0x1]='Solved',_0x298f71[_0x298f71[_0x511744(0x195)]=-0x1]=_0x511744(0x195),_0x298f71))(_0xe45650||{}),_0x5417fa=(_0xd0d8d=>(_0xd0d8d[_0xd0d8d[_0x511744(0x17c)]=0x0]='Unknown',_0xd0d8d[_0xd0d8d[_0x511744(0x1eb)]=0x1]=_0x511744(0x1eb),_0xd0d8d[_0xd0d8d['Reply']=0x2]=_0x511744(0x176),_0xd0d8d[_0xd0d8d['Edit']=0x3]=_0x511744(0x1d0),_0xd0d8d[_0xd0d8d[_0x511744(0x1d9)]=0x4]=_0x511744(0x1d9),_0xd0d8d[_0xd0d8d[_0x511744(0x1d6)]=0x5]=_0x511744(0x1d6),_0xd0d8d[_0xd0d8d[_0x511744(0x195)]=-0x1]=_0x511744(0x195),_0xd0d8d))(_0x5417fa||{});const _0x271dee=_0x5d5d05=>_0x121713[_0x511744(0x1b5)](new Date(+_0x5d5d05))['format'](_0x511744(0x1e2)),_0x2dc5dd=async(_0x2caa4f,_0x5e23d9)=>{const _0x13ce0c=_0x511744,_0x552c4e=_0x2caa4f[_0x13ce0c(0x1e3)](_0x121713[_0x13ce0c(0x1e9)]),_0x594471=_0x2caa4f[_0x13ce0c(0x1e3)](_0x28c9bf[_0x13ce0c(0x1cc)]);_0x5e23d9[_0x13ce0c(0x1c1)](_0x36af99=>{const _0x306c5b=_0x13ce0c;_0x552c4e[_0x306c5b(0x1e4)](_0x36af99)&&_0x5e23d9[_0x306c5b(0x184)](_0x36af99);}),_0x5e23d9[_0x13ce0c(0x1c0)]&&(await _0x594471[_0x13ce0c(0x1e3)](_0x13ce0c(0x18e),{'params':{'userIDs':[..._0x5e23d9]}}))[_0x13ce0c(0x1d8)][_0x13ce0c(0x1cb)][_0x13ce0c(0x1c1)](_0x5a2772=>{const _0x5f5426=_0x13ce0c;_0x5a2772&&_0x552c4e[_0x5f5426(0x193)](_0x5a2772);});};var _0x1582c0=Object[_0x511744(0x17e)],_0xdae3c1=(_0x4e991a,_0x20b91a,_0x3d9a9e,_0x32bd00)=>{const _0x3fc898=_0x511744;for(var _0x433028=_0x32bd00>0x1?void 0x0:_0x32bd00?_0x1582c0(_0x20b91a,_0x3d9a9e):_0x20b91a,_0x25cbe8=_0x4e991a[_0x3fc898(0x18c)]-0x1,_0x49968b;_0x25cbe8>=0x0;_0x25cbe8--)(_0x49968b=_0x4e991a[_0x25cbe8])&&(_0x433028=_0x49968b(_0x433028)||_0x433028);return _0x433028;},_0x55ae04=(_0x5c8d4d,_0x262d7b)=>(_0xd41479,_0x57f428)=>_0x262d7b(_0xd41479,_0x57f428,_0x5c8d4d);let _0x1de8a2=class extends _0x121713[_0x511744(0x1ef)]{constructor(_0x5409c9,_0x415e70,_0x4842d5,_0x1b55e8){const _0x17ceca=_0x511744;super(),this[_0x17ceca(0x192)]=_0x5409c9,this[_0x17ceca(0x19a)]=_0x415e70,this[_0x17ceca(0x180)]=_0x4842d5,this['_injector']=_0x1b55e8,this[_0x17ceca(0x1d5)](),this[_0x17ceca(0x1e6)]();}[_0x511744(0x1e6)](){const _0x312af1=_0x511744;this[_0x312af1(0x1c6)](this[_0x312af1(0x19a)][_0x312af1(0x1bf)][_0x312af1(0x197)](_0x2ea804[_0x312af1(0x1aa)](0x10))[_0x312af1(0x1ca)](_0xb363d=>{const _0x4e2907=_0x312af1,_0x1ee735=new Set();_0xb363d['forEach'](_0x16cce5=>{const _0x1a606e=_0x192a;switch(_0x16cce5[_0x1a606e(0x1af)]){case _0x1a606e(0x1c2):{const _0x29a0bd=_0x16cce5['payload']['personId'];_0x1ee735[_0x1a606e(0x1c2)](_0x29a0bd);break;}}}),_0x2dc5dd(this[_0x4e2907(0x1d1)],_0x1ee735);}));}[_0x511744(0x1d5)](){const _0x9deed7=_0x511744;this[_0x9deed7(0x1c6)](this['_commentService'][_0x9deed7(0x1bf)]['subscribe'](async _0x5b443f=>{const _0x38b788=_0x9deed7;var _0x4f5acb,_0x1366fc,_0x473592,_0x51f714;const _0x2c7bfb=(_0x4f5acb=this[_0x38b788(0x19a)][_0x38b788(0x1a7)](_0x5b443f[_0x38b788(0x1ab)])[_0x38b788(0x19c)](_0x13fa3a=>_0x13fa3a[_0x38b788(0x1de)]===_0x5b443f[_0x38b788(0x1de)]))==null?void 0x0:_0x4f5acb[_0x38b788(0x188)];if(!_0x2c7bfb)return;const {unitId:_0x6717a4,subUnitId:_0x5d7fe9}=_0x2c7bfb;switch(_0x5b443f[_0x38b788(0x1b9)]&&this[_0x38b788(0x180)][_0x38b788(0x193)](_0x5b443f['user']),_0x5b443f[_0x38b788(0x1af)]){case _0x5417fa[_0x38b788(0x1eb)]:break;case _0x5417fa[_0x38b788(0x176)]:{this[_0x38b788(0x19a)][_0x38b788(0x1ea)](_0x6717a4,_0x5d7fe9,{'unitId':_0x6717a4,'subUnitId':_0x5d7fe9,'ref':'','id':_0x5b443f['replyId'],'dT':_0x271dee(+_0x5b443f[_0x38b788(0x1ed)]),'threadId':_0x5b443f[_0x38b788(0x1de)],'personId':(_0x473592=(_0x1366fc=_0x5b443f[_0x38b788(0x1b9)])==null?void 0x0:_0x1366fc[_0x38b788(0x1bc)])!=null?_0x473592:_0x5b443f[_0x38b788(0x1b0)],'text':JSON[_0x38b788(0x1bb)](_0x5b443f[_0x38b788(0x1c8)]),'parentId':_0x2c7bfb['id']});break;}case _0x5417fa[_0x38b788(0x1d9)]:{const _0x32418c=this['_threadCommentModel']['getComment'](_0x6717a4,_0x5d7fe9,_0x5b443f[_0x38b788(0x1d3)]);_0x32418c&&_0x32418c['parentId']&&this[_0x38b788(0x19a)][_0x38b788(0x1b4)](_0x6717a4,_0x5d7fe9,_0x5b443f[_0x38b788(0x1d3)]);break;}case _0x5417fa[_0x38b788(0x1d0)]:{this['_threadCommentModel'][_0x38b788(0x1b7)](_0x6717a4,_0x5d7fe9,{'commentId':_0x5b443f['replyId'],'text':JSON[_0x38b788(0x1bb)](_0x5b443f[_0x38b788(0x1c8)])});break;}case _0x5417fa[_0x38b788(0x1d6)]:{const _0x3ae916=(_0x51f714=this[_0x38b788(0x19a)][_0x38b788(0x1a7)](_0x5b443f['unitId'])[_0x38b788(0x19c)](_0x3708d6=>_0x3708d6[_0x38b788(0x1de)]===_0x5b443f[_0x38b788(0x1de)]))==null?void 0x0:_0x51f714[_0x38b788(0x188)];_0x3ae916&&this[_0x38b788(0x19a)][_0x38b788(0x19f)](_0x6717a4,_0x5d7fe9,_0x3ae916['id'],_0x5b443f[_0x38b788(0x179)]===_0xe45650[_0x38b788(0x1cf)]);break;}}}));}};_0x1de8a2=_0xdae3c1([_0x55ae04(0x0,_0x121713[_0x511744(0x1ac)](_0x53f586[_0x511744(0x1cd)])),_0x55ae04(0x1,_0x121713['Inject'](_0x5c30e5[_0x511744(0x1b8)])),_0x55ae04(0x2,_0x121713[_0x511744(0x1ac)](_0x121713[_0x511744(0x1e9)])),_0x55ae04(0x3,_0x121713[_0x511744(0x1ac)](_0x121713['Injector']))],_0x1de8a2);const _0x32577b='thread-comment-data-source.config',_0xd3a4b7={};var _0x2473ff=Object[_0x511744(0x17e)],_0x3cfd68=(_0x5b46d5,_0x5d3bb1,_0xca25a,_0x16f0b4)=>{for(var _0x9f8dda=_0x16f0b4>0x1?void 0x0:_0x16f0b4?_0x2473ff(_0x5d3bb1,_0xca25a):_0x5d3bb1,_0xa67d3f=_0x5b46d5['length']-0x1,_0x3ce2e6;_0xa67d3f>=0x0;_0xa67d3f--)(_0x3ce2e6=_0x5b46d5[_0xa67d3f])&&(_0x9f8dda=_0x3ce2e6(_0x9f8dda)||_0x9f8dda);return _0x9f8dda;},_0x3fc030=(_0x18e9bf,_0x126147)=>(_0x447b9a,_0x34dda1)=>_0x126147(_0x447b9a,_0x34dda1,_0x18e9bf);function _0x2178cb(_0x745df6,_0x15ade2){const _0x4ef0c4=_0x511744,_0x1f7494=_0x745df6[_0x4ef0c4(0x1a1)][0x0];return{..._0x15ade2,'id':_0x1f7494['replyId'],'resolved':_0x745df6[_0x4ef0c4(0x179)]===0x1,'dT':_0x271dee(_0x1f7494[_0x4ef0c4(0x1ed)]),'personId':_0x1f7494['userId'],'threadId':_0x1f7494[_0x4ef0c4(0x1de)]};}function _0x55d0ac(_0x3b3852,_0xad7882,_0x1169ee){const _0x14a454=_0x511744;var _0x102d64,_0x5c046a;if(((_0x5c046a=(_0x102d64=_0x3b3852==null?void 0x0:_0x3b3852[_0x14a454(0x1a1)])==null?void 0x0:_0x102d64['length'])!=null?_0x5c046a:0x0)>0x0){const _0x5c0d52=(_0x5374c1,_0x22acc5)=>({'id':_0x5374c1['replyId'],'threadId':_0x5374c1['threadId'],'dT':_0x271dee(_0x5374c1[_0x14a454(0x1ed)]),'personId':_0x5374c1[_0x14a454(0x1b0)],'resolved':_0x3b3852[_0x14a454(0x179)]===_0xe45650[_0x14a454(0x1cf)],'unitId':_0xad7882,'subUnitId':_0x1169ee,'text':JSON[_0x14a454(0x1bb)](_0x5374c1[_0x14a454(0x1c8)]),'parentId':_0x22acc5}),_0x133563=_0x5c0d52(_0x3b3852[_0x14a454(0x1a1)][0x0]);return{..._0x133563,'children':_0x3b3852[_0x14a454(0x1a1)][_0x14a454(0x175)](0x1)['map'](_0x53bca6=>_0x5c0d52(_0x53bca6,_0x133563['id']))};}return null;}let _0x5b5a0a=class{constructor(_0x14fd7c,_0x4f0803,_0x246d26,_0xc54704){const _0xa98bef=_0x511744;this[_0xa98bef(0x196)]=_0x14fd7c,this[_0xa98bef(0x180)]=_0x4f0803,this[_0xa98bef(0x1c5)]=_0x246d26,this[_0xa98bef(0x1d1)]=_0xc54704;}async[_0x511744(0x1ea)](_0x524bbf){const _0x5eb254=_0x511744;var _0x11094a,_0x12cd25;const {parentId:_0x13f680,unitId:_0x1d09c7,text:_0x573aa8,threadId:_0x59abbc}=_0x524bbf,_0xb59130=(_0x12cd25=(_0x11094a=_0x573aa8[_0x5eb254(0x183)])==null?void 0x0:_0x11094a[_0x5eb254(0x1c3)](_0x86c698=>_0x86c698[_0x5eb254(0x1ee)]===_0x121713[_0x5eb254(0x1b3)][_0x5eb254(0x1da)])[_0x5eb254(0x1a4)](_0x2eedf6=>_0x2eedf6[_0x5eb254(0x18f)]))!=null?_0x12cd25:[],_0x163e92=JSON['stringify'](_0x573aa8),_0xeb7dbe=(await this[_0x5eb254(0x1c5)][_0x5eb254(0x194)](_0x1d09c7))[_0x5eb254(0x1a9)]();if(_0x13f680){const _0x238a52={'memberId':_0xeb7dbe,'unitId':_0x1d09c7,'content':_0x163e92,'mention':_0xb59130,'threadId':_0x59abbc},_0xfe1a3f=(await this['_httpService'][_0x5eb254(0x1f5)](_0x5eb254(0x1b1)+_0x1d09c7+'/reply',{'body':_0x238a52}))['body'][_0x5eb254(0x198)];return{..._0x524bbf,'id':_0xfe1a3f[_0x5eb254(0x1d3)],'dT':_0x121713[_0x5eb254(0x1b5)](+_0xfe1a3f[_0x5eb254(0x1ed)])[_0x5eb254(0x1c4)](_0x5eb254(0x1e2)),'personId':_0xfe1a3f[_0x5eb254(0x1b0)]};}else{const _0x77c272={'memberId':_0xeb7dbe,'unitId':_0x1d09c7,'content':_0x163e92,'mention':_0xb59130},_0x2466e8=await this[_0x5eb254(0x196)][_0x5eb254(0x1f5)](_0x5eb254(0x1b1)+_0x1d09c7+_0x5eb254(0x1e7),{'body':_0x77c272});return _0x2178cb(_0x2466e8[_0x5eb254(0x1d8)][_0x5eb254(0x1d4)],_0x524bbf);}}async[_0x511744(0x1b7)](_0x39e812){const _0x405ad1=_0x511744;var _0x11cdb8,_0x5d971c;const {text:_0x229c2a,unitId:_0x5a42fc}=_0x39e812,_0x333a2c=(_0x5d971c=(_0x11cdb8=_0x229c2a[_0x405ad1(0x183)])==null?void 0x0:_0x11cdb8[_0x405ad1(0x1c3)](_0x5a90d7=>_0x5a90d7[_0x405ad1(0x1ee)]===_0x121713['CustomRangeType'][_0x405ad1(0x1da)])[_0x405ad1(0x1a4)](_0x434ad1=>_0x434ad1[_0x405ad1(0x18f)]))!=null?_0x5d971c:[],_0x46de1d=JSON[_0x405ad1(0x1ae)](_0x229c2a),_0x4e7c06=_0x39e812['threadId'],_0x2cf262=_0x39e812['id'],_0x31c7a2={'memberId':(await this[_0x405ad1(0x1c5)][_0x405ad1(0x194)](_0x5a42fc))[_0x405ad1(0x1a9)](),'unitId':_0x5a42fc,'threadId':_0x4e7c06,'mention':_0x333a2c,'content':_0x46de1d,'replyId':_0x2cf262},_0x5c3b52=await this['_httpService'][_0x405ad1(0x1f5)](_0x405ad1(0x1b1)+_0x5a42fc+_0x405ad1(0x1f1),{'body':_0x31c7a2});return!_0x5c3b52[_0x405ad1(0x1d8)][_0x405ad1(0x177)]||_0x5c3b52[_0x405ad1(0x1d8)][_0x405ad1(0x177)][_0x405ad1(0x18b)]===0x1;}async[_0x511744(0x19f)](_0x1cc4d1){const _0x2866ca=_0x511744,{unitId:_0x4dbb67}=_0x1cc4d1,_0x4189de=_0x1cc4d1['threadId'],_0x4e0df4={'memberId':this['_userService']['getCurrentUser']()[_0x2866ca(0x1bc)],'unitId':_0x4dbb67,'threadId':_0x4189de,'solved':_0x1cc4d1[_0x2866ca(0x1d2)]?_0xe45650[_0x2866ca(0x1cf)]:_0xe45650[_0x2866ca(0x1a5)]},_0x448347=await this[_0x2866ca(0x196)][_0x2866ca(0x1f5)](_0x2866ca(0x1b1)+_0x4dbb67+_0x2866ca(0x1be),{'body':_0x4e0df4});return!_0x448347[_0x2866ca(0x1d8)][_0x2866ca(0x177)]||_0x448347[_0x2866ca(0x1d8)]['error']['code']===0x1;}async[_0x511744(0x1b4)](_0x399838,_0x5616ac,_0x2dc4d0,_0x14cda7){const _0x5a252a=_0x511744,_0xc26bb4={'memberId':(await this[_0x5a252a(0x1c5)]['requireSession'](_0x399838))[_0x5a252a(0x1a9)](),'threadId':_0x2dc4d0,'replyId':_0x14cda7,'unitId':_0x399838},_0x3df2f1=await this[_0x5a252a(0x196)][_0x5a252a(0x1f5)]('/universer-api/comment/unit/'+_0x399838+_0x5a252a(0x1bd),{'body':_0xc26bb4});return!_0x3df2f1[_0x5a252a(0x1d8)]['error']||_0x3df2f1['body'][_0x5a252a(0x177)][_0x5a252a(0x18b)]===0x1;}async[_0x511744(0x1e8)](_0x3d7a38,_0x4c30e9,_0x2f2e2d){const _0x3e78db=_0x511744,_0x534c76={'unitId':_0x3d7a38,'threadId':_0x2f2e2d},_0x44ee37=await this[_0x3e78db(0x196)][_0x3e78db(0x1f5)](_0x3e78db(0x1b1)+_0x3d7a38+_0x3e78db(0x173),{'body':_0x534c76}),_0x19266b=_0x2f2e2d[_0x3e78db(0x1a4)](_0x5dbc8d=>_0x55d0ac(_0x44ee37[_0x3e78db(0x1d8)]['comments'][_0x5dbc8d],_0x3d7a38,_0x4c30e9))[_0x3e78db(0x1c3)](Boolean);return Object[_0x3e78db(0x1a8)](_0x44ee37['body'][_0x3e78db(0x1cb)])['forEach'](_0x57001c=>{const _0x5241c9=_0x3e78db;this[_0x5241c9(0x180)][_0x5241c9(0x193)](_0x57001c);}),_0x19266b;}['saveCommentToSnapshot'](_0xd09e3c){const _0x3b77db=_0x511744;return{'id':_0xd09e3c['id'],'threadId':_0xd09e3c[_0x3b77db(0x1de)],'ref':_0xd09e3c[_0x3b77db(0x1e1)]};}};_0x5b5a0a=_0x3cfd68([_0x3fc030(0x0,_0x121713[_0x511744(0x1ac)](_0x28c9bf[_0x511744(0x1cc)])),_0x3fc030(0x1,_0x121713[_0x511744(0x1ac)](_0x121713[_0x511744(0x1e9)])),_0x3fc030(0x2,_0x121713[_0x511744(0x1ac)](_0x53f586['CollaborationSessionService'])),_0x3fc030(0x3,_0x121713[_0x511744(0x1ac)](_0x121713[_0x511744(0x1f6)]))],_0x5b5a0a);var _0x9de0cf=Object[_0x511744(0x17e)],_0x4a65c3=(_0x409d89,_0x446129,_0x4a8dcc,_0x4d0796)=>{const _0x50ee1a=_0x511744;for(var _0x48f750=_0x4d0796>0x1?void 0x0:_0x4d0796?_0x9de0cf(_0x446129,_0x4a8dcc):_0x446129,_0x53d138=_0x409d89[_0x50ee1a(0x18c)]-0x1,_0x55dc43;_0x53d138>=0x0;_0x53d138--)(_0x55dc43=_0x409d89[_0x53d138])&&(_0x48f750=_0x55dc43(_0x48f750)||_0x48f750);return _0x48f750;},_0x270675=(_0x4221dc,_0x97645d)=>(_0x3ec9d6,_0x2e157f)=>_0x97645d(_0x3ec9d6,_0x2e157f,_0x4221dc);let _0xc0e063=class extends _0x121713[_0x511744(0x1ef)]{constructor(_0xfa992f,_0x517e5c){const _0x1a4a2d=_0x511744;super(),this[_0x1a4a2d(0x1a2)]=_0xfa992f,this[_0x1a4a2d(0x17a)]=_0x517e5c,this['_initDataSource']();}[_0x511744(0x19b)](){const _0x9c1004=_0x511744;this[_0x9c1004(0x1a2)][_0x9c1004(0x1e0)]=this['_threadCommentDataSource'],this[_0x9c1004(0x1a2)][_0x9c1004(0x181)]=!0x1;}};_0xc0e063=_0x4a65c3([_0x270675(0x0,_0x5c30e5[_0x511744(0x1dc)]),_0x270675(0x1,_0x121713[_0x511744(0x1ac)](_0x5b5a0a))],_0xc0e063);var _0x4bbcb5=Object['defineProperty'],_0x482a9b=Object[_0x511744(0x17e)],_0x29121f=(_0x1c0d0e,_0x37a0fa,_0x3d7b69)=>_0x37a0fa in _0x1c0d0e?_0x4bbcb5(_0x1c0d0e,_0x37a0fa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d7b69}):_0x1c0d0e[_0x37a0fa]=_0x3d7b69,_0xf8b936=(_0x4ea7b7,_0x4c2ffe,_0x4e87aa,_0x409176)=>{const _0x214cc4=_0x511744;for(var _0x2ccde1=_0x409176>0x1?void 0x0:_0x409176?_0x482a9b(_0x4c2ffe,_0x4e87aa):_0x4c2ffe,_0x2f83a3=_0x4ea7b7[_0x214cc4(0x18c)]-0x1,_0x13e2cb;_0x2f83a3>=0x0;_0x2f83a3--)(_0x13e2cb=_0x4ea7b7[_0x2f83a3])&&(_0x2ccde1=_0x13e2cb(_0x2ccde1)||_0x2ccde1);return _0x2ccde1;},_0x53eaef=(_0x5686d5,_0x1e2163)=>(_0x498c98,_0x430787)=>_0x1e2163(_0x498c98,_0x430787,_0x5686d5),_0x4fe7c6=(_0x3b61a3,_0x4549eb,_0x153151)=>_0x29121f(_0x3b61a3,typeof _0x4549eb!=_0x511744(0x189)?_0x4549eb+'':_0x4549eb,_0x153151);_0x43f8aa[_0x511744(0x1a6)]=class extends _0x121713[_0x511744(0x174)]{constructor(_0x3fcf58=_0xd3a4b7,_0x5bf02f,_0x1a69e7){const _0x30c2fc=_0x511744;super(),this['_config']=_0x3fcf58,this[_0x30c2fc(0x1d1)]=_0x5bf02f,this[_0x30c2fc(0x19d)]=_0x1a69e7;const {..._0x562e42}=_0x121713[_0x30c2fc(0x18a)]({},_0xd3a4b7,this[_0x30c2fc(0x1ce)]);this['_configService']['setConfig'](_0x32577b,_0x562e42);}[_0x511744(0x199)](){const _0x516f9a=_0x511744;[[_0x5b5a0a],[_0xc0e063],[_0x1de8a2]][_0x516f9a(0x1c1)](_0x2a2809=>{const _0x461139=_0x516f9a;this[_0x461139(0x1d1)][_0x461139(0x1c2)](_0x2a2809);});}[_0x511744(0x1dd)](){const _0x25fea7=_0x511744;this[_0x25fea7(0x1d1)][_0x25fea7(0x1e3)](_0xc0e063),this[_0x25fea7(0x1d1)][_0x25fea7(0x1e3)](_0x1de8a2);}},_0x4fe7c6(_0x43f8aa[_0x511744(0x1a6)],'pluginName',_0x28e132),_0x4fe7c6(_0x43f8aa['UniverThreadCommentDataSourcePlugin'],_0x511744(0x1af),_0x121713['UniverInstanceType']['UNIVER_UNKNOWN']),_0x43f8aa['UniverThreadCommentDataSourcePlugin']=_0xf8b936([_0x121713['DependentOn'](_0x253457['UniverThreadCommentUIPlugin'],_0x53f586[_0x511744(0x17f)],_0x1e53be['UniverLicensePlugin']),_0x53eaef(0x1,_0x121713['Inject'](_0x121713[_0x511744(0x1f6)])),_0x53eaef(0x2,_0x121713[_0x511744(0x187)])],_0x43f8aa[_0x511744(0x1a6)]),Object[_0x511744(0x1df)](_0x43f8aa,Symbol[_0x511744(0x1a0)],{'value':_0x511744(0x182)});}));function _0x192a(_0x4b40e4,_0xca45db){const _0xaeb8f1=_0xaeb8();return _0x192a=function(_0x192abb,_0x595ab3){_0x192abb=_0x192abb-0x173;let _0x2450b4=_0xaeb8f1[_0x192abb];return _0x2450b4;},_0x192a(_0x4b40e4,_0xca45db);}function _0xaeb8(){const _0x42f308=['post','Injector','/list','Plugin','slice','Reply','error','function','solved','_threadCommentDataSource','UniverProThreadCommentDatasource','Unknown','4371584BLlvYJ','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','_userService','syncUpdateMutationToColla','Module','customRanges','delete','@univerjs/thread-comment','79635JhGlZW','IConfigService','root','symbol','merge','code','length','489834CkdCdu','/universer-api/user/list','rangeId','rxjs','19404070PqAVnF','_commentService','addUser','requireSession','UNRECOGNIZED','_httpService','pipe','reply','onStarting','_threadCommentModel','_initDataSource','find','_configService','@univerjs/network','resolveComment','toStringTag','replies','_threadCommentDataSourceService','UniverProLicense','map','OpenOrReOpen','UniverThreadCommentDataSourcePlugin','getUnit','values','getMemberID','bufferTime','unitId','Inject','40PWGMdK','stringify','type','userId','/universer-api/comment/unit/','96agkbGN','CustomRangeType','deleteComment','dayjs','amd','updateComment','ThreadCommentModel','user','1788380VtmUcG','parse','userID','/delete','/solved','commentUpdate$','size','forEach','add','filter','format','_sessionService','disposeWithMe','@univerjs-pro/collaboration-client','content','exports','subscribe','users','HTTPService','CommentService','_config','Solved','Edit','_injector','resolved','replyId','comment','_init','Solve','@univerjs-pro/license','body','Delete','COMMENT','3pTbkxh','IThreadCommentDataSourceService','onReady','threadId','defineProperty','dataSource','ref','YYYY/MM/DD\x20HH:mm','get','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initUserSync','/add','listComments','UserManagerService','addComment','Add','584101GiCNwA','createTimestamp','rangeType','Disposable','UniverThreadComment','/edit','2691405WbIQsT','@univerjs/thread-comment-ui','@univerjs/core'];_0xaeb8=function(){return _0x42f308;};return _0xaeb8();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-alpha.0",
3
+ "version": "0.6.10-experimental.20250410-b7c4a5b",
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.6.10-alpha.0",
49
- "@univerjs-pro/license": "0.6.10-alpha.0",
50
- "@univerjs/core": "0.6.10-alpha.0",
51
- "@univerjs/network": "0.6.10-alpha.0",
52
- "@univerjs/thread-comment-ui": "0.6.10-alpha.0",
53
- "@univerjs/thread-comment": "0.6.10-alpha.0",
54
- "@univerjs/protocol": "0.1.46-alpha.3"
48
+ "@univerjs-pro/collaboration-client": "0.6.10-experimental.20250410-b7c4a5b",
49
+ "@univerjs/core": "0.6.10-experimental.20250410-b7c4a5b",
50
+ "@univerjs-pro/license": "0.6.10-experimental.20250410-b7c4a5b",
51
+ "@univerjs/protocol": "0.1.46-alpha.3",
52
+ "@univerjs/network": "0.6.10-experimental.20250410-b7c4a5b",
53
+ "@univerjs/thread-comment-ui": "0.6.10-experimental.20250410-b7c4a5b",
54
+ "@univerjs/thread-comment": "0.6.10-experimental.20250410-b7c4a5b"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",