@univerjs-pro/thread-comment-datasource 0.15.1 → 0.15.2-insiders.20260122-b1556b1

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 _0x4f5d82=_0xe2d6;(function(_0xc6f405,_0x2eacc0){const _0x46993d=_0xe2d6,_0x16adde=_0xc6f405();while(!![]){try{const _0x1dbda4=parseInt(_0x46993d(0xa2))/0x1*(parseInt(_0x46993d(0x86))/0x2)+-parseInt(_0x46993d(0xe0))/0x3*(parseInt(_0x46993d(0x6e))/0x4)+-parseInt(_0x46993d(0xa5))/0x5*(parseInt(_0x46993d(0x7d))/0x6)+parseInt(_0x46993d(0xa3))/0x7*(parseInt(_0x46993d(0xcc))/0x8)+parseInt(_0x46993d(0xb1))/0x9+parseInt(_0x46993d(0xde))/0xa*(-parseInt(_0x46993d(0x8d))/0xb)+parseInt(_0x46993d(0xa9))/0xc*(parseInt(_0x46993d(0xd7))/0xd);if(_0x1dbda4===_0x2eacc0)break;else _0x16adde['push'](_0x16adde['shift']());}catch(_0x2f44a8){_0x16adde['push'](_0x16adde['shift']());}}}(_0xf535,0xb42be));Object[_0x4f5d82(0xc2)](exports,Symbol['toStringTag'],{'value':_0x4f5d82(0xc9)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x4f5d82(0xa4);var I=(_0x46704d=>(_0x46704d[_0x46704d['OpenOrReOpen']=0x0]=_0x4f5d82(0xa6),_0x46704d[_0x46704d[_0x4f5d82(0xbc)]=0x1]='Solved',_0x46704d[_0x46704d[_0x4f5d82(0x8e)]=-0x1]=_0x4f5d82(0x8e),_0x46704d))(I||{}),v=(_0x419383=>(_0x419383[_0x419383[_0x4f5d82(0xab)]=0x0]=_0x4f5d82(0xab),_0x419383[_0x419383[_0x4f5d82(0xbe)]=0x1]=_0x4f5d82(0xbe),_0x419383[_0x419383[_0x4f5d82(0x82)]=0x2]=_0x4f5d82(0x82),_0x419383[_0x419383[_0x4f5d82(0x72)]=0x3]='Edit',_0x419383[_0x419383[_0x4f5d82(0xce)]=0x4]=_0x4f5d82(0xce),_0x419383[_0x419383[_0x4f5d82(0xd6)]=0x5]='Solve',_0x419383[_0x419383[_0x4f5d82(0x8e)]=-0x1]='UNRECOGNIZED',_0x419383))(v||{});const f=_0x5a4df7=>c[_0x4f5d82(0x70)](new Date(+_0x5a4df7))[_0x4f5d82(0xa7)](_0x4f5d82(0xae)),R=async(_0x4257e5,_0x282d28)=>{const _0x5a03e3=_0x4f5d82,_0x12904d=_0x4257e5[_0x5a03e3(0x87)](c[_0x5a03e3(0x74)]),_0x27903a=_0x4257e5[_0x5a03e3(0x87)](P[_0x5a03e3(0xc3)]);_0x282d28[_0x5a03e3(0xe1)](_0x292278=>{const _0x2ae769=_0x5a03e3;_0x12904d['getUser'](_0x292278)&&_0x282d28[_0x2ae769(0xdd)](_0x292278);}),_0x282d28[_0x5a03e3(0x75)]&&(await _0x27903a[_0x5a03e3(0x87)](_0x5a03e3(0x90),{'params':{'userIDs':[..._0x282d28]}}))[_0x5a03e3(0xc8)]['users'][_0x5a03e3(0xe1)](_0x2d5380=>{const _0x55e795=_0x5a03e3;_0x2d5380&&_0x12904d[_0x55e795(0xac)](_0x2d5380);});};var $=Object[_0x4f5d82(0x8b)],E=(_0x30ed37,_0x51c580,_0x2fbeca,_0x578e65)=>{for(var _0x474877=_0x578e65>0x1?void 0x0:_0x578e65?$(_0x51c580,_0x2fbeca):_0x51c580,_0x18906b=_0x30ed37['length']-0x1,_0x2958ba;_0x18906b>=0x0;_0x18906b--)(_0x2958ba=_0x30ed37[_0x18906b])&&(_0x474877=_0x2958ba(_0x474877)||_0x474877);return _0x474877;},S=(_0xadaaa7,_0x537e57)=>(_0x30c35b,_0x30c876)=>_0x537e57(_0x30c35b,_0x30c876,_0xadaaa7);let _=class extends c[_0x4f5d82(0xc7)]{constructor(_0x5c20db,_0x468a13,_0x309b53,_0x55c153){const _0x1ddf9f=_0x4f5d82;super(),this['_commentService']=_0x5c20db,this[_0x1ddf9f(0x94)]=_0x468a13,this[_0x1ddf9f(0x88)]=_0x309b53,this['_injector']=_0x55c153,this[_0x1ddf9f(0xa1)](),this[_0x1ddf9f(0xd5)]();}[_0x4f5d82(0xd5)](){const _0x1e6b9d=_0x4f5d82;this[_0x1e6b9d(0xc5)](this[_0x1e6b9d(0x94)][_0x1e6b9d(0x78)][_0x1e6b9d(0xd2)](j[_0x1e6b9d(0x93)](0x10))['subscribe'](_0x5b0c8b=>{const _0x4c5089=_0x1e6b9d,_0x30672b=new Set();_0x5b0c8b[_0x4c5089(0xe1)](_0x2d0fac=>{const _0x487e14=_0x4c5089;if(_0x2d0fac['type']===_0x487e14(0x79)){const _0x4fec1f=_0x2d0fac['payload'][_0x487e14(0x9e)];_0x30672b['add'](_0x4fec1f);}}),R(this[_0x4c5089(0xdf)],_0x30672b);}));}[_0x4f5d82(0xa1)](){const _0x4cfaab=_0x4f5d82;this['disposeWithMe'](this['_commentService'][_0x4cfaab(0x78)][_0x4cfaab(0x9a)](async _0x1dd632=>{const _0x13d0c5=_0x4cfaab;var _0x4c94d1,_0x25123f,_0x3a5e9a,_0x170465;const _0x364758=(_0x4c94d1=this[_0x13d0c5(0x94)][_0x13d0c5(0xc4)](_0x1dd632[_0x13d0c5(0xcd)])['find'](_0x2dc282=>_0x2dc282[_0x13d0c5(0xbf)]===_0x1dd632['threadId']))==null?void 0x0:_0x4c94d1[_0x13d0c5(0xa0)];if(!_0x364758)return;const {unitId:_0x3995eb,subUnitId:_0x20148d}=_0x364758;switch(_0x1dd632['user']&&this[_0x13d0c5(0x88)][_0x13d0c5(0xac)](_0x1dd632[_0x13d0c5(0xb7)]),_0x1dd632[_0x13d0c5(0x7a)]){case v[_0x13d0c5(0xbe)]:break;case v[_0x13d0c5(0x82)]:{this[_0x13d0c5(0x94)]['addComment'](_0x3995eb,_0x20148d,{'unitId':_0x3995eb,'subUnitId':_0x20148d,'ref':'','id':_0x1dd632['replyId'],'dT':f(+_0x1dd632[_0x13d0c5(0x85)]),'threadId':_0x1dd632[_0x13d0c5(0xbf)],'personId':(_0x3a5e9a=(_0x25123f=_0x1dd632[_0x13d0c5(0xb7)])==null?void 0x0:_0x25123f[_0x13d0c5(0xda)])!=null?_0x3a5e9a:_0x1dd632[_0x13d0c5(0xdc)],'text':JSON[_0x13d0c5(0x6d)](_0x1dd632[_0x13d0c5(0xd9)]),'parentId':_0x364758['id']});break;}case v[_0x13d0c5(0xce)]:{const _0x6a0636=this[_0x13d0c5(0x94)][_0x13d0c5(0xb9)](_0x3995eb,_0x20148d,_0x1dd632[_0x13d0c5(0xbd)]);_0x6a0636&&_0x6a0636[_0x13d0c5(0x71)]&&this[_0x13d0c5(0x94)][_0x13d0c5(0x6b)](_0x3995eb,_0x20148d,_0x1dd632['replyId']);break;}case v[_0x13d0c5(0x72)]:{this[_0x13d0c5(0x94)][_0x13d0c5(0x9f)](_0x3995eb,_0x20148d,{'commentId':_0x1dd632[_0x13d0c5(0xbd)],'text':JSON[_0x13d0c5(0x6d)](_0x1dd632[_0x13d0c5(0xd9)])});break;}case v['Solve']:{const _0x15e160=(_0x170465=this[_0x13d0c5(0x94)][_0x13d0c5(0xc4)](_0x1dd632[_0x13d0c5(0xcd)])['find'](_0x48bfa0=>_0x48bfa0['threadId']===_0x1dd632['threadId']))==null?void 0x0:_0x170465[_0x13d0c5(0xa0)];_0x15e160&&this[_0x13d0c5(0x94)][_0x13d0c5(0xd4)](_0x3995eb,_0x20148d,_0x15e160['id'],_0x1dd632[_0x13d0c5(0x73)]===I[_0x13d0c5(0xbc)]);break;}}}));}};_=E([S(0x0,c[_0x4f5d82(0xd8)](b['CommentService'])),S(0x1,c[_0x4f5d82(0xd8)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x4f5d82(0x74)])),S(0x3,c[_0x4f5d82(0xd8)](c[_0x4f5d82(0xcb)]))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x20880d,_0x310abc,_0x55d938,_0x20e15b)=>{const _0x297285=_0x4f5d82;for(var _0x42341a=_0x20e15b>0x1?void 0x0:_0x20e15b?A(_0x310abc,_0x55d938):_0x310abc,_0x4f65a5=_0x20880d[_0x297285(0x77)]-0x1,_0x49943a;_0x4f65a5>=0x0;_0x4f65a5--)(_0x49943a=_0x20880d[_0x4f65a5])&&(_0x42341a=_0x49943a(_0x42341a)||_0x42341a);return _0x42341a;},C=(_0x57d1ef,_0x5884a6)=>(_0x13e13d,_0x4859bb)=>_0x5884a6(_0x13e13d,_0x4859bb,_0x57d1ef);function _0xf535(){const _0x5a6ebe=['bufferTime','_threadCommentModel','rangeType','CustomRangeType','getMemberID','UniverThreadCommentDataSourcePlugin','symbol','subscribe','getCurrentUser','_sessionService','UniverInstanceType','personId','updateComment','root','_init','1076975JgjLJz','357uDZMjK','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6797685AmUmRg','OpenOrReOpen','format','_config','5352fhaDJO','customRanges','Unknown','addUser','onStarting','YYYY/MM/DD\x20HH:mm','values','map','7997886gtvgFj','_httpService','_threadCommentDataSource','merge','DependentOn','COMMENT','user','onReady','getComment','/universer-api/comment/unit/','code','Solved','replyId','Add','threadId','IThreadCommentDataSourceService','UniverLicensePlugin','defineProperty','HTTPService','getUnit','disposeWithMe','ref','Disposable','body','Module','requireSession','Injector','227208wyzrte','unitId','Delete','pluginName','comments','users','pipe','_threadCommentDataSourceService','resolveComment','_initUserSync','Solve','3809pYAOAO','Inject','content','userID','/edit','userId','delete','423730WcfhDI','_injector','66VODRQT','forEach','_initDataSource','deleteComment','filter','parse','162980lglJGd','stringify','dayjs','parentId','Edit','solved','UserManagerService','size','listComments','length','commentUpdate$','add','type','replies','_configService','6fPILeA','rangeId','error','/delete','CollaborationSessionService','Reply','resolved','slice','createTimestamp','2pojOmY','get','_userService','UniverThreadCommentUIPlugin','dataSource','getOwnPropertyDescriptor','saveCommentToSnapshot','143Xzvcvw','UNRECOGNIZED','UNIVER_UNKNOWN','/universer-api/user/list','post','/list'];_0xf535=function(){return _0x5a6ebe;};return _0xf535();}function _0xe2d6(_0x139a0c,_0x387bd4){_0x139a0c=_0x139a0c-0x6a;const _0xf535a1=_0xf535();let _0xe2d6c5=_0xf535a1[_0x139a0c];return _0xe2d6c5;}function Y(_0x3bac91,_0x2badd0){const _0x559d08=_0x4f5d82,_0x489f95=_0x3bac91[_0x559d08(0x7b)][0x0];return{..._0x2badd0,'id':_0x489f95[_0x559d08(0xbd)],'resolved':_0x3bac91[_0x559d08(0x73)]===0x1,'dT':f(_0x489f95[_0x559d08(0x85)]),'personId':_0x489f95[_0x559d08(0xdc)],'threadId':_0x489f95[_0x559d08(0xbf)]};}function G(_0x14adf5,_0x1b9034,_0x248c66){const _0x52bc6c=_0x4f5d82;var _0x1eeb7d,_0x5584b8;if(((_0x5584b8=(_0x1eeb7d=_0x14adf5==null?void 0x0:_0x14adf5[_0x52bc6c(0x7b)])==null?void 0x0:_0x1eeb7d[_0x52bc6c(0x77)])!=null?_0x5584b8:0x0)>0x0){const _0x29c9ba=(_0x594ebe,_0x1644ce)=>({'id':_0x594ebe[_0x52bc6c(0xbd)],'threadId':_0x594ebe[_0x52bc6c(0xbf)],'dT':f(_0x594ebe[_0x52bc6c(0x85)]),'personId':_0x594ebe[_0x52bc6c(0xdc)],'resolved':_0x14adf5[_0x52bc6c(0x73)]===I[_0x52bc6c(0xbc)],'unitId':_0x1b9034,'subUnitId':_0x248c66,'text':JSON[_0x52bc6c(0x6d)](_0x594ebe[_0x52bc6c(0xd9)]),'parentId':_0x1644ce}),_0x5afacd=_0x29c9ba(_0x14adf5[_0x52bc6c(0x7b)][0x0]);return{..._0x5afacd,'children':_0x14adf5[_0x52bc6c(0x7b)][_0x52bc6c(0x84)](0x1)['map'](_0x213ae9=>_0x29c9ba(_0x213ae9,_0x5afacd['id']))};}return null;}let p=class{constructor(_0x12eed7,_0x160e5d,_0x528b68){const _0x439388=_0x4f5d82;this[_0x439388(0xb2)]=_0x12eed7,this[_0x439388(0x88)]=_0x160e5d,this[_0x439388(0x9c)]=_0x528b68;}async['addComment'](_0x1eebf2){const _0x42f851=_0x4f5d82;var _0x38cce8,_0x377ddc;const {parentId:_0x31a327,unitId:_0x259262,text:_0x34336b,threadId:_0x40e57f}=_0x1eebf2,_0x556538=(_0x377ddc=(_0x38cce8=_0x34336b['customRanges'])==null?void 0x0:_0x38cce8[_0x42f851(0x6c)](_0x6b9fd4=>_0x6b9fd4['rangeType']===c[_0x42f851(0x96)][_0x42f851(0xb6)])[_0x42f851(0xb0)](_0x114b92=>_0x114b92[_0x42f851(0x7e)]))!=null?_0x377ddc:[],_0xf7e789=JSON[_0x42f851(0x6f)](_0x34336b),_0x120d12=(await this['_sessionService'][_0x42f851(0xca)](_0x259262))[_0x42f851(0x97)]();if(_0x31a327){const _0x2b1f09={'memberId':_0x120d12,'unitId':_0x259262,'content':_0xf7e789,'mention':_0x556538,'threadId':_0x40e57f},_0xdaa8d8=(await this[_0x42f851(0xb2)][_0x42f851(0x91)](_0x42f851(0xba)+_0x259262+'/reply',{'body':_0x2b1f09}))[_0x42f851(0xc8)]['reply'];return{..._0x1eebf2,'id':_0xdaa8d8[_0x42f851(0xbd)],'dT':c['dayjs'](+_0xdaa8d8[_0x42f851(0x85)])[_0x42f851(0xa7)](_0x42f851(0xae)),'personId':_0xdaa8d8['userId']};}else{const _0xd406e6={'memberId':_0x120d12,'unitId':_0x259262,'content':_0xf7e789,'mention':_0x556538},_0x4fdfca=await this['_httpService'][_0x42f851(0x91)]('/universer-api/comment/unit/'+_0x259262+'/add',{'body':_0xd406e6});return Y(_0x4fdfca[_0x42f851(0xc8)]['comment'],_0x1eebf2);}}async['updateComment'](_0x366375){const _0x242645=_0x4f5d82;var _0x4d0700,_0x2f9ddf;const {text:_0x18e31f,unitId:_0xed1719}=_0x366375,_0x353b16=(_0x2f9ddf=(_0x4d0700=_0x18e31f[_0x242645(0xaa)])==null?void 0x0:_0x4d0700['filter'](_0x1e3869=>_0x1e3869[_0x242645(0x95)]===c[_0x242645(0x96)]['COMMENT'])[_0x242645(0xb0)](_0x133419=>_0x133419[_0x242645(0x7e)]))!=null?_0x2f9ddf:[],_0x1eaa33=JSON[_0x242645(0x6f)](_0x18e31f),_0x2ccdb8=_0x366375[_0x242645(0xbf)],_0x22a956=_0x366375['id'],_0x71658a={'memberId':(await this[_0x242645(0x9c)][_0x242645(0xca)](_0xed1719))['getMemberID'](),'unitId':_0xed1719,'threadId':_0x2ccdb8,'mention':_0x353b16,'content':_0x1eaa33,'replyId':_0x22a956},_0x42b189=await this[_0x242645(0xb2)][_0x242645(0x91)](_0x242645(0xba)+_0xed1719+_0x242645(0xdb),{'body':_0x71658a});return!_0x42b189[_0x242645(0xc8)]['error']||_0x42b189[_0x242645(0xc8)][_0x242645(0x7f)][_0x242645(0xbb)]===0x1;}async[_0x4f5d82(0xd4)](_0x5f547c){const _0x5a2b89=_0x4f5d82,{unitId:_0x1053ce}=_0x5f547c,_0x26ef72=_0x5f547c[_0x5a2b89(0xbf)],_0x36ae0e={'memberId':this[_0x5a2b89(0x88)][_0x5a2b89(0x9b)]()[_0x5a2b89(0xda)],'unitId':_0x1053ce,'threadId':_0x26ef72,'solved':_0x5f547c[_0x5a2b89(0x83)]?I['Solved']:I[_0x5a2b89(0xa6)]},_0x51417f=await this[_0x5a2b89(0xb2)]['post']('/universer-api/comment/unit/'+_0x1053ce+'/solved',{'body':_0x36ae0e});return!_0x51417f[_0x5a2b89(0xc8)][_0x5a2b89(0x7f)]||_0x51417f[_0x5a2b89(0xc8)][_0x5a2b89(0x7f)][_0x5a2b89(0xbb)]===0x1;}async[_0x4f5d82(0x6b)](_0x464b6b,_0x4094b1,_0x2d560e,_0xf954d2){const _0x995937=_0x4f5d82,_0x5f42c7={'memberId':(await this[_0x995937(0x9c)][_0x995937(0xca)](_0x464b6b))['getMemberID'](),'threadId':_0x2d560e,'replyId':_0xf954d2,'unitId':_0x464b6b},_0x5e2e46=await this[_0x995937(0xb2)]['post'](_0x995937(0xba)+_0x464b6b+_0x995937(0x80),{'body':_0x5f42c7});return!_0x5e2e46[_0x995937(0xc8)]['error']||_0x5e2e46['body'][_0x995937(0x7f)]['code']===0x1;}async[_0x4f5d82(0x76)](_0x1f4017,_0x31ea29,_0x5efbd9){const _0x5795c9=_0x4f5d82,_0x32ed2f={'unitId':_0x1f4017,'threadId':_0x5efbd9},_0x23ecd4=await this[_0x5795c9(0xb2)][_0x5795c9(0x91)](_0x5795c9(0xba)+_0x1f4017+_0x5795c9(0x92),{'body':_0x32ed2f}),_0x2b2763=_0x5efbd9['map'](_0x2b475d=>G(_0x23ecd4[_0x5795c9(0xc8)][_0x5795c9(0xd0)][_0x2b475d],_0x1f4017,_0x31ea29))[_0x5795c9(0x6c)](Boolean);return Object[_0x5795c9(0xaf)](_0x23ecd4[_0x5795c9(0xc8)][_0x5795c9(0xd1)])[_0x5795c9(0xe1)](_0xa87dec=>{const _0x2ce8c8=_0x5795c9;this['_userService'][_0x2ce8c8(0xac)](_0xa87dec);}),_0x2b2763;}[_0x4f5d82(0x8c)](_0x5a57d2){const _0x3c519a=_0x4f5d82;return{'id':_0x5a57d2['id'],'threadId':_0x5a57d2[_0x3c519a(0xbf)],'ref':_0x5a57d2[_0x3c519a(0xc6)]};}};p=x([C(0x0,c['Inject'](P[_0x4f5d82(0xc3)])),C(0x1,c[_0x4f5d82(0xd8)](c[_0x4f5d82(0x74)])),C(0x2,c['Inject'](b[_0x4f5d82(0x81)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x1adfee,_0x4ab667,_0x2e8c43,_0x3bbb9b)=>{const _0x2bbfbd=_0x4f5d82;for(var _0x36a4d0=_0x3bbb9b>0x1?void 0x0:_0x3bbb9b?H(_0x4ab667,_0x2e8c43):_0x4ab667,_0x34b92a=_0x1adfee[_0x2bbfbd(0x77)]-0x1,_0x3e9723;_0x34b92a>=0x0;_0x34b92a--)(_0x3e9723=_0x1adfee[_0x34b92a])&&(_0x36a4d0=_0x3e9723(_0x36a4d0)||_0x36a4d0);return _0x36a4d0;},y=(_0x360761,_0x5728aa)=>(_0x52970b,_0x4df13b)=>_0x5728aa(_0x52970b,_0x4df13b,_0x360761);let g=class extends c[_0x4f5d82(0xc7)]{constructor(_0x9c5950,_0x13f590){const _0x23ff3a=_0x4f5d82;super(),this[_0x23ff3a(0xd3)]=_0x9c5950,this[_0x23ff3a(0xb3)]=_0x13f590,this[_0x23ff3a(0x6a)]();}[_0x4f5d82(0x6a)](){const _0x34010f=_0x4f5d82;this[_0x34010f(0xd3)][_0x34010f(0x8a)]=this[_0x34010f(0xb3)],this[_0x34010f(0xd3)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x4f5d82(0xc0)]),y(0x1,c[_0x4f5d82(0xd8)](p))],g);var F=Object[_0x4f5d82(0xc2)],L=Object[_0x4f5d82(0x8b)],Z=(_0x1f1ef8,_0x490309,_0x388e38)=>_0x490309 in _0x1f1ef8?F(_0x1f1ef8,_0x490309,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x388e38}):_0x1f1ef8[_0x490309]=_0x388e38,W=(_0xcac7fb,_0x56a5dc,_0x411aa5,_0x2e0460)=>{const _0x27bb44=_0x4f5d82;for(var _0x2846ef=_0x2e0460>0x1?void 0x0:_0x2e0460?L(_0x56a5dc,_0x411aa5):_0x56a5dc,_0x142ab7=_0xcac7fb[_0x27bb44(0x77)]-0x1,_0x49d41a;_0x142ab7>=0x0;_0x142ab7--)(_0x49d41a=_0xcac7fb[_0x142ab7])&&(_0x2846ef=_0x49d41a(_0x2846ef)||_0x2846ef);return _0x2846ef;},O=(_0x5a867a,_0x1c0c5b)=>(_0xc8e5f4,_0x3b8719)=>_0x1c0c5b(_0xc8e5f4,_0x3b8719,_0x5a867a),N=(_0x4d06d0,_0x3f074f,_0x13dd63)=>Z(_0x4d06d0,typeof _0x3f074f!=_0x4f5d82(0x99)?_0x3f074f+'':_0x3f074f,_0x13dd63);exports[_0x4f5d82(0x98)]=class extends c['Plugin']{constructor(_0x341d2a=D,_0x45436f,_0x143fb8){const _0x114186=_0x4f5d82;super(),this[_0x114186(0xa8)]=_0x341d2a,this[_0x114186(0xdf)]=_0x45436f,this[_0x114186(0x7c)]=_0x143fb8;const {..._0x3e3563}=c[_0x114186(0xb4)]({},D,this[_0x114186(0xa8)]);this[_0x114186(0x7c)]['setConfig'](q,_0x3e3563);}[_0x4f5d82(0xad)](){const _0x26c372=_0x4f5d82;[[p],[g],[_]][_0x26c372(0xe1)](_0x2b8fe7=>{const _0x1b8393=_0x26c372;this[_0x1b8393(0xdf)][_0x1b8393(0x79)](_0x2b8fe7);});}[_0x4f5d82(0xb8)](){const _0x3825d8=_0x4f5d82;this[_0x3825d8(0xdf)][_0x3825d8(0x87)](g),this[_0x3825d8(0xdf)][_0x3825d8(0x87)](_);}},N(exports[_0x4f5d82(0x98)],_0x4f5d82(0xcf),U),N(exports[_0x4f5d82(0x98)],_0x4f5d82(0x7a),c[_0x4f5d82(0x9d)][_0x4f5d82(0x8f)]),exports[_0x4f5d82(0x98)]=W([c[_0x4f5d82(0xb5)](w[_0x4f5d82(0x89)],b['UniverCollaborationClientPlugin'],T[_0x4f5d82(0xc1)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x4f5d82(0x98)]);
1
+ 'use strict';const _0x256f4a=_0x5b94;(function(_0x24862e,_0x59d93d){const _0x1c8d0e=_0x5b94,_0x2f2e11=_0x24862e();while(!![]){try{const _0x1d79ab=-parseInt(_0x1c8d0e(0x111))/0x1*(parseInt(_0x1c8d0e(0x103))/0x2)+-parseInt(_0x1c8d0e(0x11f))/0x3*(parseInt(_0x1c8d0e(0xe1))/0x4)+parseInt(_0x1c8d0e(0x12f))/0x5*(parseInt(_0x1c8d0e(0x10f))/0x6)+parseInt(_0x1c8d0e(0xbc))/0x7+parseInt(_0x1c8d0e(0xbe))/0x8+parseInt(_0x1c8d0e(0xf1))/0x9*(parseInt(_0x1c8d0e(0xbf))/0xa)+parseInt(_0x1c8d0e(0xf5))/0xb*(-parseInt(_0x1c8d0e(0xdc))/0xc);if(_0x1d79ab===_0x59d93d)break;else _0x2f2e11['push'](_0x2f2e11['shift']());}catch(_0x1efed7){_0x2f2e11['push'](_0x2f2e11['shift']());}}}(_0x19e9,0xe0743));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x256f4a(0x12d)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x256f4a(0x122);var I=(_0x43ca06=>(_0x43ca06[_0x43ca06['OpenOrReOpen']=0x0]=_0x256f4a(0x10e),_0x43ca06[_0x43ca06['Solved']=0x1]='Solved',_0x43ca06[_0x43ca06[_0x256f4a(0xce)]=-0x1]=_0x256f4a(0xce),_0x43ca06))(I||{}),v=(_0x46801c=>(_0x46801c[_0x46801c[_0x256f4a(0xee)]=0x0]=_0x256f4a(0xee),_0x46801c[_0x46801c['Add']=0x1]='Add',_0x46801c[_0x46801c['Reply']=0x2]='Reply',_0x46801c[_0x46801c[_0x256f4a(0xc3)]=0x3]='Edit',_0x46801c[_0x46801c[_0x256f4a(0x100)]=0x4]=_0x256f4a(0x100),_0x46801c[_0x46801c['Solve']=0x5]=_0x256f4a(0x119),_0x46801c[_0x46801c['UNRECOGNIZED']=-0x1]=_0x256f4a(0xce),_0x46801c))(v||{});const f=_0x28a627=>c['dayjs'](new Date(+_0x28a627))[_0x256f4a(0xf8)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x301ad2,_0x2eb268)=>{const _0xdd9c12=_0x256f4a,_0x2a4be3=_0x301ad2[_0xdd9c12(0xf9)](c['UserManagerService']),_0x14c07b=_0x301ad2[_0xdd9c12(0xf9)](P[_0xdd9c12(0xdf)]);_0x2eb268[_0xdd9c12(0xd7)](_0x501b4e=>{const _0x13fe8f=_0xdd9c12;_0x2a4be3[_0x13fe8f(0xe6)](_0x501b4e)&&_0x2eb268[_0x13fe8f(0x125)](_0x501b4e);}),_0x2eb268[_0xdd9c12(0xde)]&&(await _0x14c07b[_0xdd9c12(0xf9)](_0xdd9c12(0xef),{'params':{'userIDs':[..._0x2eb268]}}))[_0xdd9c12(0xca)][_0xdd9c12(0xc2)]['forEach'](_0x4cb231=>{const _0x4b536a=_0xdd9c12;_0x4cb231&&_0x2a4be3[_0x4b536a(0xc6)](_0x4cb231);});};var $=Object[_0x256f4a(0x110)],E=(_0xb03a99,_0x4e73fb,_0x41b7c6,_0xba0e7f)=>{for(var _0x3eda9c=_0xba0e7f>0x1?void 0x0:_0xba0e7f?$(_0x4e73fb,_0x41b7c6):_0x4e73fb,_0x5152fa=_0xb03a99['length']-0x1,_0x223ac3;_0x5152fa>=0x0;_0x5152fa--)(_0x223ac3=_0xb03a99[_0x5152fa])&&(_0x3eda9c=_0x223ac3(_0x3eda9c)||_0x3eda9c);return _0x3eda9c;},S=(_0x2855c3,_0x4e5d4b)=>(_0x5c15ca,_0x34cd90)=>_0x4e5d4b(_0x5c15ca,_0x34cd90,_0x2855c3);let _=class extends c[_0x256f4a(0xd1)]{constructor(_0x4e280f,_0x4888d2,_0x4fcaad,_0x550c54){const _0x2baa63=_0x256f4a;super(),this['_commentService']=_0x4e280f,this[_0x2baa63(0xcb)]=_0x4888d2,this[_0x2baa63(0xfa)]=_0x4fcaad,this[_0x2baa63(0x126)]=_0x550c54,this[_0x2baa63(0xf0)](),this['_initUserSync']();}['_initUserSync'](){const _0x537259=_0x256f4a;this['disposeWithMe'](this[_0x537259(0xcb)][_0x537259(0x10d)][_0x537259(0xf6)](j['bufferTime'](0x10))[_0x537259(0xf4)](_0x3919df=>{const _0x5ac97f=new Set();_0x3919df['forEach'](_0x1e62c1=>{const _0x303abf=_0x5b94;if(_0x1e62c1[_0x303abf(0x109)]===_0x303abf(0x12b)){const _0x44b746=_0x1e62c1[_0x303abf(0x11d)]['personId'];_0x5ac97f[_0x303abf(0x12b)](_0x44b746);}}),R(this['_injector'],_0x5ac97f);}));}[_0x256f4a(0xf0)](){const _0x4236a1=_0x256f4a;this['disposeWithMe'](this[_0x4236a1(0x129)][_0x4236a1(0x10d)][_0x4236a1(0xf4)](async _0xc0cfe4=>{const _0x4295c6=_0x4236a1;var _0x1f478e,_0x8b5f8d,_0x208c6b,_0x35f3d8;const _0x2fb858=(_0x1f478e=this['_threadCommentModel'][_0x4295c6(0xe3)](_0xc0cfe4[_0x4295c6(0x102)])[_0x4295c6(0xcd)](_0x5c8590=>_0x5c8590['threadId']===_0xc0cfe4[_0x4295c6(0x12c)]))==null?void 0x0:_0x1f478e[_0x4295c6(0x104)];if(!_0x2fb858)return;const {unitId:_0x2c6eb9,subUnitId:_0x4ca07e}=_0x2fb858;switch(_0xc0cfe4[_0x4295c6(0xe5)]&&this[_0x4295c6(0xfa)]['addUser'](_0xc0cfe4[_0x4295c6(0xe5)]),_0xc0cfe4['type']){case v[_0x4295c6(0x101)]:break;case v[_0x4295c6(0xc5)]:{this[_0x4295c6(0xcb)][_0x4295c6(0xc8)](_0x2c6eb9,_0x4ca07e,{'unitId':_0x2c6eb9,'subUnitId':_0x4ca07e,'ref':'','id':_0xc0cfe4['replyId'],'dT':f(+_0xc0cfe4[_0x4295c6(0xbb)]),'threadId':_0xc0cfe4[_0x4295c6(0x12c)],'personId':(_0x208c6b=(_0x8b5f8d=_0xc0cfe4['user'])==null?void 0x0:_0x8b5f8d[_0x4295c6(0x114)])!=null?_0x208c6b:_0xc0cfe4[_0x4295c6(0xe7)],'text':JSON[_0x4295c6(0xfc)](_0xc0cfe4[_0x4295c6(0x10b)]),'parentId':_0x2fb858['id']});break;}case v[_0x4295c6(0x100)]:{const _0x2493c1=this['_threadCommentModel'][_0x4295c6(0xd4)](_0x2c6eb9,_0x4ca07e,_0xc0cfe4[_0x4295c6(0xd9)]);_0x2493c1&&_0x2493c1[_0x4295c6(0xea)]&&this['_threadCommentModel'][_0x4295c6(0x11e)](_0x2c6eb9,_0x4ca07e,_0xc0cfe4[_0x4295c6(0xd9)]);break;}case v[_0x4295c6(0xc3)]:{this[_0x4295c6(0xcb)][_0x4295c6(0x12a)](_0x2c6eb9,_0x4ca07e,{'commentId':_0xc0cfe4[_0x4295c6(0xd9)],'text':JSON[_0x4295c6(0xfc)](_0xc0cfe4[_0x4295c6(0x10b)])});break;}case v['Solve']:{const _0x2cb5d2=(_0x35f3d8=this['_threadCommentModel']['getUnit'](_0xc0cfe4[_0x4295c6(0x102)])[_0x4295c6(0xcd)](_0xa99c95=>_0xa99c95['threadId']===_0xc0cfe4[_0x4295c6(0x12c)]))==null?void 0x0:_0x35f3d8[_0x4295c6(0x104)];_0x2cb5d2&&this['_threadCommentModel'][_0x4295c6(0xf2)](_0x2c6eb9,_0x4ca07e,_0x2cb5d2['id'],_0xc0cfe4['solved']===I[_0x4295c6(0xe9)]);break;}}}));}};_=E([S(0x0,c[_0x256f4a(0xec)](b['CommentService'])),S(0x1,c[_0x256f4a(0xec)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c[_0x256f4a(0xec)](c[_0x256f4a(0x10a)]))],_);function _0x5b94(_0x105d91,_0x142a8e){_0x105d91=_0x105d91-0xba;const _0x19e9c2=_0x19e9();let _0x5b9483=_0x19e9c2[_0x105d91];return _0x5b9483;}const q=_0x256f4a(0x124),D={};function _0x19e9(){const _0x576046=['users','Edit','solved','Reply','addUser','/edit','addComment','merge','body','_threadCommentModel','YYYY/MM/DD\x20HH:mm','find','UNRECOGNIZED','onReady','UniverCollaborationClientPlugin','Disposable','reply','UniverInstanceType','getComment','DependentOn','_initDataSource','forEach','pluginName','replyId','setConfig','stringify','20628aeoXSX','getMemberID','size','HTTPService','/delete','399772PlEBcd','post','getUnit','dataSource','user','getUser','userId','customRanges','Solved','parentId','/universer-api/comment/unit/','Inject','requireSession','Unknown','/universer-api/user/list','_init','19755AYOisL','resolveComment','dayjs','subscribe','9504nKxnek','pipe','_sessionService','format','get','_userService','rangeId','parse','/list','onStarting','CustomRangeType','Delete','Add','unitId','3070VORDxg','root','UniverLicensePlugin','length','map','rangeType','type','Injector','content','replies','commentUpdate$','OpenOrReOpen','388002XWPOJq','getOwnPropertyDescriptor','525SyFriQ','UNIVER_UNKNOWN','/solved','userID','values','filter','_httpService','/add','Solve','listComments','_config','comment','payload','deleteComment','21YdGaje','UniverThreadCommentDataSourcePlugin','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','thread-comment-data-source.config','delete','_injector','IConfigService','code','_commentService','updateComment','add','threadId','Module','CollaborationSessionService','45NabeRq','_threadCommentDataSource','error','createTimestamp','11258240JcyYiq','getCurrentUser','2431656YEUOBx','6450JusDIO','Plugin','COMMENT'];_0x19e9=function(){return _0x576046;};return _0x19e9();}var A=Object['getOwnPropertyDescriptor'],x=(_0x2b1073,_0x38f16f,_0x478054,_0x126fb5)=>{const _0x2fa4ca=_0x256f4a;for(var _0x2c2d0c=_0x126fb5>0x1?void 0x0:_0x126fb5?A(_0x38f16f,_0x478054):_0x38f16f,_0x4d4cef=_0x2b1073[_0x2fa4ca(0x106)]-0x1,_0x50ec44;_0x4d4cef>=0x0;_0x4d4cef--)(_0x50ec44=_0x2b1073[_0x4d4cef])&&(_0x2c2d0c=_0x50ec44(_0x2c2d0c)||_0x2c2d0c);return _0x2c2d0c;},C=(_0x1978c6,_0x105c32)=>(_0x517980,_0x3b3733)=>_0x105c32(_0x517980,_0x3b3733,_0x1978c6);function Y(_0x17e307,_0x5883dd){const _0x462436=_0x256f4a,_0xa0a4ed=_0x17e307['replies'][0x0];return{..._0x5883dd,'id':_0xa0a4ed[_0x462436(0xd9)],'resolved':_0x17e307['solved']===0x1,'dT':f(_0xa0a4ed[_0x462436(0xbb)]),'personId':_0xa0a4ed[_0x462436(0xe7)],'threadId':_0xa0a4ed['threadId']};}function G(_0x5b7c11,_0x535b56,_0x47aea9){const _0x19e36a=_0x256f4a;var _0x7e8402,_0x313251;if(((_0x313251=(_0x7e8402=_0x5b7c11==null?void 0x0:_0x5b7c11[_0x19e36a(0x10c)])==null?void 0x0:_0x7e8402['length'])!=null?_0x313251:0x0)>0x0){const _0x25f6d5=(_0x160ccb,_0x49572e)=>({'id':_0x160ccb[_0x19e36a(0xd9)],'threadId':_0x160ccb[_0x19e36a(0x12c)],'dT':f(_0x160ccb[_0x19e36a(0xbb)]),'personId':_0x160ccb[_0x19e36a(0xe7)],'resolved':_0x5b7c11[_0x19e36a(0xc4)]===I[_0x19e36a(0xe9)],'unitId':_0x535b56,'subUnitId':_0x47aea9,'text':JSON[_0x19e36a(0xfc)](_0x160ccb[_0x19e36a(0x10b)]),'parentId':_0x49572e}),_0x5dd3fe=_0x25f6d5(_0x5b7c11[_0x19e36a(0x10c)][0x0]);return{..._0x5dd3fe,'children':_0x5b7c11[_0x19e36a(0x10c)]['slice'](0x1)[_0x19e36a(0x107)](_0x5882f7=>_0x25f6d5(_0x5882f7,_0x5dd3fe['id']))};}return null;}let p=class{constructor(_0x5855fe,_0x1b10e5,_0x188070){const _0x1be65d=_0x256f4a;this[_0x1be65d(0x117)]=_0x5855fe,this['_userService']=_0x1b10e5,this['_sessionService']=_0x188070;}async[_0x256f4a(0xc8)](_0x44c45d){const _0x44be44=_0x256f4a;var _0x1bcb60,_0x5cedd6;const {parentId:_0x6206f1,unitId:_0x5ab41c,text:_0x2f3081,threadId:_0x356f66}=_0x44c45d,_0x9f141c=(_0x5cedd6=(_0x1bcb60=_0x2f3081[_0x44be44(0xe8)])==null?void 0x0:_0x1bcb60['filter'](_0x2d2435=>_0x2d2435['rangeType']===c[_0x44be44(0xff)][_0x44be44(0xc1)])[_0x44be44(0x107)](_0x241bab=>_0x241bab[_0x44be44(0xfb)]))!=null?_0x5cedd6:[],_0x14f6bd=JSON[_0x44be44(0xdb)](_0x2f3081),_0x3efc73=(await this['_sessionService'][_0x44be44(0xed)](_0x5ab41c))[_0x44be44(0xdd)]();if(_0x6206f1){const _0x343e96={'memberId':_0x3efc73,'unitId':_0x5ab41c,'content':_0x14f6bd,'mention':_0x9f141c,'threadId':_0x356f66},_0x459011=(await this[_0x44be44(0x117)]['post'](_0x44be44(0xeb)+_0x5ab41c+'/reply',{'body':_0x343e96}))[_0x44be44(0xca)][_0x44be44(0xd2)];return{..._0x44c45d,'id':_0x459011[_0x44be44(0xd9)],'dT':c[_0x44be44(0xf3)](+_0x459011[_0x44be44(0xbb)])[_0x44be44(0xf8)](_0x44be44(0xcc)),'personId':_0x459011[_0x44be44(0xe7)]};}else{const _0x2176bc={'memberId':_0x3efc73,'unitId':_0x5ab41c,'content':_0x14f6bd,'mention':_0x9f141c},_0x4ddb83=await this[_0x44be44(0x117)][_0x44be44(0xe2)](_0x44be44(0xeb)+_0x5ab41c+_0x44be44(0x118),{'body':_0x2176bc});return Y(_0x4ddb83[_0x44be44(0xca)][_0x44be44(0x11c)],_0x44c45d);}}async[_0x256f4a(0x12a)](_0x1ea15c){const _0x29c37c=_0x256f4a;var _0xf62995,_0x2127b2;const {text:_0x1742b3,unitId:_0x225323}=_0x1ea15c,_0x6417e8=(_0x2127b2=(_0xf62995=_0x1742b3[_0x29c37c(0xe8)])==null?void 0x0:_0xf62995[_0x29c37c(0x116)](_0x2cf8a8=>_0x2cf8a8[_0x29c37c(0x108)]===c['CustomRangeType'][_0x29c37c(0xc1)])[_0x29c37c(0x107)](_0x42786e=>_0x42786e[_0x29c37c(0xfb)]))!=null?_0x2127b2:[],_0x2e00f1=JSON[_0x29c37c(0xdb)](_0x1742b3),_0x1808e2=_0x1ea15c['threadId'],_0x2b0365=_0x1ea15c['id'],_0x3354ac={'memberId':(await this[_0x29c37c(0xf7)]['requireSession'](_0x225323))[_0x29c37c(0xdd)](),'unitId':_0x225323,'threadId':_0x1808e2,'mention':_0x6417e8,'content':_0x2e00f1,'replyId':_0x2b0365},_0x3b7a9c=await this['_httpService'][_0x29c37c(0xe2)](_0x29c37c(0xeb)+_0x225323+_0x29c37c(0xc7),{'body':_0x3354ac});return!_0x3b7a9c['body'][_0x29c37c(0xba)]||_0x3b7a9c[_0x29c37c(0xca)][_0x29c37c(0xba)][_0x29c37c(0x128)]===0x1;}async['resolveComment'](_0x319a95){const _0x5245a8=_0x256f4a,{unitId:_0x2b2640}=_0x319a95,_0x53fffc=_0x319a95[_0x5245a8(0x12c)],_0x1bfe2f={'memberId':this[_0x5245a8(0xfa)][_0x5245a8(0xbd)]()[_0x5245a8(0x114)],'unitId':_0x2b2640,'threadId':_0x53fffc,'solved':_0x319a95['resolved']?I['Solved']:I[_0x5245a8(0x10e)]},_0x3903b5=await this[_0x5245a8(0x117)][_0x5245a8(0xe2)]('/universer-api/comment/unit/'+_0x2b2640+_0x5245a8(0x113),{'body':_0x1bfe2f});return!_0x3903b5['body'][_0x5245a8(0xba)]||_0x3903b5['body'][_0x5245a8(0xba)]['code']===0x1;}async[_0x256f4a(0x11e)](_0x5a6cb3,_0x2256ee,_0x1a0aa5,_0x1fa8cd){const _0x3f000c=_0x256f4a,_0x21c5e2={'memberId':(await this[_0x3f000c(0xf7)][_0x3f000c(0xed)](_0x5a6cb3))[_0x3f000c(0xdd)](),'threadId':_0x1a0aa5,'replyId':_0x1fa8cd,'unitId':_0x5a6cb3},_0xaebe57=await this[_0x3f000c(0x117)][_0x3f000c(0xe2)](_0x3f000c(0xeb)+_0x5a6cb3+_0x3f000c(0xe0),{'body':_0x21c5e2});return!_0xaebe57[_0x3f000c(0xca)][_0x3f000c(0xba)]||_0xaebe57[_0x3f000c(0xca)][_0x3f000c(0xba)]['code']===0x1;}async[_0x256f4a(0x11a)](_0x58d789,_0x52b29b,_0xa09282){const _0x27c14b=_0x256f4a,_0x1141b7={'unitId':_0x58d789,'threadId':_0xa09282},_0x1ffeaa=await this[_0x27c14b(0x117)][_0x27c14b(0xe2)](_0x27c14b(0xeb)+_0x58d789+_0x27c14b(0xfd),{'body':_0x1141b7}),_0xc0a8bf=_0xa09282['map'](_0x18ebf8=>G(_0x1ffeaa[_0x27c14b(0xca)]['comments'][_0x18ebf8],_0x58d789,_0x52b29b))['filter'](Boolean);return Object[_0x27c14b(0x115)](_0x1ffeaa[_0x27c14b(0xca)][_0x27c14b(0xc2)])[_0x27c14b(0xd7)](_0x44fa65=>{const _0x3c99e8=_0x27c14b;this[_0x3c99e8(0xfa)][_0x3c99e8(0xc6)](_0x44fa65);}),_0xc0a8bf;}['saveCommentToSnapshot'](_0x1e443f){const _0x37bec1=_0x256f4a;return{'id':_0x1e443f['id'],'threadId':_0x1e443f[_0x37bec1(0x12c)],'ref':_0x1e443f['ref']};}};p=x([C(0x0,c[_0x256f4a(0xec)](P[_0x256f4a(0xdf)])),C(0x1,c[_0x256f4a(0xec)](c['UserManagerService'])),C(0x2,c[_0x256f4a(0xec)](b[_0x256f4a(0x12e)]))],p);var H=Object[_0x256f4a(0x110)],J=(_0x5bbc13,_0x25628b,_0x1c6ed2,_0xf70dde)=>{for(var _0x34d013=_0xf70dde>0x1?void 0x0:_0xf70dde?H(_0x25628b,_0x1c6ed2):_0x25628b,_0x1599e0=_0x5bbc13['length']-0x1,_0x129e09;_0x1599e0>=0x0;_0x1599e0--)(_0x129e09=_0x5bbc13[_0x1599e0])&&(_0x34d013=_0x129e09(_0x34d013)||_0x34d013);return _0x34d013;},y=(_0x4b96fe,_0x491d7c)=>(_0x5181c2,_0x1258ff)=>_0x491d7c(_0x5181c2,_0x1258ff,_0x4b96fe);let g=class extends c['Disposable']{constructor(_0x1a0c30,_0x1fd6d6){const _0x185ade=_0x256f4a;super(),this['_threadCommentDataSourceService']=_0x1a0c30,this['_threadCommentDataSource']=_0x1fd6d6,this[_0x185ade(0xd6)]();}[_0x256f4a(0xd6)](){const _0xb0c7bc=_0x256f4a;this[_0xb0c7bc(0x121)][_0xb0c7bc(0xe4)]=this[_0xb0c7bc(0x130)],this[_0xb0c7bc(0x121)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x49c425,_0x2688b7,_0x511b0c)=>_0x2688b7 in _0x49c425?F(_0x49c425,_0x2688b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x511b0c}):_0x49c425[_0x2688b7]=_0x511b0c,W=(_0x2783c2,_0x1cae5e,_0x38a5ba,_0x346ba1)=>{const _0x275659=_0x256f4a;for(var _0x3596f2=_0x346ba1>0x1?void 0x0:_0x346ba1?L(_0x1cae5e,_0x38a5ba):_0x1cae5e,_0x1021cd=_0x2783c2[_0x275659(0x106)]-0x1,_0x48b285;_0x1021cd>=0x0;_0x1021cd--)(_0x48b285=_0x2783c2[_0x1021cd])&&(_0x3596f2=_0x48b285(_0x3596f2)||_0x3596f2);return _0x3596f2;},O=(_0x112355,_0x4f83eb)=>(_0x1953a4,_0xfe2934)=>_0x4f83eb(_0x1953a4,_0xfe2934,_0x112355),N=(_0x492664,_0x281d18,_0x59a8c6)=>Z(_0x492664,typeof _0x281d18!='symbol'?_0x281d18+'':_0x281d18,_0x59a8c6);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x256f4a(0xc0)]{constructor(_0x6e1dd7=D,_0x1c1b71,_0x578f3f){const _0x689528=_0x256f4a;super(),this[_0x689528(0x11b)]=_0x6e1dd7,this[_0x689528(0x126)]=_0x1c1b71,this[_0x689528(0x123)]=_0x578f3f;const {..._0x1faa41}=c[_0x689528(0xc9)]({},D,this[_0x689528(0x11b)]);this[_0x689528(0x123)][_0x689528(0xda)](q,_0x1faa41);}[_0x256f4a(0xfe)](){[[p],[g],[_]]['forEach'](_0x8b487a=>{const _0x567c5c=_0x5b94;this['_injector'][_0x567c5c(0x12b)](_0x8b487a);});}[_0x256f4a(0xcf)](){const _0x3febb4=_0x256f4a;this[_0x3febb4(0x126)]['get'](g),this['_injector']['get'](_);}},N(exports[_0x256f4a(0x120)],_0x256f4a(0xd8),U),N(exports[_0x256f4a(0x120)],'type',c[_0x256f4a(0xd3)][_0x256f4a(0x112)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x256f4a(0xd5)](w['UniverThreadCommentUIPlugin'],b[_0x256f4a(0xd0)],T[_0x256f4a(0x105)]),O(0x1,c[_0x256f4a(0xec)](c['Injector'])),O(0x2,c[_0x256f4a(0x127)])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4180b1=_0x1b28;(function(_0x45c067,_0x51230a){const _0x42e990=_0x1b28,_0x246baa=_0x45c067();while(!![]){try{const _0x375104=-parseInt(_0x42e990(0x1c3))/0x1+parseInt(_0x42e990(0x1c2))/0x2+parseInt(_0x42e990(0x191))/0x3+parseInt(_0x42e990(0x1cb))/0x4+-parseInt(_0x42e990(0x1f6))/0x5*(-parseInt(_0x42e990(0x1d1))/0x6)+parseInt(_0x42e990(0x1a4))/0x7*(-parseInt(_0x42e990(0x19c))/0x8)+-parseInt(_0x42e990(0x1eb))/0x9;if(_0x375104===_0x51230a)break;else _0x246baa['push'](_0x246baa['shift']());}catch(_0x3f3f14){_0x246baa['push'](_0x246baa['shift']());}}}(_0x1166,0xa6f05));import{CommentService as _0x1bb26a,CollaborationSessionService as _0x4700fa,UniverCollaborationClientPlugin as _0x2add79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3a6dc9}from'@univerjs-pro/license';import{dayjs as _0x30e5fe,UserManagerService as _0x51e746,Inject as _0x54c27f,Injector as _0x1bb80b,Disposable as _0x287a8e,CustomRangeType as _0x2aa294,UniverInstanceType as _0x140979,DependentOn as _0x5d589e,IConfigService as _0x4d8774,Plugin as _0x558095,merge as _0x599c45}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f759}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bccec,IThreadCommentDataSourceService as _0x241c92}from'@univerjs/thread-comment';function _0x1b28(_0x586063,_0x361029){_0x586063=_0x586063-0x18e;const _0x11660c=_0x1166();let _0x1b28d9=_0x11660c[_0x586063];return _0x1b28d9;}function _0x1166(){const _0x18a0fa=['_httpService','Reply','find','threadId','commentUpdate$','syncUpdateMutationToColla','disposeWithMe','_init','getMemberID','OpenOrReOpen','8FmOohS','values','UNIVER_UNKNOWN','Solve','solved','content','replies','slice','4365298JBqJVa','dataSource','error','ref','_userService','requireSession','post','customRanges','comments','Delete','getCurrentUser','length','_injector','stringify','code','updateComment','symbol','_config','deleteComment','pipe','rangeType','/universer-api/user/list','listComments','thread-comment-data-source.config','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','userId','_threadCommentDataSourceService','605010drKAoN','239647NxdiYz','/list','_initDataSource','root','format','subscribe','/edit','personId','2724836LsGDtp','resolved','addComment','getUnit','map','_sessionService','7818AfBCEz','_commentService','Solved','_threadCommentModel','get','saveCommentToSnapshot','type','defineProperty','setConfig','getUser','unitId','COMMENT','Edit','onStarting','replyId','resolveComment','forEach','size','rangeId','/universer-api/comment/unit/','addUser','_threadCommentDataSource','/add','parentId','_initUserSync','getOwnPropertyDescriptor','6674544Ladixe','body','users','Unknown','pluginName','createTimestamp','_configService','parse','userID','UNRECOGNIZED','Add','3145LAjTUw','/solved','user','delete','filter','getComment','1456071pFSVhQ'];_0x1166=function(){return _0x18a0fa;};return _0x1166();}import{bufferTime as _0x545da4}from'rxjs';import{HTTPService as _0x163b66}from'@univerjs/network';const W=_0x4180b1(0x1bd);var I=(_0x2b5efb=>(_0x2b5efb[_0x2b5efb[_0x4180b1(0x19b)]=0x0]=_0x4180b1(0x19b),_0x2b5efb[_0x2b5efb[_0x4180b1(0x1d3)]=0x1]=_0x4180b1(0x1d3),_0x2b5efb[_0x2b5efb['UNRECOGNIZED']=-0x1]=_0x4180b1(0x1f4),_0x2b5efb))(I||{}),v=(_0x382e20=>(_0x382e20[_0x382e20[_0x4180b1(0x1ee)]=0x0]=_0x4180b1(0x1ee),_0x382e20[_0x382e20[_0x4180b1(0x1f5)]=0x1]=_0x4180b1(0x1f5),_0x382e20[_0x382e20[_0x4180b1(0x193)]=0x2]='Reply',_0x382e20[_0x382e20['Edit']=0x3]=_0x4180b1(0x1dd),_0x382e20[_0x382e20['Delete']=0x4]=_0x4180b1(0x1ad),_0x382e20[_0x382e20['Solve']=0x5]=_0x4180b1(0x19f),_0x382e20[_0x382e20[_0x4180b1(0x1f4)]=-0x1]=_0x4180b1(0x1f4),_0x382e20))(v||{});const y=_0x22a6f2=>_0x30e5fe(new Date(+_0x22a6f2))[_0x4180b1(0x1c7)](_0x4180b1(0x1bf)),B=async(_0x400022,_0x1d45c1)=>{const _0x1fbe53=_0x4180b1,_0x65dc99=_0x400022[_0x1fbe53(0x1d5)](_0x51e746),_0x28e80f=_0x400022[_0x1fbe53(0x1d5)](_0x163b66);_0x1d45c1[_0x1fbe53(0x1e1)](_0x419660=>{const _0xe41fd7=_0x1fbe53;_0x65dc99[_0xe41fd7(0x1da)](_0x419660)&&_0x1d45c1[_0xe41fd7(0x18e)](_0x419660);}),_0x1d45c1[_0x1fbe53(0x1e2)]&&(await _0x28e80f[_0x1fbe53(0x1d5)](_0x1fbe53(0x1b9),{'params':{'userIDs':[..._0x1d45c1]}}))[_0x1fbe53(0x1ec)][_0x1fbe53(0x1ed)]['forEach'](_0x10324e=>{_0x10324e&&_0x65dc99['addUser'](_0x10324e);});};var K=Object[_0x4180b1(0x1ea)],V=(_0x1ae3bc,_0x42c782,_0x21411a,_0x4ddfc5)=>{for(var _0x541b68=_0x4ddfc5>0x1?void 0x0:_0x4ddfc5?K(_0x42c782,_0x21411a):_0x42c782,_0x2f367e=_0x1ae3bc['length']-0x1,_0x3eb078;_0x2f367e>=0x0;_0x2f367e--)(_0x3eb078=_0x1ae3bc[_0x2f367e])&&(_0x541b68=_0x3eb078(_0x541b68)||_0x541b68);return _0x541b68;},p=(_0x1abbf9,_0xdb968d)=>(_0x1021e2,_0x840ee9)=>_0xdb968d(_0x1021e2,_0x840ee9,_0x1abbf9);let _=class extends _0x287a8e{constructor(_0x344e1b,_0x324a00,_0x2b4e2a,_0x1200e6){const _0x1eb32f=_0x4180b1;super(),this['_commentService']=_0x344e1b,this['_threadCommentModel']=_0x324a00,this[_0x1eb32f(0x1a8)]=_0x2b4e2a,this[_0x1eb32f(0x1b0)]=_0x1200e6,this[_0x1eb32f(0x199)](),this[_0x1eb32f(0x1e9)]();}[_0x4180b1(0x1e9)](){const _0x7d27d8=_0x4180b1;this['disposeWithMe'](this[_0x7d27d8(0x1d4)][_0x7d27d8(0x196)][_0x7d27d8(0x1b7)](_0x545da4(0x10))[_0x7d27d8(0x1c8)](_0x27832f=>{const _0xf5d0ab=_0x7d27d8,_0x5127f3=new Set();_0x27832f[_0xf5d0ab(0x1e1)](_0xfe75a2=>{const _0x346f30=_0xf5d0ab;if(_0xfe75a2['type']===_0x346f30(0x1be)){const _0x4b2e81=_0xfe75a2[_0x346f30(0x1bc)][_0x346f30(0x1ca)];_0x5127f3['add'](_0x4b2e81);}}),B(this[_0xf5d0ab(0x1b0)],_0x5127f3);}));}[_0x4180b1(0x199)](){const _0x2eecb9=_0x4180b1;this[_0x2eecb9(0x198)](this[_0x2eecb9(0x1d2)]['commentUpdate$'][_0x2eecb9(0x1c8)](async _0x3973d9=>{const _0x2f9ade=_0x2eecb9;var _0x30c52e,_0x47bfd2,_0x59621a,_0x2c5c24;const _0x2cf086=(_0x30c52e=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x14fd6c=>_0x14fd6c[_0x2f9ade(0x195)]===_0x3973d9[_0x2f9ade(0x195)]))==null?void 0x0:_0x30c52e[_0x2f9ade(0x1c6)];if(!_0x2cf086)return;const {unitId:_0x1399a6,subUnitId:_0x26c242}=_0x2cf086;switch(_0x3973d9[_0x2f9ade(0x1f8)]&&this[_0x2f9ade(0x1a8)][_0x2f9ade(0x1e5)](_0x3973d9[_0x2f9ade(0x1f8)]),_0x3973d9[_0x2f9ade(0x1d7)]){case v[_0x2f9ade(0x1f5)]:break;case v[_0x2f9ade(0x193)]:{this[_0x2f9ade(0x1d4)]['addComment'](_0x1399a6,_0x26c242,{'unitId':_0x1399a6,'subUnitId':_0x26c242,'ref':'','id':_0x3973d9[_0x2f9ade(0x1df)],'dT':y(+_0x3973d9[_0x2f9ade(0x1f0)]),'threadId':_0x3973d9[_0x2f9ade(0x195)],'personId':(_0x59621a=(_0x47bfd2=_0x3973d9['user'])==null?void 0x0:_0x47bfd2['userID'])!=null?_0x59621a:_0x3973d9['userId'],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content']),'parentId':_0x2cf086['id']});break;}case v['Delete']:{const _0x1888c4=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x190)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);_0x1888c4&&_0x1888c4[_0x2f9ade(0x1e8)]&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1b6)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);break;}case v[_0x2f9ade(0x1dd)]:{this['_threadCommentModel'][_0x2f9ade(0x1b3)](_0x1399a6,_0x26c242,{'commentId':_0x3973d9[_0x2f9ade(0x1df)],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content'])});break;}case v[_0x2f9ade(0x19f)]:{const _0x566ab5=(_0x2c5c24=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x1adc4f=>_0x1adc4f[_0x2f9ade(0x195)]===_0x3973d9['threadId']))==null?void 0x0:_0x2c5c24[_0x2f9ade(0x1c6)];_0x566ab5&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1e0)](_0x1399a6,_0x26c242,_0x566ab5['id'],_0x3973d9['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x54c27f(_0x1bb26a)),p(0x1,_0x54c27f(_0x5bccec)),p(0x2,_0x54c27f(_0x51e746)),p(0x3,_0x54c27f(_0x1bb80b))],_);const z=_0x4180b1(0x1bb),O={};var k=Object[_0x4180b1(0x1ea)],Q=(_0x401308,_0x2d430f,_0x548ef8,_0x48ae08)=>{const _0x51f55b=_0x4180b1;for(var _0x31d046=_0x48ae08>0x1?void 0x0:_0x48ae08?k(_0x2d430f,_0x548ef8):_0x2d430f,_0x521725=_0x401308[_0x51f55b(0x1af)]-0x1,_0x31273f;_0x521725>=0x0;_0x521725--)(_0x31273f=_0x401308[_0x521725])&&(_0x31d046=_0x31273f(_0x31d046)||_0x31d046);return _0x31d046;},b=(_0x2cbfd9,_0x440532)=>(_0x520e32,_0x259c16)=>_0x440532(_0x520e32,_0x259c16,_0x2cbfd9);function X(_0x4ff5ea,_0x4298c4){const _0x5abf8f=_0x4180b1,_0x564bcb=_0x4ff5ea[_0x5abf8f(0x1a2)][0x0];return{..._0x4298c4,'id':_0x564bcb[_0x5abf8f(0x1df)],'resolved':_0x4ff5ea[_0x5abf8f(0x1a0)]===0x1,'dT':y(_0x564bcb[_0x5abf8f(0x1f0)]),'personId':_0x564bcb[_0x5abf8f(0x1c0)],'threadId':_0x564bcb[_0x5abf8f(0x195)]};}function ee(_0x54080d,_0x4584f6,_0x13340a){const _0x4bf80d=_0x4180b1;var _0x445c99,_0x5c21d4;if(((_0x5c21d4=(_0x445c99=_0x54080d==null?void 0x0:_0x54080d[_0x4bf80d(0x1a2)])==null?void 0x0:_0x445c99[_0x4bf80d(0x1af)])!=null?_0x5c21d4:0x0)>0x0){const _0x4dc295=(_0xd8eeb5,_0x16f077)=>({'id':_0xd8eeb5['replyId'],'threadId':_0xd8eeb5[_0x4bf80d(0x195)],'dT':y(_0xd8eeb5[_0x4bf80d(0x1f0)]),'personId':_0xd8eeb5['userId'],'resolved':_0x54080d[_0x4bf80d(0x1a0)]===I[_0x4bf80d(0x1d3)],'unitId':_0x4584f6,'subUnitId':_0x13340a,'text':JSON[_0x4bf80d(0x1f2)](_0xd8eeb5[_0x4bf80d(0x1a1)]),'parentId':_0x16f077}),_0x3c9a6f=_0x4dc295(_0x54080d[_0x4bf80d(0x1a2)][0x0]);return{..._0x3c9a6f,'children':_0x54080d[_0x4bf80d(0x1a2)][_0x4bf80d(0x1a3)](0x1)[_0x4bf80d(0x1cf)](_0x4c18e7=>_0x4dc295(_0x4c18e7,_0x3c9a6f['id']))};}return null;}let S=class{constructor(_0x24b567,_0x2c79c5,_0x5bb221){const _0x3c1c12=_0x4180b1;this['_httpService']=_0x24b567,this[_0x3c1c12(0x1a8)]=_0x2c79c5,this[_0x3c1c12(0x1d0)]=_0x5bb221;}async[_0x4180b1(0x1cd)](_0x7a351f){const _0x42097a=_0x4180b1;var _0x14f825,_0x59c911;const {parentId:_0x2de79b,unitId:_0x551632,text:_0x4aba44,threadId:_0x51dbfb}=_0x7a351f,_0x431461=(_0x59c911=(_0x14f825=_0x4aba44[_0x42097a(0x1ab)])==null?void 0x0:_0x14f825[_0x42097a(0x18f)](_0x1596a5=>_0x1596a5[_0x42097a(0x1b8)]===_0x2aa294[_0x42097a(0x1dc)])[_0x42097a(0x1cf)](_0x5765e4=>_0x5765e4['rangeId']))!=null?_0x59c911:[],_0x123ef9=JSON[_0x42097a(0x1b1)](_0x4aba44),_0x2af36d=(await this[_0x42097a(0x1d0)][_0x42097a(0x1a9)](_0x551632))['getMemberID']();if(_0x2de79b){const _0x566cac={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461,'threadId':_0x51dbfb},_0x4710cf=(await this['_httpService'][_0x42097a(0x1aa)]('/universer-api/comment/unit/'+_0x551632+'/reply',{'body':_0x566cac}))[_0x42097a(0x1ec)]['reply'];return{..._0x7a351f,'id':_0x4710cf[_0x42097a(0x1df)],'dT':_0x30e5fe(+_0x4710cf['createTimestamp'])['format'](_0x42097a(0x1bf)),'personId':_0x4710cf[_0x42097a(0x1c0)]};}else{const _0x128dd9={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461},_0x55b263=await this[_0x42097a(0x192)]['post'](_0x42097a(0x1e4)+_0x551632+_0x42097a(0x1e7),{'body':_0x128dd9});return X(_0x55b263['body']['comment'],_0x7a351f);}}async[_0x4180b1(0x1b3)](_0x51b87d){const _0x189af2=_0x4180b1;var _0x20e6de,_0x226c8c;const {text:_0x3eac6b,unitId:_0x4ae742}=_0x51b87d,_0x5a7919=(_0x226c8c=(_0x20e6de=_0x3eac6b[_0x189af2(0x1ab)])==null?void 0x0:_0x20e6de[_0x189af2(0x18f)](_0x47f52d=>_0x47f52d['rangeType']===_0x2aa294[_0x189af2(0x1dc)])[_0x189af2(0x1cf)](_0x4a2ae5=>_0x4a2ae5[_0x189af2(0x1e3)]))!=null?_0x226c8c:[],_0xc200c6=JSON[_0x189af2(0x1b1)](_0x3eac6b),_0x2cfed9=_0x51b87d['threadId'],_0x4e46d6=_0x51b87d['id'],_0x65513a={'memberId':(await this[_0x189af2(0x1d0)][_0x189af2(0x1a9)](_0x4ae742))[_0x189af2(0x19a)](),'unitId':_0x4ae742,'threadId':_0x2cfed9,'mention':_0x5a7919,'content':_0xc200c6,'replyId':_0x4e46d6},_0x51d894=await this[_0x189af2(0x192)][_0x189af2(0x1aa)](_0x189af2(0x1e4)+_0x4ae742+_0x189af2(0x1c9),{'body':_0x65513a});return!_0x51d894[_0x189af2(0x1ec)]['error']||_0x51d894['body'][_0x189af2(0x1a6)][_0x189af2(0x1b2)]===0x1;}async[_0x4180b1(0x1e0)](_0x16d46d){const _0x5e02dd=_0x4180b1,{unitId:_0x3a8616}=_0x16d46d,_0x5be6dc=_0x16d46d[_0x5e02dd(0x195)],_0x5c6cad={'memberId':this['_userService'][_0x5e02dd(0x1ae)]()[_0x5e02dd(0x1f3)],'unitId':_0x3a8616,'threadId':_0x5be6dc,'solved':_0x16d46d[_0x5e02dd(0x1cc)]?I[_0x5e02dd(0x1d3)]:I[_0x5e02dd(0x19b)]},_0x35efe3=await this[_0x5e02dd(0x192)][_0x5e02dd(0x1aa)](_0x5e02dd(0x1e4)+_0x3a8616+_0x5e02dd(0x1f7),{'body':_0x5c6cad});return!_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)]||_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)][_0x5e02dd(0x1b2)]===0x1;}async[_0x4180b1(0x1b6)](_0x292e3b,_0x4fb793,_0x6fbc1,_0x121f2f){const _0x275376=_0x4180b1,_0x38970c={'memberId':(await this[_0x275376(0x1d0)]['requireSession'](_0x292e3b))[_0x275376(0x19a)](),'threadId':_0x6fbc1,'replyId':_0x121f2f,'unitId':_0x292e3b},_0x1de803=await this[_0x275376(0x192)][_0x275376(0x1aa)]('/universer-api/comment/unit/'+_0x292e3b+'/delete',{'body':_0x38970c});return!_0x1de803['body'][_0x275376(0x1a6)]||_0x1de803[_0x275376(0x1ec)][_0x275376(0x1a6)][_0x275376(0x1b2)]===0x1;}async[_0x4180b1(0x1ba)](_0x55381e,_0x1e90ed,_0xa7511){const _0x5d3fe3=_0x4180b1,_0x4cfdaa={'unitId':_0x55381e,'threadId':_0xa7511},_0x464474=await this[_0x5d3fe3(0x192)]['post']('/universer-api/comment/unit/'+_0x55381e+_0x5d3fe3(0x1c4),{'body':_0x4cfdaa}),_0x3d4464=_0xa7511[_0x5d3fe3(0x1cf)](_0x432373=>ee(_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ac)][_0x432373],_0x55381e,_0x1e90ed))['filter'](Boolean);return Object[_0x5d3fe3(0x19d)](_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ed)])[_0x5d3fe3(0x1e1)](_0xed875e=>{const _0xd9a734=_0x5d3fe3;this[_0xd9a734(0x1a8)][_0xd9a734(0x1e5)](_0xed875e);}),_0x3d4464;}[_0x4180b1(0x1d6)](_0xdc9b74){const _0x35ae6d=_0x4180b1;return{'id':_0xdc9b74['id'],'threadId':_0xdc9b74[_0x35ae6d(0x195)],'ref':_0xdc9b74[_0x35ae6d(0x1a7)]};}};S=Q([b(0x0,_0x54c27f(_0x163b66)),b(0x1,_0x54c27f(_0x51e746)),b(0x2,_0x54c27f(_0x4700fa))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x54ae4e,_0x34324a,_0x1bbce1,_0x2a5703)=>{for(var _0x2091cd=_0x2a5703>0x1?void 0x0:_0x2a5703?re(_0x34324a,_0x1bbce1):_0x34324a,_0x3ecbf2=_0x54ae4e['length']-0x1,_0x41d4e4;_0x3ecbf2>=0x0;_0x3ecbf2--)(_0x41d4e4=_0x54ae4e[_0x3ecbf2])&&(_0x2091cd=_0x41d4e4(_0x2091cd)||_0x2091cd);return _0x2091cd;},M=(_0x39762c,_0x3e5f19)=>(_0x335f35,_0x463934)=>_0x3e5f19(_0x335f35,_0x463934,_0x39762c);let f=class extends _0x287a8e{constructor(_0x59778c,_0xf8c71a){const _0x5e9f60=_0x4180b1;super(),this['_threadCommentDataSourceService']=_0x59778c,this['_threadCommentDataSource']=_0xf8c71a,this[_0x5e9f60(0x1c5)]();}[_0x4180b1(0x1c5)](){const _0x195265=_0x4180b1;this[_0x195265(0x1c1)][_0x195265(0x1a5)]=this[_0x195265(0x1e6)],this[_0x195265(0x1c1)][_0x195265(0x197)]=!0x1;}};f=te([M(0x0,_0x241c92),M(0x1,_0x54c27f(S))],f);var se=Object[_0x4180b1(0x1d8)],oe=Object[_0x4180b1(0x1ea)],ne=(_0x571635,_0x1c79d1,_0x3b87f3)=>_0x1c79d1 in _0x571635?se(_0x571635,_0x1c79d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b87f3}):_0x571635[_0x1c79d1]=_0x3b87f3,ie=(_0xac8d0f,_0x20edc6,_0x2850e2,_0x5efb4e)=>{const _0x52f1fe=_0x4180b1;for(var _0x1f6064=_0x5efb4e>0x1?void 0x0:_0x5efb4e?oe(_0x20edc6,_0x2850e2):_0x20edc6,_0x2ae1f4=_0xac8d0f[_0x52f1fe(0x1af)]-0x1,_0x4597e2;_0x2ae1f4>=0x0;_0x2ae1f4--)(_0x4597e2=_0xac8d0f[_0x2ae1f4])&&(_0x1f6064=_0x4597e2(_0x1f6064)||_0x1f6064);return _0x1f6064;},N=(_0x53f721,_0x492d4e)=>(_0x3bb541,_0x4de18c)=>_0x492d4e(_0x3bb541,_0x4de18c,_0x53f721),$=(_0x1553f1,_0x5dafc0,_0x3f2344)=>ne(_0x1553f1,typeof _0x5dafc0!=_0x4180b1(0x1b4)?_0x5dafc0+'':_0x5dafc0,_0x3f2344);let g=class extends _0x558095{constructor(_0x4a397c=O,_0x3eae51,_0x15ae92){const _0x320c52=_0x4180b1;super(),this[_0x320c52(0x1b5)]=_0x4a397c,this['_injector']=_0x3eae51,this[_0x320c52(0x1f1)]=_0x15ae92;const {..._0x3b9956}=_0x599c45({},O,this[_0x320c52(0x1b5)]);this[_0x320c52(0x1f1)][_0x320c52(0x1d9)](z,_0x3b9956);}[_0x4180b1(0x1de)](){[[S],[f],[_]]['forEach'](_0x10f72e=>{const _0x666667=_0x1b28;this[_0x666667(0x1b0)][_0x666667(0x1be)](_0x10f72e);});}['onReady'](){const _0x4996bd=_0x4180b1;this['_injector'][_0x4996bd(0x1d5)](f),this[_0x4996bd(0x1b0)]['get'](_);}};$(g,_0x4180b1(0x1ef),W),$(g,_0x4180b1(0x1d7),_0x140979[_0x4180b1(0x19e)]),g=ie([_0x5d589e(_0x31f759,_0x2add79,_0x3a6dc9),N(0x1,_0x54c27f(_0x1bb80b)),N(0x2,_0x4d8774)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2182(_0x5da843,_0x40ea69){_0x5da843=_0x5da843-0xd8;const _0x6cf6a7=_0x6cf6();let _0x2182e4=_0x6cf6a7[_0x5da843];return _0x2182e4;}const _0x2f1a88=_0x2182;(function(_0x17c204,_0x4589fd){const _0x3dd332=_0x2182,_0x3425cb=_0x17c204();while(!![]){try{const _0x430978=parseInt(_0x3dd332(0xee))/0x1*(-parseInt(_0x3dd332(0x109))/0x2)+-parseInt(_0x3dd332(0xfb))/0x3*(-parseInt(_0x3dd332(0x113))/0x4)+parseInt(_0x3dd332(0x136))/0x5*(parseInt(_0x3dd332(0x135))/0x6)+parseInt(_0x3dd332(0x138))/0x7*(parseInt(_0x3dd332(0x134))/0x8)+parseInt(_0x3dd332(0xdb))/0x9*(-parseInt(_0x3dd332(0x100))/0xa)+-parseInt(_0x3dd332(0x110))/0xb+parseInt(_0x3dd332(0x128))/0xc;if(_0x430978===_0x4589fd)break;else _0x3425cb['push'](_0x3425cb['shift']());}catch(_0x3dfcaf){_0x3425cb['push'](_0x3425cb['shift']());}}}(_0x6cf6,0x6d4f8));import{CommentService as _0x4824e3,CollaborationSessionService as _0x41dd94,UniverCollaborationClientPlugin as _0x424de7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38080a}from'@univerjs-pro/license';import{dayjs as _0x151d20,UserManagerService as _0xead225,Inject as _0xde01ec,Injector as _0x337246,Disposable as _0x324ec9,CustomRangeType as _0x3b8245,UniverInstanceType as _0x25d2ac,DependentOn as _0x28793a,IConfigService as _0x21f661,Plugin as _0x51869c,merge as _0x15954c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xcae651}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x6dff5f,IThreadCommentDataSourceService as _0xb4d94}from'@univerjs/thread-comment';import{bufferTime as _0x208a30}from'rxjs';import{HTTPService as _0x20faf4}from'@univerjs/network';const W=_0x2f1a88(0xe0);function _0x6cf6(){const _0x2de172=['UNRECOGNIZED','_httpService','user','forEach','subscribe','filter','replies','delete','/solved','rangeId','368XLgomY','3852zlyZIs','4265xjUFSE','users','61187tbrvFG','/add','size','comments','get','createTimestamp','_threadCommentDataSource','getComment','Reply','userID','threadId','Solve','post','225TJdphT','getUnit','unitId','values','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','disposeWithMe','_threadCommentModel','add','OpenOrReOpen','onReady','Add','_injector','customRanges','/edit','code','root','parentId','29kgSLdL','Delete','defineProperty','body','_init','error','thread-comment-data-source.config','syncUpdateMutationToColla','length','deleteComment','parse','setConfig','/reply','256617zuVgYM','reply','resolveComment','payload','onStarting','201020uXdnVE','COMMENT','format','Solved','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','addComment','listComments','saveCommentToSnapshot','43370RCcDDP','addUser','/universer-api/comment/unit/','type','content','_config','updateComment','6563304QeGRkB','replyId','_initUserSync','12ZCzSeP','comment','_commentService','slice','requireSession','map','_sessionService','resolved','_userService','/universer-api/user/list','userId','solved','stringify','pluginName','getOwnPropertyDescriptor','_initDataSource','_configService','commentUpdate$','find','rangeType','/delete','11633832IJiMxl','getMemberID'];_0x6cf6=function(){return _0x2de172;};return _0x6cf6();}var I=(_0x1a9792=>(_0x1a9792[_0x1a9792[_0x2f1a88(0xe5)]=0x0]=_0x2f1a88(0xe5),_0x1a9792[_0x1a9792['Solved']=0x1]=_0x2f1a88(0x103),_0x1a9792[_0x1a9792[_0x2f1a88(0x12a)]=-0x1]=_0x2f1a88(0x12a),_0x1a9792))(I||{}),v=(_0x5d229a=>(_0x5d229a[_0x5d229a['Unknown']=0x0]='Unknown',_0x5d229a[_0x5d229a['Add']=0x1]=_0x2f1a88(0xe7),_0x5d229a[_0x5d229a[_0x2f1a88(0x140)]=0x2]='Reply',_0x5d229a[_0x5d229a[_0x2f1a88(0xe1)]=0x3]='Edit',_0x5d229a[_0x5d229a[_0x2f1a88(0xef)]=0x4]=_0x2f1a88(0xef),_0x5d229a[_0x5d229a[_0x2f1a88(0xd9)]=0x5]='Solve',_0x5d229a[_0x5d229a[_0x2f1a88(0x12a)]=-0x1]='UNRECOGNIZED',_0x5d229a))(v||{});const y=_0x2bb0cb=>_0x151d20(new Date(+_0x2bb0cb))[_0x2f1a88(0x102)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3a1856,_0x2a4797)=>{const _0x2a3f79=_0x2f1a88,_0x19e52b=_0x3a1856[_0x2a3f79(0x13c)](_0xead225),_0x128efe=_0x3a1856['get'](_0x20faf4);_0x2a4797[_0x2a3f79(0x12d)](_0x2bf24f=>{const _0x216792=_0x2a3f79;_0x19e52b['getUser'](_0x2bf24f)&&_0x2a4797[_0x216792(0x131)](_0x2bf24f);}),_0x2a4797[_0x2a3f79(0x13a)]&&(await _0x128efe[_0x2a3f79(0x13c)](_0x2a3f79(0x11c),{'params':{'userIDs':[..._0x2a4797]}}))[_0x2a3f79(0xf1)][_0x2a3f79(0x137)][_0x2a3f79(0x12d)](_0x5b06b2=>{_0x5b06b2&&_0x19e52b['addUser'](_0x5b06b2);});};var K=Object[_0x2f1a88(0x121)],V=(_0x2a5aa5,_0x5ecc29,_0x161f1e,_0x1402ea)=>{const _0x2227d3=_0x2f1a88;for(var _0x492226=_0x1402ea>0x1?void 0x0:_0x1402ea?K(_0x5ecc29,_0x161f1e):_0x5ecc29,_0x5f2ecc=_0x2a5aa5[_0x2227d3(0xf6)]-0x1,_0x559f7e;_0x5f2ecc>=0x0;_0x5f2ecc--)(_0x559f7e=_0x2a5aa5[_0x5f2ecc])&&(_0x492226=_0x559f7e(_0x492226)||_0x492226);return _0x492226;},p=(_0x4d5b3b,_0x89758f)=>(_0x13710f,_0x178950)=>_0x89758f(_0x13710f,_0x178950,_0x4d5b3b);let _=class extends _0x324ec9{constructor(_0x542791,_0x45f29f,_0x4e5dbb,_0x2eef95){const _0x5f384a=_0x2f1a88;super(),this[_0x5f384a(0x115)]=_0x542791,this[_0x5f384a(0xe3)]=_0x45f29f,this[_0x5f384a(0x11b)]=_0x4e5dbb,this[_0x5f384a(0xe8)]=_0x2eef95,this['_init'](),this[_0x5f384a(0x112)]();}[_0x2f1a88(0x112)](){const _0x4be93e=_0x2f1a88;this[_0x4be93e(0xe2)](this[_0x4be93e(0xe3)][_0x4be93e(0x124)]['pipe'](_0x208a30(0x10))[_0x4be93e(0x12e)](_0x5e630b=>{const _0x513df3=new Set();_0x5e630b['forEach'](_0x4b0557=>{const _0x50ba7b=_0x2182;if(_0x4b0557[_0x50ba7b(0x10c)]===_0x50ba7b(0xe4)){const _0xbb385=_0x4b0557[_0x50ba7b(0xfe)]['personId'];_0x513df3['add'](_0xbb385);}}),B(this['_injector'],_0x513df3);}));}[_0x2f1a88(0xf2)](){const _0x2183db=_0x2f1a88;this[_0x2183db(0xe2)](this['_commentService'][_0x2183db(0x124)][_0x2183db(0x12e)](async _0x3c4f5a=>{const _0x14ed1b=_0x2183db;var _0xcd595d,_0x26bb9e,_0x13fb12,_0x1eee73;const _0x41c199=(_0xcd595d=this[_0x14ed1b(0xe3)][_0x14ed1b(0xdc)](_0x3c4f5a[_0x14ed1b(0xdd)])[_0x14ed1b(0x125)](_0x528d27=>_0x528d27[_0x14ed1b(0xd8)]===_0x3c4f5a[_0x14ed1b(0xd8)]))==null?void 0x0:_0xcd595d['root'];if(!_0x41c199)return;const {unitId:_0x1d712f,subUnitId:_0x3a9a92}=_0x41c199;switch(_0x3c4f5a[_0x14ed1b(0x12c)]&&this['_userService'][_0x14ed1b(0x10a)](_0x3c4f5a['user']),_0x3c4f5a[_0x14ed1b(0x10c)]){case v['Add']:break;case v['Reply']:{this[_0x14ed1b(0xe3)][_0x14ed1b(0x106)](_0x1d712f,_0x3a9a92,{'unitId':_0x1d712f,'subUnitId':_0x3a9a92,'ref':'','id':_0x3c4f5a[_0x14ed1b(0x111)],'dT':y(+_0x3c4f5a['createTimestamp']),'threadId':_0x3c4f5a[_0x14ed1b(0xd8)],'personId':(_0x13fb12=(_0x26bb9e=_0x3c4f5a['user'])==null?void 0x0:_0x26bb9e['userID'])!=null?_0x13fb12:_0x3c4f5a[_0x14ed1b(0x11d)],'text':JSON[_0x14ed1b(0xf8)](_0x3c4f5a[_0x14ed1b(0x10d)]),'parentId':_0x41c199['id']});break;}case v[_0x14ed1b(0xef)]:{const _0x4a6002=this[_0x14ed1b(0xe3)][_0x14ed1b(0x13f)](_0x1d712f,_0x3a9a92,_0x3c4f5a[_0x14ed1b(0x111)]);_0x4a6002&&_0x4a6002[_0x14ed1b(0xed)]&&this['_threadCommentModel'][_0x14ed1b(0xf7)](_0x1d712f,_0x3a9a92,_0x3c4f5a[_0x14ed1b(0x111)]);break;}case v[_0x14ed1b(0xe1)]:{this['_threadCommentModel'][_0x14ed1b(0x10f)](_0x1d712f,_0x3a9a92,{'commentId':_0x3c4f5a[_0x14ed1b(0x111)],'text':JSON[_0x14ed1b(0xf8)](_0x3c4f5a[_0x14ed1b(0x10d)])});break;}case v['Solve']:{const _0x119b95=(_0x1eee73=this[_0x14ed1b(0xe3)][_0x14ed1b(0xdc)](_0x3c4f5a[_0x14ed1b(0xdd)])[_0x14ed1b(0x125)](_0x50fb86=>_0x50fb86[_0x14ed1b(0xd8)]===_0x3c4f5a[_0x14ed1b(0xd8)]))==null?void 0x0:_0x1eee73[_0x14ed1b(0xec)];_0x119b95&&this[_0x14ed1b(0xe3)][_0x14ed1b(0xfd)](_0x1d712f,_0x3a9a92,_0x119b95['id'],_0x3c4f5a[_0x14ed1b(0x11e)]===I[_0x14ed1b(0x103)]);break;}}}));}};_=V([p(0x0,_0xde01ec(_0x4824e3)),p(0x1,_0xde01ec(_0x6dff5f)),p(0x2,_0xde01ec(_0xead225)),p(0x3,_0xde01ec(_0x337246))],_);const z=_0x2f1a88(0xf4),O={};var k=Object[_0x2f1a88(0x121)],Q=(_0x219f08,_0x551dc1,_0x424714,_0x33f78b)=>{const _0x3da0e1=_0x2f1a88;for(var _0x20fc8c=_0x33f78b>0x1?void 0x0:_0x33f78b?k(_0x551dc1,_0x424714):_0x551dc1,_0x4efd6=_0x219f08[_0x3da0e1(0xf6)]-0x1,_0x219b70;_0x4efd6>=0x0;_0x4efd6--)(_0x219b70=_0x219f08[_0x4efd6])&&(_0x20fc8c=_0x219b70(_0x20fc8c)||_0x20fc8c);return _0x20fc8c;},b=(_0xd220dc,_0x19035b)=>(_0x3bf4fc,_0x5f377d)=>_0x19035b(_0x3bf4fc,_0x5f377d,_0xd220dc);function X(_0x344129,_0x4aa577){const _0x49ef2d=_0x2f1a88,_0x1cb909=_0x344129['replies'][0x0];return{..._0x4aa577,'id':_0x1cb909[_0x49ef2d(0x111)],'resolved':_0x344129['solved']===0x1,'dT':y(_0x1cb909[_0x49ef2d(0x13d)]),'personId':_0x1cb909[_0x49ef2d(0x11d)],'threadId':_0x1cb909[_0x49ef2d(0xd8)]};}function ee(_0x175ded,_0x517526,_0x28ffb4){const _0x1c57a2=_0x2f1a88;var _0x170239,_0x3cd318;if(((_0x3cd318=(_0x170239=_0x175ded==null?void 0x0:_0x175ded['replies'])==null?void 0x0:_0x170239[_0x1c57a2(0xf6)])!=null?_0x3cd318:0x0)>0x0){const _0x571960=(_0x42fecd,_0x5c43b4)=>({'id':_0x42fecd[_0x1c57a2(0x111)],'threadId':_0x42fecd[_0x1c57a2(0xd8)],'dT':y(_0x42fecd['createTimestamp']),'personId':_0x42fecd[_0x1c57a2(0x11d)],'resolved':_0x175ded[_0x1c57a2(0x11e)]===I[_0x1c57a2(0x103)],'unitId':_0x517526,'subUnitId':_0x28ffb4,'text':JSON[_0x1c57a2(0xf8)](_0x42fecd['content']),'parentId':_0x5c43b4}),_0x3bc53a=_0x571960(_0x175ded[_0x1c57a2(0x130)][0x0]);return{..._0x3bc53a,'children':_0x175ded[_0x1c57a2(0x130)][_0x1c57a2(0x116)](0x1)[_0x1c57a2(0x118)](_0x2d56bb=>_0x571960(_0x2d56bb,_0x3bc53a['id']))};}return null;}let S=class{constructor(_0xa0fa62,_0x2f921c,_0x203122){this['_httpService']=_0xa0fa62,this['_userService']=_0x2f921c,this['_sessionService']=_0x203122;}async[_0x2f1a88(0x106)](_0x7407b9){const _0x20d734=_0x2f1a88;var _0x146719,_0x5d1069;const {parentId:_0x35a17c,unitId:_0x1651c2,text:_0x44116d,threadId:_0x208d90}=_0x7407b9,_0x29afc1=(_0x5d1069=(_0x146719=_0x44116d[_0x20d734(0xe9)])==null?void 0x0:_0x146719[_0x20d734(0x12f)](_0x5c97b4=>_0x5c97b4[_0x20d734(0x126)]===_0x3b8245[_0x20d734(0x101)])['map'](_0x771333=>_0x771333[_0x20d734(0x133)]))!=null?_0x5d1069:[],_0x296bf3=JSON[_0x20d734(0x11f)](_0x44116d),_0x1ef6d7=(await this['_sessionService'][_0x20d734(0x117)](_0x1651c2))[_0x20d734(0x129)]();if(_0x35a17c){const _0x197234={'memberId':_0x1ef6d7,'unitId':_0x1651c2,'content':_0x296bf3,'mention':_0x29afc1,'threadId':_0x208d90},_0x1d9e13=(await this['_httpService']['post'](_0x20d734(0x10b)+_0x1651c2+_0x20d734(0xfa),{'body':_0x197234}))[_0x20d734(0xf1)][_0x20d734(0xfc)];return{..._0x7407b9,'id':_0x1d9e13[_0x20d734(0x111)],'dT':_0x151d20(+_0x1d9e13[_0x20d734(0x13d)])[_0x20d734(0x102)](_0x20d734(0x104)),'personId':_0x1d9e13[_0x20d734(0x11d)]};}else{const _0x2cf6f9={'memberId':_0x1ef6d7,'unitId':_0x1651c2,'content':_0x296bf3,'mention':_0x29afc1},_0x5f1eae=await this['_httpService'][_0x20d734(0xda)]('/universer-api/comment/unit/'+_0x1651c2+_0x20d734(0x139),{'body':_0x2cf6f9});return X(_0x5f1eae[_0x20d734(0xf1)][_0x20d734(0x114)],_0x7407b9);}}async[_0x2f1a88(0x10f)](_0xff4e35){const _0x5e7039=_0x2f1a88;var _0x2e3252,_0x2649f4;const {text:_0x3e0a52,unitId:_0x1dec09}=_0xff4e35,_0x38524e=(_0x2649f4=(_0x2e3252=_0x3e0a52['customRanges'])==null?void 0x0:_0x2e3252[_0x5e7039(0x12f)](_0x302888=>_0x302888[_0x5e7039(0x126)]===_0x3b8245[_0x5e7039(0x101)])[_0x5e7039(0x118)](_0x12af07=>_0x12af07['rangeId']))!=null?_0x2649f4:[],_0x42b6bc=JSON[_0x5e7039(0x11f)](_0x3e0a52),_0x14bb7c=_0xff4e35['threadId'],_0x4e602e=_0xff4e35['id'],_0x115e2f={'memberId':(await this[_0x5e7039(0x119)]['requireSession'](_0x1dec09))['getMemberID'](),'unitId':_0x1dec09,'threadId':_0x14bb7c,'mention':_0x38524e,'content':_0x42b6bc,'replyId':_0x4e602e},_0xa145d9=await this['_httpService'][_0x5e7039(0xda)](_0x5e7039(0x10b)+_0x1dec09+_0x5e7039(0xea),{'body':_0x115e2f});return!_0xa145d9[_0x5e7039(0xf1)][_0x5e7039(0xf3)]||_0xa145d9[_0x5e7039(0xf1)]['error']['code']===0x1;}async[_0x2f1a88(0xfd)](_0x2318bb){const _0x3b917f=_0x2f1a88,{unitId:_0x2b8517}=_0x2318bb,_0x196399=_0x2318bb[_0x3b917f(0xd8)],_0x360aeb={'memberId':this[_0x3b917f(0x11b)]['getCurrentUser']()[_0x3b917f(0x141)],'unitId':_0x2b8517,'threadId':_0x196399,'solved':_0x2318bb[_0x3b917f(0x11a)]?I[_0x3b917f(0x103)]:I[_0x3b917f(0xe5)]},_0xb3120d=await this[_0x3b917f(0x12b)]['post'](_0x3b917f(0x10b)+_0x2b8517+_0x3b917f(0x132),{'body':_0x360aeb});return!_0xb3120d[_0x3b917f(0xf1)]['error']||_0xb3120d[_0x3b917f(0xf1)][_0x3b917f(0xf3)][_0x3b917f(0xeb)]===0x1;}async[_0x2f1a88(0xf7)](_0x23cdeb,_0x4a01e8,_0x518012,_0x4f2742){const _0x42a456=_0x2f1a88,_0x3cf2bb={'memberId':(await this['_sessionService'][_0x42a456(0x117)](_0x23cdeb))['getMemberID'](),'threadId':_0x518012,'replyId':_0x4f2742,'unitId':_0x23cdeb},_0x39322a=await this[_0x42a456(0x12b)][_0x42a456(0xda)]('/universer-api/comment/unit/'+_0x23cdeb+_0x42a456(0x127),{'body':_0x3cf2bb});return!_0x39322a['body'][_0x42a456(0xf3)]||_0x39322a[_0x42a456(0xf1)][_0x42a456(0xf3)][_0x42a456(0xeb)]===0x1;}async[_0x2f1a88(0x107)](_0x471fec,_0x2399bc,_0x489975){const _0x123191=_0x2f1a88,_0x1d9998={'unitId':_0x471fec,'threadId':_0x489975},_0x299da1=await this[_0x123191(0x12b)][_0x123191(0xda)](_0x123191(0x10b)+_0x471fec+'/list',{'body':_0x1d9998}),_0x58e566=_0x489975[_0x123191(0x118)](_0x46e4f3=>ee(_0x299da1[_0x123191(0xf1)][_0x123191(0x13b)][_0x46e4f3],_0x471fec,_0x2399bc))[_0x123191(0x12f)](Boolean);return Object[_0x123191(0xde)](_0x299da1['body'][_0x123191(0x137)])['forEach'](_0x5a5b43=>{const _0x241356=_0x123191;this[_0x241356(0x11b)][_0x241356(0x10a)](_0x5a5b43);}),_0x58e566;}[_0x2f1a88(0x108)](_0x2726e7){const _0x3a8a90=_0x2f1a88;return{'id':_0x2726e7['id'],'threadId':_0x2726e7[_0x3a8a90(0xd8)],'ref':_0x2726e7['ref']};}};S=Q([b(0x0,_0xde01ec(_0x20faf4)),b(0x1,_0xde01ec(_0xead225)),b(0x2,_0xde01ec(_0x41dd94))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x6e991b,_0x7c54ca,_0x286569,_0x14e5b8)=>{for(var _0x572fb0=_0x14e5b8>0x1?void 0x0:_0x14e5b8?re(_0x7c54ca,_0x286569):_0x7c54ca,_0x10f0d0=_0x6e991b['length']-0x1,_0x371419;_0x10f0d0>=0x0;_0x10f0d0--)(_0x371419=_0x6e991b[_0x10f0d0])&&(_0x572fb0=_0x371419(_0x572fb0)||_0x572fb0);return _0x572fb0;},M=(_0x5300e7,_0xc85266)=>(_0x56c9f2,_0x221d57)=>_0xc85266(_0x56c9f2,_0x221d57,_0x5300e7);let f=class extends _0x324ec9{constructor(_0x439f53,_0x1c5a5e){const _0x3886e0=_0x2f1a88;super(),this[_0x3886e0(0xdf)]=_0x439f53,this[_0x3886e0(0x13e)]=_0x1c5a5e,this['_initDataSource']();}[_0x2f1a88(0x122)](){const _0xb95b6e=_0x2f1a88;this['_threadCommentDataSourceService']['dataSource']=this[_0xb95b6e(0x13e)],this[_0xb95b6e(0xdf)][_0xb95b6e(0xf5)]=!0x1;}};f=te([M(0x0,_0xb4d94),M(0x1,_0xde01ec(S))],f);var se=Object[_0x2f1a88(0xf0)],oe=Object[_0x2f1a88(0x121)],ne=(_0x5a13b4,_0x136103,_0x2395c6)=>_0x136103 in _0x5a13b4?se(_0x5a13b4,_0x136103,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2395c6}):_0x5a13b4[_0x136103]=_0x2395c6,ie=(_0x695702,_0x68d41b,_0x288351,_0x359c76)=>{const _0x32664c=_0x2f1a88;for(var _0x24182a=_0x359c76>0x1?void 0x0:_0x359c76?oe(_0x68d41b,_0x288351):_0x68d41b,_0x35fb10=_0x695702[_0x32664c(0xf6)]-0x1,_0x380a14;_0x35fb10>=0x0;_0x35fb10--)(_0x380a14=_0x695702[_0x35fb10])&&(_0x24182a=_0x380a14(_0x24182a)||_0x24182a);return _0x24182a;},N=(_0x5c9009,_0x69265)=>(_0x32e668,_0x1c5d3f)=>_0x69265(_0x32e668,_0x1c5d3f,_0x5c9009),$=(_0x32b7e5,_0xa92254,_0x1caefa)=>ne(_0x32b7e5,typeof _0xa92254!='symbol'?_0xa92254+'':_0xa92254,_0x1caefa);let g=class extends _0x51869c{constructor(_0x3eb225=O,_0x6c9bac,_0x20bf46){const _0x35743f=_0x2f1a88;super(),this[_0x35743f(0x10e)]=_0x3eb225,this['_injector']=_0x6c9bac,this['_configService']=_0x20bf46;const {..._0x302091}=_0x15954c({},O,this[_0x35743f(0x10e)]);this[_0x35743f(0x123)][_0x35743f(0xf9)](z,_0x302091);}[_0x2f1a88(0xff)](){[[S],[f],[_]]['forEach'](_0x4644a2=>{const _0x2b8508=_0x2182;this[_0x2b8508(0xe8)][_0x2b8508(0xe4)](_0x4644a2);});}[_0x2f1a88(0xe6)](){const _0x181bba=_0x2f1a88;this[_0x181bba(0xe8)][_0x181bba(0x13c)](f),this[_0x181bba(0xe8)]['get'](_);}};$(g,_0x2f1a88(0x120),W),$(g,_0x2f1a88(0x10c),_0x25d2ac[_0x2f1a88(0x105)]),g=ie([_0x28793a(_0xcae651,_0x424de7,_0x38080a),N(0x1,_0xde01ec(_0x337246)),N(0x2,_0x21f661)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4180b1=_0x1b28;(function(_0x45c067,_0x51230a){const _0x42e990=_0x1b28,_0x246baa=_0x45c067();while(!![]){try{const _0x375104=-parseInt(_0x42e990(0x1c3))/0x1+parseInt(_0x42e990(0x1c2))/0x2+parseInt(_0x42e990(0x191))/0x3+parseInt(_0x42e990(0x1cb))/0x4+-parseInt(_0x42e990(0x1f6))/0x5*(-parseInt(_0x42e990(0x1d1))/0x6)+parseInt(_0x42e990(0x1a4))/0x7*(-parseInt(_0x42e990(0x19c))/0x8)+-parseInt(_0x42e990(0x1eb))/0x9;if(_0x375104===_0x51230a)break;else _0x246baa['push'](_0x246baa['shift']());}catch(_0x3f3f14){_0x246baa['push'](_0x246baa['shift']());}}}(_0x1166,0xa6f05));import{CommentService as _0x1bb26a,CollaborationSessionService as _0x4700fa,UniverCollaborationClientPlugin as _0x2add79}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3a6dc9}from'@univerjs-pro/license';import{dayjs as _0x30e5fe,UserManagerService as _0x51e746,Inject as _0x54c27f,Injector as _0x1bb80b,Disposable as _0x287a8e,CustomRangeType as _0x2aa294,UniverInstanceType as _0x140979,DependentOn as _0x5d589e,IConfigService as _0x4d8774,Plugin as _0x558095,merge as _0x599c45}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x31f759}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5bccec,IThreadCommentDataSourceService as _0x241c92}from'@univerjs/thread-comment';function _0x1b28(_0x586063,_0x361029){_0x586063=_0x586063-0x18e;const _0x11660c=_0x1166();let _0x1b28d9=_0x11660c[_0x586063];return _0x1b28d9;}function _0x1166(){const _0x18a0fa=['_httpService','Reply','find','threadId','commentUpdate$','syncUpdateMutationToColla','disposeWithMe','_init','getMemberID','OpenOrReOpen','8FmOohS','values','UNIVER_UNKNOWN','Solve','solved','content','replies','slice','4365298JBqJVa','dataSource','error','ref','_userService','requireSession','post','customRanges','comments','Delete','getCurrentUser','length','_injector','stringify','code','updateComment','symbol','_config','deleteComment','pipe','rangeType','/universer-api/user/list','listComments','thread-comment-data-source.config','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','add','YYYY/MM/DD\x20HH:mm','userId','_threadCommentDataSourceService','605010drKAoN','239647NxdiYz','/list','_initDataSource','root','format','subscribe','/edit','personId','2724836LsGDtp','resolved','addComment','getUnit','map','_sessionService','7818AfBCEz','_commentService','Solved','_threadCommentModel','get','saveCommentToSnapshot','type','defineProperty','setConfig','getUser','unitId','COMMENT','Edit','onStarting','replyId','resolveComment','forEach','size','rangeId','/universer-api/comment/unit/','addUser','_threadCommentDataSource','/add','parentId','_initUserSync','getOwnPropertyDescriptor','6674544Ladixe','body','users','Unknown','pluginName','createTimestamp','_configService','parse','userID','UNRECOGNIZED','Add','3145LAjTUw','/solved','user','delete','filter','getComment','1456071pFSVhQ'];_0x1166=function(){return _0x18a0fa;};return _0x1166();}import{bufferTime as _0x545da4}from'rxjs';import{HTTPService as _0x163b66}from'@univerjs/network';const W=_0x4180b1(0x1bd);var I=(_0x2b5efb=>(_0x2b5efb[_0x2b5efb[_0x4180b1(0x19b)]=0x0]=_0x4180b1(0x19b),_0x2b5efb[_0x2b5efb[_0x4180b1(0x1d3)]=0x1]=_0x4180b1(0x1d3),_0x2b5efb[_0x2b5efb['UNRECOGNIZED']=-0x1]=_0x4180b1(0x1f4),_0x2b5efb))(I||{}),v=(_0x382e20=>(_0x382e20[_0x382e20[_0x4180b1(0x1ee)]=0x0]=_0x4180b1(0x1ee),_0x382e20[_0x382e20[_0x4180b1(0x1f5)]=0x1]=_0x4180b1(0x1f5),_0x382e20[_0x382e20[_0x4180b1(0x193)]=0x2]='Reply',_0x382e20[_0x382e20['Edit']=0x3]=_0x4180b1(0x1dd),_0x382e20[_0x382e20['Delete']=0x4]=_0x4180b1(0x1ad),_0x382e20[_0x382e20['Solve']=0x5]=_0x4180b1(0x19f),_0x382e20[_0x382e20[_0x4180b1(0x1f4)]=-0x1]=_0x4180b1(0x1f4),_0x382e20))(v||{});const y=_0x22a6f2=>_0x30e5fe(new Date(+_0x22a6f2))[_0x4180b1(0x1c7)](_0x4180b1(0x1bf)),B=async(_0x400022,_0x1d45c1)=>{const _0x1fbe53=_0x4180b1,_0x65dc99=_0x400022[_0x1fbe53(0x1d5)](_0x51e746),_0x28e80f=_0x400022[_0x1fbe53(0x1d5)](_0x163b66);_0x1d45c1[_0x1fbe53(0x1e1)](_0x419660=>{const _0xe41fd7=_0x1fbe53;_0x65dc99[_0xe41fd7(0x1da)](_0x419660)&&_0x1d45c1[_0xe41fd7(0x18e)](_0x419660);}),_0x1d45c1[_0x1fbe53(0x1e2)]&&(await _0x28e80f[_0x1fbe53(0x1d5)](_0x1fbe53(0x1b9),{'params':{'userIDs':[..._0x1d45c1]}}))[_0x1fbe53(0x1ec)][_0x1fbe53(0x1ed)]['forEach'](_0x10324e=>{_0x10324e&&_0x65dc99['addUser'](_0x10324e);});};var K=Object[_0x4180b1(0x1ea)],V=(_0x1ae3bc,_0x42c782,_0x21411a,_0x4ddfc5)=>{for(var _0x541b68=_0x4ddfc5>0x1?void 0x0:_0x4ddfc5?K(_0x42c782,_0x21411a):_0x42c782,_0x2f367e=_0x1ae3bc['length']-0x1,_0x3eb078;_0x2f367e>=0x0;_0x2f367e--)(_0x3eb078=_0x1ae3bc[_0x2f367e])&&(_0x541b68=_0x3eb078(_0x541b68)||_0x541b68);return _0x541b68;},p=(_0x1abbf9,_0xdb968d)=>(_0x1021e2,_0x840ee9)=>_0xdb968d(_0x1021e2,_0x840ee9,_0x1abbf9);let _=class extends _0x287a8e{constructor(_0x344e1b,_0x324a00,_0x2b4e2a,_0x1200e6){const _0x1eb32f=_0x4180b1;super(),this['_commentService']=_0x344e1b,this['_threadCommentModel']=_0x324a00,this[_0x1eb32f(0x1a8)]=_0x2b4e2a,this[_0x1eb32f(0x1b0)]=_0x1200e6,this[_0x1eb32f(0x199)](),this[_0x1eb32f(0x1e9)]();}[_0x4180b1(0x1e9)](){const _0x7d27d8=_0x4180b1;this['disposeWithMe'](this[_0x7d27d8(0x1d4)][_0x7d27d8(0x196)][_0x7d27d8(0x1b7)](_0x545da4(0x10))[_0x7d27d8(0x1c8)](_0x27832f=>{const _0xf5d0ab=_0x7d27d8,_0x5127f3=new Set();_0x27832f[_0xf5d0ab(0x1e1)](_0xfe75a2=>{const _0x346f30=_0xf5d0ab;if(_0xfe75a2['type']===_0x346f30(0x1be)){const _0x4b2e81=_0xfe75a2[_0x346f30(0x1bc)][_0x346f30(0x1ca)];_0x5127f3['add'](_0x4b2e81);}}),B(this[_0xf5d0ab(0x1b0)],_0x5127f3);}));}[_0x4180b1(0x199)](){const _0x2eecb9=_0x4180b1;this[_0x2eecb9(0x198)](this[_0x2eecb9(0x1d2)]['commentUpdate$'][_0x2eecb9(0x1c8)](async _0x3973d9=>{const _0x2f9ade=_0x2eecb9;var _0x30c52e,_0x47bfd2,_0x59621a,_0x2c5c24;const _0x2cf086=(_0x30c52e=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x14fd6c=>_0x14fd6c[_0x2f9ade(0x195)]===_0x3973d9[_0x2f9ade(0x195)]))==null?void 0x0:_0x30c52e[_0x2f9ade(0x1c6)];if(!_0x2cf086)return;const {unitId:_0x1399a6,subUnitId:_0x26c242}=_0x2cf086;switch(_0x3973d9[_0x2f9ade(0x1f8)]&&this[_0x2f9ade(0x1a8)][_0x2f9ade(0x1e5)](_0x3973d9[_0x2f9ade(0x1f8)]),_0x3973d9[_0x2f9ade(0x1d7)]){case v[_0x2f9ade(0x1f5)]:break;case v[_0x2f9ade(0x193)]:{this[_0x2f9ade(0x1d4)]['addComment'](_0x1399a6,_0x26c242,{'unitId':_0x1399a6,'subUnitId':_0x26c242,'ref':'','id':_0x3973d9[_0x2f9ade(0x1df)],'dT':y(+_0x3973d9[_0x2f9ade(0x1f0)]),'threadId':_0x3973d9[_0x2f9ade(0x195)],'personId':(_0x59621a=(_0x47bfd2=_0x3973d9['user'])==null?void 0x0:_0x47bfd2['userID'])!=null?_0x59621a:_0x3973d9['userId'],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content']),'parentId':_0x2cf086['id']});break;}case v['Delete']:{const _0x1888c4=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x190)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);_0x1888c4&&_0x1888c4[_0x2f9ade(0x1e8)]&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1b6)](_0x1399a6,_0x26c242,_0x3973d9[_0x2f9ade(0x1df)]);break;}case v[_0x2f9ade(0x1dd)]:{this['_threadCommentModel'][_0x2f9ade(0x1b3)](_0x1399a6,_0x26c242,{'commentId':_0x3973d9[_0x2f9ade(0x1df)],'text':JSON[_0x2f9ade(0x1f2)](_0x3973d9['content'])});break;}case v[_0x2f9ade(0x19f)]:{const _0x566ab5=(_0x2c5c24=this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1ce)](_0x3973d9[_0x2f9ade(0x1db)])[_0x2f9ade(0x194)](_0x1adc4f=>_0x1adc4f[_0x2f9ade(0x195)]===_0x3973d9['threadId']))==null?void 0x0:_0x2c5c24[_0x2f9ade(0x1c6)];_0x566ab5&&this[_0x2f9ade(0x1d4)][_0x2f9ade(0x1e0)](_0x1399a6,_0x26c242,_0x566ab5['id'],_0x3973d9['solved']===I['Solved']);break;}}}));}};_=V([p(0x0,_0x54c27f(_0x1bb26a)),p(0x1,_0x54c27f(_0x5bccec)),p(0x2,_0x54c27f(_0x51e746)),p(0x3,_0x54c27f(_0x1bb80b))],_);const z=_0x4180b1(0x1bb),O={};var k=Object[_0x4180b1(0x1ea)],Q=(_0x401308,_0x2d430f,_0x548ef8,_0x48ae08)=>{const _0x51f55b=_0x4180b1;for(var _0x31d046=_0x48ae08>0x1?void 0x0:_0x48ae08?k(_0x2d430f,_0x548ef8):_0x2d430f,_0x521725=_0x401308[_0x51f55b(0x1af)]-0x1,_0x31273f;_0x521725>=0x0;_0x521725--)(_0x31273f=_0x401308[_0x521725])&&(_0x31d046=_0x31273f(_0x31d046)||_0x31d046);return _0x31d046;},b=(_0x2cbfd9,_0x440532)=>(_0x520e32,_0x259c16)=>_0x440532(_0x520e32,_0x259c16,_0x2cbfd9);function X(_0x4ff5ea,_0x4298c4){const _0x5abf8f=_0x4180b1,_0x564bcb=_0x4ff5ea[_0x5abf8f(0x1a2)][0x0];return{..._0x4298c4,'id':_0x564bcb[_0x5abf8f(0x1df)],'resolved':_0x4ff5ea[_0x5abf8f(0x1a0)]===0x1,'dT':y(_0x564bcb[_0x5abf8f(0x1f0)]),'personId':_0x564bcb[_0x5abf8f(0x1c0)],'threadId':_0x564bcb[_0x5abf8f(0x195)]};}function ee(_0x54080d,_0x4584f6,_0x13340a){const _0x4bf80d=_0x4180b1;var _0x445c99,_0x5c21d4;if(((_0x5c21d4=(_0x445c99=_0x54080d==null?void 0x0:_0x54080d[_0x4bf80d(0x1a2)])==null?void 0x0:_0x445c99[_0x4bf80d(0x1af)])!=null?_0x5c21d4:0x0)>0x0){const _0x4dc295=(_0xd8eeb5,_0x16f077)=>({'id':_0xd8eeb5['replyId'],'threadId':_0xd8eeb5[_0x4bf80d(0x195)],'dT':y(_0xd8eeb5[_0x4bf80d(0x1f0)]),'personId':_0xd8eeb5['userId'],'resolved':_0x54080d[_0x4bf80d(0x1a0)]===I[_0x4bf80d(0x1d3)],'unitId':_0x4584f6,'subUnitId':_0x13340a,'text':JSON[_0x4bf80d(0x1f2)](_0xd8eeb5[_0x4bf80d(0x1a1)]),'parentId':_0x16f077}),_0x3c9a6f=_0x4dc295(_0x54080d[_0x4bf80d(0x1a2)][0x0]);return{..._0x3c9a6f,'children':_0x54080d[_0x4bf80d(0x1a2)][_0x4bf80d(0x1a3)](0x1)[_0x4bf80d(0x1cf)](_0x4c18e7=>_0x4dc295(_0x4c18e7,_0x3c9a6f['id']))};}return null;}let S=class{constructor(_0x24b567,_0x2c79c5,_0x5bb221){const _0x3c1c12=_0x4180b1;this['_httpService']=_0x24b567,this[_0x3c1c12(0x1a8)]=_0x2c79c5,this[_0x3c1c12(0x1d0)]=_0x5bb221;}async[_0x4180b1(0x1cd)](_0x7a351f){const _0x42097a=_0x4180b1;var _0x14f825,_0x59c911;const {parentId:_0x2de79b,unitId:_0x551632,text:_0x4aba44,threadId:_0x51dbfb}=_0x7a351f,_0x431461=(_0x59c911=(_0x14f825=_0x4aba44[_0x42097a(0x1ab)])==null?void 0x0:_0x14f825[_0x42097a(0x18f)](_0x1596a5=>_0x1596a5[_0x42097a(0x1b8)]===_0x2aa294[_0x42097a(0x1dc)])[_0x42097a(0x1cf)](_0x5765e4=>_0x5765e4['rangeId']))!=null?_0x59c911:[],_0x123ef9=JSON[_0x42097a(0x1b1)](_0x4aba44),_0x2af36d=(await this[_0x42097a(0x1d0)][_0x42097a(0x1a9)](_0x551632))['getMemberID']();if(_0x2de79b){const _0x566cac={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461,'threadId':_0x51dbfb},_0x4710cf=(await this['_httpService'][_0x42097a(0x1aa)]('/universer-api/comment/unit/'+_0x551632+'/reply',{'body':_0x566cac}))[_0x42097a(0x1ec)]['reply'];return{..._0x7a351f,'id':_0x4710cf[_0x42097a(0x1df)],'dT':_0x30e5fe(+_0x4710cf['createTimestamp'])['format'](_0x42097a(0x1bf)),'personId':_0x4710cf[_0x42097a(0x1c0)]};}else{const _0x128dd9={'memberId':_0x2af36d,'unitId':_0x551632,'content':_0x123ef9,'mention':_0x431461},_0x55b263=await this[_0x42097a(0x192)]['post'](_0x42097a(0x1e4)+_0x551632+_0x42097a(0x1e7),{'body':_0x128dd9});return X(_0x55b263['body']['comment'],_0x7a351f);}}async[_0x4180b1(0x1b3)](_0x51b87d){const _0x189af2=_0x4180b1;var _0x20e6de,_0x226c8c;const {text:_0x3eac6b,unitId:_0x4ae742}=_0x51b87d,_0x5a7919=(_0x226c8c=(_0x20e6de=_0x3eac6b[_0x189af2(0x1ab)])==null?void 0x0:_0x20e6de[_0x189af2(0x18f)](_0x47f52d=>_0x47f52d['rangeType']===_0x2aa294[_0x189af2(0x1dc)])[_0x189af2(0x1cf)](_0x4a2ae5=>_0x4a2ae5[_0x189af2(0x1e3)]))!=null?_0x226c8c:[],_0xc200c6=JSON[_0x189af2(0x1b1)](_0x3eac6b),_0x2cfed9=_0x51b87d['threadId'],_0x4e46d6=_0x51b87d['id'],_0x65513a={'memberId':(await this[_0x189af2(0x1d0)][_0x189af2(0x1a9)](_0x4ae742))[_0x189af2(0x19a)](),'unitId':_0x4ae742,'threadId':_0x2cfed9,'mention':_0x5a7919,'content':_0xc200c6,'replyId':_0x4e46d6},_0x51d894=await this[_0x189af2(0x192)][_0x189af2(0x1aa)](_0x189af2(0x1e4)+_0x4ae742+_0x189af2(0x1c9),{'body':_0x65513a});return!_0x51d894[_0x189af2(0x1ec)]['error']||_0x51d894['body'][_0x189af2(0x1a6)][_0x189af2(0x1b2)]===0x1;}async[_0x4180b1(0x1e0)](_0x16d46d){const _0x5e02dd=_0x4180b1,{unitId:_0x3a8616}=_0x16d46d,_0x5be6dc=_0x16d46d[_0x5e02dd(0x195)],_0x5c6cad={'memberId':this['_userService'][_0x5e02dd(0x1ae)]()[_0x5e02dd(0x1f3)],'unitId':_0x3a8616,'threadId':_0x5be6dc,'solved':_0x16d46d[_0x5e02dd(0x1cc)]?I[_0x5e02dd(0x1d3)]:I[_0x5e02dd(0x19b)]},_0x35efe3=await this[_0x5e02dd(0x192)][_0x5e02dd(0x1aa)](_0x5e02dd(0x1e4)+_0x3a8616+_0x5e02dd(0x1f7),{'body':_0x5c6cad});return!_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)]||_0x35efe3[_0x5e02dd(0x1ec)][_0x5e02dd(0x1a6)][_0x5e02dd(0x1b2)]===0x1;}async[_0x4180b1(0x1b6)](_0x292e3b,_0x4fb793,_0x6fbc1,_0x121f2f){const _0x275376=_0x4180b1,_0x38970c={'memberId':(await this[_0x275376(0x1d0)]['requireSession'](_0x292e3b))[_0x275376(0x19a)](),'threadId':_0x6fbc1,'replyId':_0x121f2f,'unitId':_0x292e3b},_0x1de803=await this[_0x275376(0x192)][_0x275376(0x1aa)]('/universer-api/comment/unit/'+_0x292e3b+'/delete',{'body':_0x38970c});return!_0x1de803['body'][_0x275376(0x1a6)]||_0x1de803[_0x275376(0x1ec)][_0x275376(0x1a6)][_0x275376(0x1b2)]===0x1;}async[_0x4180b1(0x1ba)](_0x55381e,_0x1e90ed,_0xa7511){const _0x5d3fe3=_0x4180b1,_0x4cfdaa={'unitId':_0x55381e,'threadId':_0xa7511},_0x464474=await this[_0x5d3fe3(0x192)]['post']('/universer-api/comment/unit/'+_0x55381e+_0x5d3fe3(0x1c4),{'body':_0x4cfdaa}),_0x3d4464=_0xa7511[_0x5d3fe3(0x1cf)](_0x432373=>ee(_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ac)][_0x432373],_0x55381e,_0x1e90ed))['filter'](Boolean);return Object[_0x5d3fe3(0x19d)](_0x464474[_0x5d3fe3(0x1ec)][_0x5d3fe3(0x1ed)])[_0x5d3fe3(0x1e1)](_0xed875e=>{const _0xd9a734=_0x5d3fe3;this[_0xd9a734(0x1a8)][_0xd9a734(0x1e5)](_0xed875e);}),_0x3d4464;}[_0x4180b1(0x1d6)](_0xdc9b74){const _0x35ae6d=_0x4180b1;return{'id':_0xdc9b74['id'],'threadId':_0xdc9b74[_0x35ae6d(0x195)],'ref':_0xdc9b74[_0x35ae6d(0x1a7)]};}};S=Q([b(0x0,_0x54c27f(_0x163b66)),b(0x1,_0x54c27f(_0x51e746)),b(0x2,_0x54c27f(_0x4700fa))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x54ae4e,_0x34324a,_0x1bbce1,_0x2a5703)=>{for(var _0x2091cd=_0x2a5703>0x1?void 0x0:_0x2a5703?re(_0x34324a,_0x1bbce1):_0x34324a,_0x3ecbf2=_0x54ae4e['length']-0x1,_0x41d4e4;_0x3ecbf2>=0x0;_0x3ecbf2--)(_0x41d4e4=_0x54ae4e[_0x3ecbf2])&&(_0x2091cd=_0x41d4e4(_0x2091cd)||_0x2091cd);return _0x2091cd;},M=(_0x39762c,_0x3e5f19)=>(_0x335f35,_0x463934)=>_0x3e5f19(_0x335f35,_0x463934,_0x39762c);let f=class extends _0x287a8e{constructor(_0x59778c,_0xf8c71a){const _0x5e9f60=_0x4180b1;super(),this['_threadCommentDataSourceService']=_0x59778c,this['_threadCommentDataSource']=_0xf8c71a,this[_0x5e9f60(0x1c5)]();}[_0x4180b1(0x1c5)](){const _0x195265=_0x4180b1;this[_0x195265(0x1c1)][_0x195265(0x1a5)]=this[_0x195265(0x1e6)],this[_0x195265(0x1c1)][_0x195265(0x197)]=!0x1;}};f=te([M(0x0,_0x241c92),M(0x1,_0x54c27f(S))],f);var se=Object[_0x4180b1(0x1d8)],oe=Object[_0x4180b1(0x1ea)],ne=(_0x571635,_0x1c79d1,_0x3b87f3)=>_0x1c79d1 in _0x571635?se(_0x571635,_0x1c79d1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3b87f3}):_0x571635[_0x1c79d1]=_0x3b87f3,ie=(_0xac8d0f,_0x20edc6,_0x2850e2,_0x5efb4e)=>{const _0x52f1fe=_0x4180b1;for(var _0x1f6064=_0x5efb4e>0x1?void 0x0:_0x5efb4e?oe(_0x20edc6,_0x2850e2):_0x20edc6,_0x2ae1f4=_0xac8d0f[_0x52f1fe(0x1af)]-0x1,_0x4597e2;_0x2ae1f4>=0x0;_0x2ae1f4--)(_0x4597e2=_0xac8d0f[_0x2ae1f4])&&(_0x1f6064=_0x4597e2(_0x1f6064)||_0x1f6064);return _0x1f6064;},N=(_0x53f721,_0x492d4e)=>(_0x3bb541,_0x4de18c)=>_0x492d4e(_0x3bb541,_0x4de18c,_0x53f721),$=(_0x1553f1,_0x5dafc0,_0x3f2344)=>ne(_0x1553f1,typeof _0x5dafc0!=_0x4180b1(0x1b4)?_0x5dafc0+'':_0x5dafc0,_0x3f2344);let g=class extends _0x558095{constructor(_0x4a397c=O,_0x3eae51,_0x15ae92){const _0x320c52=_0x4180b1;super(),this[_0x320c52(0x1b5)]=_0x4a397c,this['_injector']=_0x3eae51,this[_0x320c52(0x1f1)]=_0x15ae92;const {..._0x3b9956}=_0x599c45({},O,this[_0x320c52(0x1b5)]);this[_0x320c52(0x1f1)][_0x320c52(0x1d9)](z,_0x3b9956);}[_0x4180b1(0x1de)](){[[S],[f],[_]]['forEach'](_0x10f72e=>{const _0x666667=_0x1b28;this[_0x666667(0x1b0)][_0x666667(0x1be)](_0x10f72e);});}['onReady'](){const _0x4996bd=_0x4180b1;this['_injector'][_0x4996bd(0x1d5)](f),this[_0x4996bd(0x1b0)]['get'](_);}};$(g,_0x4180b1(0x1ef),W),$(g,_0x4180b1(0x1d7),_0x140979[_0x4180b1(0x19e)]),g=ie([_0x5d589e(_0x31f759,_0x2add79,_0x3a6dc9),N(0x1,_0x54c27f(_0x1bb80b)),N(0x2,_0x4d8774)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2182(_0x5da843,_0x40ea69){_0x5da843=_0x5da843-0xd8;const _0x6cf6a7=_0x6cf6();let _0x2182e4=_0x6cf6a7[_0x5da843];return _0x2182e4;}const _0x2f1a88=_0x2182;(function(_0x17c204,_0x4589fd){const _0x3dd332=_0x2182,_0x3425cb=_0x17c204();while(!![]){try{const _0x430978=parseInt(_0x3dd332(0xee))/0x1*(-parseInt(_0x3dd332(0x109))/0x2)+-parseInt(_0x3dd332(0xfb))/0x3*(-parseInt(_0x3dd332(0x113))/0x4)+parseInt(_0x3dd332(0x136))/0x5*(parseInt(_0x3dd332(0x135))/0x6)+parseInt(_0x3dd332(0x138))/0x7*(parseInt(_0x3dd332(0x134))/0x8)+parseInt(_0x3dd332(0xdb))/0x9*(-parseInt(_0x3dd332(0x100))/0xa)+-parseInt(_0x3dd332(0x110))/0xb+parseInt(_0x3dd332(0x128))/0xc;if(_0x430978===_0x4589fd)break;else _0x3425cb['push'](_0x3425cb['shift']());}catch(_0x3dfcaf){_0x3425cb['push'](_0x3425cb['shift']());}}}(_0x6cf6,0x6d4f8));import{CommentService as _0x4824e3,CollaborationSessionService as _0x41dd94,UniverCollaborationClientPlugin as _0x424de7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x38080a}from'@univerjs-pro/license';import{dayjs as _0x151d20,UserManagerService as _0xead225,Inject as _0xde01ec,Injector as _0x337246,Disposable as _0x324ec9,CustomRangeType as _0x3b8245,UniverInstanceType as _0x25d2ac,DependentOn as _0x28793a,IConfigService as _0x21f661,Plugin as _0x51869c,merge as _0x15954c}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xcae651}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x6dff5f,IThreadCommentDataSourceService as _0xb4d94}from'@univerjs/thread-comment';import{bufferTime as _0x208a30}from'rxjs';import{HTTPService as _0x20faf4}from'@univerjs/network';const W=_0x2f1a88(0xe0);function _0x6cf6(){const _0x2de172=['UNRECOGNIZED','_httpService','user','forEach','subscribe','filter','replies','delete','/solved','rangeId','368XLgomY','3852zlyZIs','4265xjUFSE','users','61187tbrvFG','/add','size','comments','get','createTimestamp','_threadCommentDataSource','getComment','Reply','userID','threadId','Solve','post','225TJdphT','getUnit','unitId','values','_threadCommentDataSourceService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','disposeWithMe','_threadCommentModel','add','OpenOrReOpen','onReady','Add','_injector','customRanges','/edit','code','root','parentId','29kgSLdL','Delete','defineProperty','body','_init','error','thread-comment-data-source.config','syncUpdateMutationToColla','length','deleteComment','parse','setConfig','/reply','256617zuVgYM','reply','resolveComment','payload','onStarting','201020uXdnVE','COMMENT','format','Solved','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','addComment','listComments','saveCommentToSnapshot','43370RCcDDP','addUser','/universer-api/comment/unit/','type','content','_config','updateComment','6563304QeGRkB','replyId','_initUserSync','12ZCzSeP','comment','_commentService','slice','requireSession','map','_sessionService','resolved','_userService','/universer-api/user/list','userId','solved','stringify','pluginName','getOwnPropertyDescriptor','_initDataSource','_configService','commentUpdate$','find','rangeType','/delete','11633832IJiMxl','getMemberID'];_0x6cf6=function(){return _0x2de172;};return _0x6cf6();}var I=(_0x1a9792=>(_0x1a9792[_0x1a9792[_0x2f1a88(0xe5)]=0x0]=_0x2f1a88(0xe5),_0x1a9792[_0x1a9792['Solved']=0x1]=_0x2f1a88(0x103),_0x1a9792[_0x1a9792[_0x2f1a88(0x12a)]=-0x1]=_0x2f1a88(0x12a),_0x1a9792))(I||{}),v=(_0x5d229a=>(_0x5d229a[_0x5d229a['Unknown']=0x0]='Unknown',_0x5d229a[_0x5d229a['Add']=0x1]=_0x2f1a88(0xe7),_0x5d229a[_0x5d229a[_0x2f1a88(0x140)]=0x2]='Reply',_0x5d229a[_0x5d229a[_0x2f1a88(0xe1)]=0x3]='Edit',_0x5d229a[_0x5d229a[_0x2f1a88(0xef)]=0x4]=_0x2f1a88(0xef),_0x5d229a[_0x5d229a[_0x2f1a88(0xd9)]=0x5]='Solve',_0x5d229a[_0x5d229a[_0x2f1a88(0x12a)]=-0x1]='UNRECOGNIZED',_0x5d229a))(v||{});const y=_0x2bb0cb=>_0x151d20(new Date(+_0x2bb0cb))[_0x2f1a88(0x102)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x3a1856,_0x2a4797)=>{const _0x2a3f79=_0x2f1a88,_0x19e52b=_0x3a1856[_0x2a3f79(0x13c)](_0xead225),_0x128efe=_0x3a1856['get'](_0x20faf4);_0x2a4797[_0x2a3f79(0x12d)](_0x2bf24f=>{const _0x216792=_0x2a3f79;_0x19e52b['getUser'](_0x2bf24f)&&_0x2a4797[_0x216792(0x131)](_0x2bf24f);}),_0x2a4797[_0x2a3f79(0x13a)]&&(await _0x128efe[_0x2a3f79(0x13c)](_0x2a3f79(0x11c),{'params':{'userIDs':[..._0x2a4797]}}))[_0x2a3f79(0xf1)][_0x2a3f79(0x137)][_0x2a3f79(0x12d)](_0x5b06b2=>{_0x5b06b2&&_0x19e52b['addUser'](_0x5b06b2);});};var K=Object[_0x2f1a88(0x121)],V=(_0x2a5aa5,_0x5ecc29,_0x161f1e,_0x1402ea)=>{const _0x2227d3=_0x2f1a88;for(var _0x492226=_0x1402ea>0x1?void 0x0:_0x1402ea?K(_0x5ecc29,_0x161f1e):_0x5ecc29,_0x5f2ecc=_0x2a5aa5[_0x2227d3(0xf6)]-0x1,_0x559f7e;_0x5f2ecc>=0x0;_0x5f2ecc--)(_0x559f7e=_0x2a5aa5[_0x5f2ecc])&&(_0x492226=_0x559f7e(_0x492226)||_0x492226);return _0x492226;},p=(_0x4d5b3b,_0x89758f)=>(_0x13710f,_0x178950)=>_0x89758f(_0x13710f,_0x178950,_0x4d5b3b);let _=class extends _0x324ec9{constructor(_0x542791,_0x45f29f,_0x4e5dbb,_0x2eef95){const _0x5f384a=_0x2f1a88;super(),this[_0x5f384a(0x115)]=_0x542791,this[_0x5f384a(0xe3)]=_0x45f29f,this[_0x5f384a(0x11b)]=_0x4e5dbb,this[_0x5f384a(0xe8)]=_0x2eef95,this['_init'](),this[_0x5f384a(0x112)]();}[_0x2f1a88(0x112)](){const _0x4be93e=_0x2f1a88;this[_0x4be93e(0xe2)](this[_0x4be93e(0xe3)][_0x4be93e(0x124)]['pipe'](_0x208a30(0x10))[_0x4be93e(0x12e)](_0x5e630b=>{const _0x513df3=new Set();_0x5e630b['forEach'](_0x4b0557=>{const _0x50ba7b=_0x2182;if(_0x4b0557[_0x50ba7b(0x10c)]===_0x50ba7b(0xe4)){const _0xbb385=_0x4b0557[_0x50ba7b(0xfe)]['personId'];_0x513df3['add'](_0xbb385);}}),B(this['_injector'],_0x513df3);}));}[_0x2f1a88(0xf2)](){const _0x2183db=_0x2f1a88;this[_0x2183db(0xe2)](this['_commentService'][_0x2183db(0x124)][_0x2183db(0x12e)](async _0x3c4f5a=>{const _0x14ed1b=_0x2183db;var _0xcd595d,_0x26bb9e,_0x13fb12,_0x1eee73;const _0x41c199=(_0xcd595d=this[_0x14ed1b(0xe3)][_0x14ed1b(0xdc)](_0x3c4f5a[_0x14ed1b(0xdd)])[_0x14ed1b(0x125)](_0x528d27=>_0x528d27[_0x14ed1b(0xd8)]===_0x3c4f5a[_0x14ed1b(0xd8)]))==null?void 0x0:_0xcd595d['root'];if(!_0x41c199)return;const {unitId:_0x1d712f,subUnitId:_0x3a9a92}=_0x41c199;switch(_0x3c4f5a[_0x14ed1b(0x12c)]&&this['_userService'][_0x14ed1b(0x10a)](_0x3c4f5a['user']),_0x3c4f5a[_0x14ed1b(0x10c)]){case v['Add']:break;case v['Reply']:{this[_0x14ed1b(0xe3)][_0x14ed1b(0x106)](_0x1d712f,_0x3a9a92,{'unitId':_0x1d712f,'subUnitId':_0x3a9a92,'ref':'','id':_0x3c4f5a[_0x14ed1b(0x111)],'dT':y(+_0x3c4f5a['createTimestamp']),'threadId':_0x3c4f5a[_0x14ed1b(0xd8)],'personId':(_0x13fb12=(_0x26bb9e=_0x3c4f5a['user'])==null?void 0x0:_0x26bb9e['userID'])!=null?_0x13fb12:_0x3c4f5a[_0x14ed1b(0x11d)],'text':JSON[_0x14ed1b(0xf8)](_0x3c4f5a[_0x14ed1b(0x10d)]),'parentId':_0x41c199['id']});break;}case v[_0x14ed1b(0xef)]:{const _0x4a6002=this[_0x14ed1b(0xe3)][_0x14ed1b(0x13f)](_0x1d712f,_0x3a9a92,_0x3c4f5a[_0x14ed1b(0x111)]);_0x4a6002&&_0x4a6002[_0x14ed1b(0xed)]&&this['_threadCommentModel'][_0x14ed1b(0xf7)](_0x1d712f,_0x3a9a92,_0x3c4f5a[_0x14ed1b(0x111)]);break;}case v[_0x14ed1b(0xe1)]:{this['_threadCommentModel'][_0x14ed1b(0x10f)](_0x1d712f,_0x3a9a92,{'commentId':_0x3c4f5a[_0x14ed1b(0x111)],'text':JSON[_0x14ed1b(0xf8)](_0x3c4f5a[_0x14ed1b(0x10d)])});break;}case v['Solve']:{const _0x119b95=(_0x1eee73=this[_0x14ed1b(0xe3)][_0x14ed1b(0xdc)](_0x3c4f5a[_0x14ed1b(0xdd)])[_0x14ed1b(0x125)](_0x50fb86=>_0x50fb86[_0x14ed1b(0xd8)]===_0x3c4f5a[_0x14ed1b(0xd8)]))==null?void 0x0:_0x1eee73[_0x14ed1b(0xec)];_0x119b95&&this[_0x14ed1b(0xe3)][_0x14ed1b(0xfd)](_0x1d712f,_0x3a9a92,_0x119b95['id'],_0x3c4f5a[_0x14ed1b(0x11e)]===I[_0x14ed1b(0x103)]);break;}}}));}};_=V([p(0x0,_0xde01ec(_0x4824e3)),p(0x1,_0xde01ec(_0x6dff5f)),p(0x2,_0xde01ec(_0xead225)),p(0x3,_0xde01ec(_0x337246))],_);const z=_0x2f1a88(0xf4),O={};var k=Object[_0x2f1a88(0x121)],Q=(_0x219f08,_0x551dc1,_0x424714,_0x33f78b)=>{const _0x3da0e1=_0x2f1a88;for(var _0x20fc8c=_0x33f78b>0x1?void 0x0:_0x33f78b?k(_0x551dc1,_0x424714):_0x551dc1,_0x4efd6=_0x219f08[_0x3da0e1(0xf6)]-0x1,_0x219b70;_0x4efd6>=0x0;_0x4efd6--)(_0x219b70=_0x219f08[_0x4efd6])&&(_0x20fc8c=_0x219b70(_0x20fc8c)||_0x20fc8c);return _0x20fc8c;},b=(_0xd220dc,_0x19035b)=>(_0x3bf4fc,_0x5f377d)=>_0x19035b(_0x3bf4fc,_0x5f377d,_0xd220dc);function X(_0x344129,_0x4aa577){const _0x49ef2d=_0x2f1a88,_0x1cb909=_0x344129['replies'][0x0];return{..._0x4aa577,'id':_0x1cb909[_0x49ef2d(0x111)],'resolved':_0x344129['solved']===0x1,'dT':y(_0x1cb909[_0x49ef2d(0x13d)]),'personId':_0x1cb909[_0x49ef2d(0x11d)],'threadId':_0x1cb909[_0x49ef2d(0xd8)]};}function ee(_0x175ded,_0x517526,_0x28ffb4){const _0x1c57a2=_0x2f1a88;var _0x170239,_0x3cd318;if(((_0x3cd318=(_0x170239=_0x175ded==null?void 0x0:_0x175ded['replies'])==null?void 0x0:_0x170239[_0x1c57a2(0xf6)])!=null?_0x3cd318:0x0)>0x0){const _0x571960=(_0x42fecd,_0x5c43b4)=>({'id':_0x42fecd[_0x1c57a2(0x111)],'threadId':_0x42fecd[_0x1c57a2(0xd8)],'dT':y(_0x42fecd['createTimestamp']),'personId':_0x42fecd[_0x1c57a2(0x11d)],'resolved':_0x175ded[_0x1c57a2(0x11e)]===I[_0x1c57a2(0x103)],'unitId':_0x517526,'subUnitId':_0x28ffb4,'text':JSON[_0x1c57a2(0xf8)](_0x42fecd['content']),'parentId':_0x5c43b4}),_0x3bc53a=_0x571960(_0x175ded[_0x1c57a2(0x130)][0x0]);return{..._0x3bc53a,'children':_0x175ded[_0x1c57a2(0x130)][_0x1c57a2(0x116)](0x1)[_0x1c57a2(0x118)](_0x2d56bb=>_0x571960(_0x2d56bb,_0x3bc53a['id']))};}return null;}let S=class{constructor(_0xa0fa62,_0x2f921c,_0x203122){this['_httpService']=_0xa0fa62,this['_userService']=_0x2f921c,this['_sessionService']=_0x203122;}async[_0x2f1a88(0x106)](_0x7407b9){const _0x20d734=_0x2f1a88;var _0x146719,_0x5d1069;const {parentId:_0x35a17c,unitId:_0x1651c2,text:_0x44116d,threadId:_0x208d90}=_0x7407b9,_0x29afc1=(_0x5d1069=(_0x146719=_0x44116d[_0x20d734(0xe9)])==null?void 0x0:_0x146719[_0x20d734(0x12f)](_0x5c97b4=>_0x5c97b4[_0x20d734(0x126)]===_0x3b8245[_0x20d734(0x101)])['map'](_0x771333=>_0x771333[_0x20d734(0x133)]))!=null?_0x5d1069:[],_0x296bf3=JSON[_0x20d734(0x11f)](_0x44116d),_0x1ef6d7=(await this['_sessionService'][_0x20d734(0x117)](_0x1651c2))[_0x20d734(0x129)]();if(_0x35a17c){const _0x197234={'memberId':_0x1ef6d7,'unitId':_0x1651c2,'content':_0x296bf3,'mention':_0x29afc1,'threadId':_0x208d90},_0x1d9e13=(await this['_httpService']['post'](_0x20d734(0x10b)+_0x1651c2+_0x20d734(0xfa),{'body':_0x197234}))[_0x20d734(0xf1)][_0x20d734(0xfc)];return{..._0x7407b9,'id':_0x1d9e13[_0x20d734(0x111)],'dT':_0x151d20(+_0x1d9e13[_0x20d734(0x13d)])[_0x20d734(0x102)](_0x20d734(0x104)),'personId':_0x1d9e13[_0x20d734(0x11d)]};}else{const _0x2cf6f9={'memberId':_0x1ef6d7,'unitId':_0x1651c2,'content':_0x296bf3,'mention':_0x29afc1},_0x5f1eae=await this['_httpService'][_0x20d734(0xda)]('/universer-api/comment/unit/'+_0x1651c2+_0x20d734(0x139),{'body':_0x2cf6f9});return X(_0x5f1eae[_0x20d734(0xf1)][_0x20d734(0x114)],_0x7407b9);}}async[_0x2f1a88(0x10f)](_0xff4e35){const _0x5e7039=_0x2f1a88;var _0x2e3252,_0x2649f4;const {text:_0x3e0a52,unitId:_0x1dec09}=_0xff4e35,_0x38524e=(_0x2649f4=(_0x2e3252=_0x3e0a52['customRanges'])==null?void 0x0:_0x2e3252[_0x5e7039(0x12f)](_0x302888=>_0x302888[_0x5e7039(0x126)]===_0x3b8245[_0x5e7039(0x101)])[_0x5e7039(0x118)](_0x12af07=>_0x12af07['rangeId']))!=null?_0x2649f4:[],_0x42b6bc=JSON[_0x5e7039(0x11f)](_0x3e0a52),_0x14bb7c=_0xff4e35['threadId'],_0x4e602e=_0xff4e35['id'],_0x115e2f={'memberId':(await this[_0x5e7039(0x119)]['requireSession'](_0x1dec09))['getMemberID'](),'unitId':_0x1dec09,'threadId':_0x14bb7c,'mention':_0x38524e,'content':_0x42b6bc,'replyId':_0x4e602e},_0xa145d9=await this['_httpService'][_0x5e7039(0xda)](_0x5e7039(0x10b)+_0x1dec09+_0x5e7039(0xea),{'body':_0x115e2f});return!_0xa145d9[_0x5e7039(0xf1)][_0x5e7039(0xf3)]||_0xa145d9[_0x5e7039(0xf1)]['error']['code']===0x1;}async[_0x2f1a88(0xfd)](_0x2318bb){const _0x3b917f=_0x2f1a88,{unitId:_0x2b8517}=_0x2318bb,_0x196399=_0x2318bb[_0x3b917f(0xd8)],_0x360aeb={'memberId':this[_0x3b917f(0x11b)]['getCurrentUser']()[_0x3b917f(0x141)],'unitId':_0x2b8517,'threadId':_0x196399,'solved':_0x2318bb[_0x3b917f(0x11a)]?I[_0x3b917f(0x103)]:I[_0x3b917f(0xe5)]},_0xb3120d=await this[_0x3b917f(0x12b)]['post'](_0x3b917f(0x10b)+_0x2b8517+_0x3b917f(0x132),{'body':_0x360aeb});return!_0xb3120d[_0x3b917f(0xf1)]['error']||_0xb3120d[_0x3b917f(0xf1)][_0x3b917f(0xf3)][_0x3b917f(0xeb)]===0x1;}async[_0x2f1a88(0xf7)](_0x23cdeb,_0x4a01e8,_0x518012,_0x4f2742){const _0x42a456=_0x2f1a88,_0x3cf2bb={'memberId':(await this['_sessionService'][_0x42a456(0x117)](_0x23cdeb))['getMemberID'](),'threadId':_0x518012,'replyId':_0x4f2742,'unitId':_0x23cdeb},_0x39322a=await this[_0x42a456(0x12b)][_0x42a456(0xda)]('/universer-api/comment/unit/'+_0x23cdeb+_0x42a456(0x127),{'body':_0x3cf2bb});return!_0x39322a['body'][_0x42a456(0xf3)]||_0x39322a[_0x42a456(0xf1)][_0x42a456(0xf3)][_0x42a456(0xeb)]===0x1;}async[_0x2f1a88(0x107)](_0x471fec,_0x2399bc,_0x489975){const _0x123191=_0x2f1a88,_0x1d9998={'unitId':_0x471fec,'threadId':_0x489975},_0x299da1=await this[_0x123191(0x12b)][_0x123191(0xda)](_0x123191(0x10b)+_0x471fec+'/list',{'body':_0x1d9998}),_0x58e566=_0x489975[_0x123191(0x118)](_0x46e4f3=>ee(_0x299da1[_0x123191(0xf1)][_0x123191(0x13b)][_0x46e4f3],_0x471fec,_0x2399bc))[_0x123191(0x12f)](Boolean);return Object[_0x123191(0xde)](_0x299da1['body'][_0x123191(0x137)])['forEach'](_0x5a5b43=>{const _0x241356=_0x123191;this[_0x241356(0x11b)][_0x241356(0x10a)](_0x5a5b43);}),_0x58e566;}[_0x2f1a88(0x108)](_0x2726e7){const _0x3a8a90=_0x2f1a88;return{'id':_0x2726e7['id'],'threadId':_0x2726e7[_0x3a8a90(0xd8)],'ref':_0x2726e7['ref']};}};S=Q([b(0x0,_0xde01ec(_0x20faf4)),b(0x1,_0xde01ec(_0xead225)),b(0x2,_0xde01ec(_0x41dd94))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x6e991b,_0x7c54ca,_0x286569,_0x14e5b8)=>{for(var _0x572fb0=_0x14e5b8>0x1?void 0x0:_0x14e5b8?re(_0x7c54ca,_0x286569):_0x7c54ca,_0x10f0d0=_0x6e991b['length']-0x1,_0x371419;_0x10f0d0>=0x0;_0x10f0d0--)(_0x371419=_0x6e991b[_0x10f0d0])&&(_0x572fb0=_0x371419(_0x572fb0)||_0x572fb0);return _0x572fb0;},M=(_0x5300e7,_0xc85266)=>(_0x56c9f2,_0x221d57)=>_0xc85266(_0x56c9f2,_0x221d57,_0x5300e7);let f=class extends _0x324ec9{constructor(_0x439f53,_0x1c5a5e){const _0x3886e0=_0x2f1a88;super(),this[_0x3886e0(0xdf)]=_0x439f53,this[_0x3886e0(0x13e)]=_0x1c5a5e,this['_initDataSource']();}[_0x2f1a88(0x122)](){const _0xb95b6e=_0x2f1a88;this['_threadCommentDataSourceService']['dataSource']=this[_0xb95b6e(0x13e)],this[_0xb95b6e(0xdf)][_0xb95b6e(0xf5)]=!0x1;}};f=te([M(0x0,_0xb4d94),M(0x1,_0xde01ec(S))],f);var se=Object[_0x2f1a88(0xf0)],oe=Object[_0x2f1a88(0x121)],ne=(_0x5a13b4,_0x136103,_0x2395c6)=>_0x136103 in _0x5a13b4?se(_0x5a13b4,_0x136103,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2395c6}):_0x5a13b4[_0x136103]=_0x2395c6,ie=(_0x695702,_0x68d41b,_0x288351,_0x359c76)=>{const _0x32664c=_0x2f1a88;for(var _0x24182a=_0x359c76>0x1?void 0x0:_0x359c76?oe(_0x68d41b,_0x288351):_0x68d41b,_0x35fb10=_0x695702[_0x32664c(0xf6)]-0x1,_0x380a14;_0x35fb10>=0x0;_0x35fb10--)(_0x380a14=_0x695702[_0x35fb10])&&(_0x24182a=_0x380a14(_0x24182a)||_0x24182a);return _0x24182a;},N=(_0x5c9009,_0x69265)=>(_0x32e668,_0x1c5d3f)=>_0x69265(_0x32e668,_0x1c5d3f,_0x5c9009),$=(_0x32b7e5,_0xa92254,_0x1caefa)=>ne(_0x32b7e5,typeof _0xa92254!='symbol'?_0xa92254+'':_0xa92254,_0x1caefa);let g=class extends _0x51869c{constructor(_0x3eb225=O,_0x6c9bac,_0x20bf46){const _0x35743f=_0x2f1a88;super(),this[_0x35743f(0x10e)]=_0x3eb225,this['_injector']=_0x6c9bac,this['_configService']=_0x20bf46;const {..._0x302091}=_0x15954c({},O,this[_0x35743f(0x10e)]);this[_0x35743f(0x123)][_0x35743f(0xf9)](z,_0x302091);}[_0x2f1a88(0xff)](){[[S],[f],[_]]['forEach'](_0x4644a2=>{const _0x2b8508=_0x2182;this[_0x2b8508(0xe8)][_0x2b8508(0xe4)](_0x4644a2);});}[_0x2f1a88(0xe6)](){const _0x181bba=_0x2f1a88;this[_0x181bba(0xe8)][_0x181bba(0x13c)](f),this[_0x181bba(0xe8)]['get'](_);}};$(g,_0x2f1a88(0x120),W),$(g,_0x2f1a88(0x10c),_0x25d2ac[_0x2f1a88(0x105)]),g=ie([_0x28793a(_0xcae651,_0x424de7,_0x38080a),N(0x1,_0xde01ec(_0x337246)),N(0x2,_0x21f661)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x45d5(_0x3630a8,_0x2d7338){_0x3630a8=_0x3630a8-0x1c2;const _0x5ce55d=_0x5ce5();let _0x45d544=_0x5ce55d[_0x3630a8];return _0x45d544;}(function(_0x14ec76,_0x5922ec){const _0x412d04=_0x45d5,_0x39b1c6=_0x14ec76();while(!![]){try{const _0x18ccbe=-parseInt(_0x412d04(0x1c8))/0x1+parseInt(_0x412d04(0x1d7))/0x2+-parseInt(_0x412d04(0x1e5))/0x3*(parseInt(_0x412d04(0x23d))/0x4)+-parseInt(_0x412d04(0x1ef))/0x5*(-parseInt(_0x412d04(0x1e7))/0x6)+parseInt(_0x412d04(0x22c))/0x7+parseInt(_0x412d04(0x24a))/0x8*(parseInt(_0x412d04(0x1dd))/0x9)+-parseInt(_0x412d04(0x22b))/0xa*(parseInt(_0x412d04(0x235))/0xb);if(_0x18ccbe===_0x5922ec)break;else _0x39b1c6['push'](_0x39b1c6['shift']());}catch(_0x4bb29c){_0x39b1c6['push'](_0x39b1c6['shift']());}}}(_0x5ce5,0x87a8f),function(_0x37caab,_0x99bb35){const _0x240389=_0x45d5;typeof exports==_0x240389(0x1e9)&&typeof module<'u'?_0x99bb35(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x240389(0x21d),_0x240389(0x209),_0x240389(0x1f7),_0x240389(0x202),_0x240389(0x1c6),_0x240389(0x210),'rxjs','@univerjs/network'],_0x99bb35):(_0x37caab=typeof globalThis<'u'?globalThis:_0x37caab||self,_0x99bb35(_0x37caab[_0x240389(0x1d2)]={},_0x37caab[_0x240389(0x1ec)],_0x37caab['UniverProLicense'],_0x37caab[_0x240389(0x243)],_0x37caab[_0x240389(0x228)],_0x37caab[_0x240389(0x203)],_0x37caab[_0x240389(0x1df)],_0x37caab['UniverNetwork']));}(this,function(_0x347b73,_0x4ebd7c,_0x240775,_0x3e06ff,_0x2663f5,_0x33dd0d,_0x1813bc,_0x1af0b5){'use strict';const _0x4a5f86=_0x45d5;const _0x36598d=_0x4a5f86(0x247);var _0x137c8d=(_0x23488f=>(_0x23488f[_0x23488f['OpenOrReOpen']=0x0]=_0x4a5f86(0x1d9),_0x23488f[_0x23488f[_0x4a5f86(0x1d8)]=0x1]=_0x4a5f86(0x1d8),_0x23488f[_0x23488f[_0x4a5f86(0x1d6)]=-0x1]=_0x4a5f86(0x1d6),_0x23488f))(_0x137c8d||{}),_0x3b65af=(_0x21e30c=>(_0x21e30c[_0x21e30c[_0x4a5f86(0x214)]=0x0]='Unknown',_0x21e30c[_0x21e30c['Add']=0x1]=_0x4a5f86(0x21e),_0x21e30c[_0x21e30c[_0x4a5f86(0x1f8)]=0x2]=_0x4a5f86(0x1f8),_0x21e30c[_0x21e30c['Edit']=0x3]='Edit',_0x21e30c[_0x21e30c['Delete']=0x4]='Delete',_0x21e30c[_0x21e30c[_0x4a5f86(0x220)]=0x5]='Solve',_0x21e30c[_0x21e30c['UNRECOGNIZED']=-0x1]=_0x4a5f86(0x1d6),_0x21e30c))(_0x3b65af||{});const _0x28e987=_0x2034d3=>_0x3e06ff[_0x4a5f86(0x1fd)](new Date(+_0x2034d3))[_0x4a5f86(0x244)](_0x4a5f86(0x227)),_0xdf3fa5=async(_0x119280,_0x584eb6)=>{const _0x394dc7=_0x4a5f86,_0x1a1b1d=_0x119280['get'](_0x3e06ff[_0x394dc7(0x23b)]),_0x188394=_0x119280['get'](_0x1af0b5['HTTPService']);_0x584eb6[_0x394dc7(0x23c)](_0x3b9dd6=>{const _0x273f20=_0x394dc7;_0x1a1b1d[_0x273f20(0x1c4)](_0x3b9dd6)&&_0x584eb6[_0x273f20(0x1c2)](_0x3b9dd6);}),_0x584eb6['size']&&(await _0x188394[_0x394dc7(0x1e2)](_0x394dc7(0x1cd),{'params':{'userIDs':[..._0x584eb6]}}))[_0x394dc7(0x200)][_0x394dc7(0x1e6)][_0x394dc7(0x23c)](_0x3b2a15=>{const _0x5f061c=_0x394dc7;_0x3b2a15&&_0x1a1b1d[_0x5f061c(0x233)](_0x3b2a15);});};var _0x2e2a50=Object['getOwnPropertyDescriptor'],_0x21ed80=(_0x2cfe27,_0x29a8d3,_0x1850f3,_0x21145a)=>{for(var _0x14baaa=_0x21145a>0x1?void 0x0:_0x21145a?_0x2e2a50(_0x29a8d3,_0x1850f3):_0x29a8d3,_0x50750c=_0x2cfe27['length']-0x1,_0x1c54d0;_0x50750c>=0x0;_0x50750c--)(_0x1c54d0=_0x2cfe27[_0x50750c])&&(_0x14baaa=_0x1c54d0(_0x14baaa)||_0x14baaa);return _0x14baaa;},_0x5b0d5f=(_0x32ca39,_0x2b8071)=>(_0x32c551,_0x3cbfc3)=>_0x2b8071(_0x32c551,_0x3cbfc3,_0x32ca39);let _0x5d5359=class extends _0x3e06ff['Disposable']{constructor(_0x321524,_0x53719b,_0x136be0,_0x2031b0){const _0x100ae5=_0x4a5f86;super(),this['_commentService']=_0x321524,this[_0x100ae5(0x1ca)]=_0x53719b,this[_0x100ae5(0x1f5)]=_0x136be0,this['_injector']=_0x2031b0,this['_init'](),this[_0x100ae5(0x229)]();}['_initUserSync'](){const _0x44a4a6=_0x4a5f86;this[_0x44a4a6(0x241)](this[_0x44a4a6(0x1ca)][_0x44a4a6(0x245)]['pipe'](_0x1813bc[_0x44a4a6(0x1de)](0x10))[_0x44a4a6(0x236)](_0x45c9d3=>{const _0x38ab73=_0x44a4a6,_0x34146b=new Set();_0x45c9d3['forEach'](_0xd935b7=>{const _0x3cbd3f=_0x45d5;if(_0xd935b7['type']==='add'){const _0x1db274=_0xd935b7['payload'][_0x3cbd3f(0x21a)];_0x34146b['add'](_0x1db274);}}),_0xdf3fa5(this[_0x38ab73(0x21c)],_0x34146b);}));}[_0x4a5f86(0x1c3)](){const _0x5e7c08=_0x4a5f86;this[_0x5e7c08(0x241)](this['_commentService']['commentUpdate$'][_0x5e7c08(0x236)](async _0x5ea791=>{const _0x504006=_0x5e7c08;var _0x6f6c5e,_0x2f0d80,_0x442cdc,_0x5037ab;const _0x37e1f6=(_0x6f6c5e=this[_0x504006(0x1ca)][_0x504006(0x1ea)](_0x5ea791['unitId'])[_0x504006(0x206)](_0x5e74dc=>_0x5e74dc[_0x504006(0x23e)]===_0x5ea791[_0x504006(0x23e)]))==null?void 0x0:_0x6f6c5e[_0x504006(0x1fe)];if(!_0x37e1f6)return;const {unitId:_0x5670c8,subUnitId:_0x4a78f9}=_0x37e1f6;switch(_0x5ea791['user']&&this['_userService'][_0x504006(0x233)](_0x5ea791['user']),_0x5ea791['type']){case _0x3b65af[_0x504006(0x21e)]:break;case _0x3b65af[_0x504006(0x1f8)]:{this[_0x504006(0x1ca)][_0x504006(0x24b)](_0x5670c8,_0x4a78f9,{'unitId':_0x5670c8,'subUnitId':_0x4a78f9,'ref':'','id':_0x5ea791['replyId'],'dT':_0x28e987(+_0x5ea791[_0x504006(0x1ff)]),'threadId':_0x5ea791['threadId'],'personId':(_0x442cdc=(_0x2f0d80=_0x5ea791[_0x504006(0x22a)])==null?void 0x0:_0x2f0d80['userID'])!=null?_0x442cdc:_0x5ea791['userId'],'text':JSON['parse'](_0x5ea791[_0x504006(0x216)]),'parentId':_0x37e1f6['id']});break;}case _0x3b65af[_0x504006(0x1f0)]:{const _0xf4c518=this['_threadCommentModel'][_0x504006(0x208)](_0x5670c8,_0x4a78f9,_0x5ea791[_0x504006(0x21f)]);_0xf4c518&&_0xf4c518[_0x504006(0x1db)]&&this['_threadCommentModel'][_0x504006(0x222)](_0x5670c8,_0x4a78f9,_0x5ea791[_0x504006(0x21f)]);break;}case _0x3b65af[_0x504006(0x1d4)]:{this[_0x504006(0x1ca)][_0x504006(0x223)](_0x5670c8,_0x4a78f9,{'commentId':_0x5ea791[_0x504006(0x21f)],'text':JSON[_0x504006(0x20f)](_0x5ea791['content'])});break;}case _0x3b65af[_0x504006(0x220)]:{const _0x50d3ae=(_0x5037ab=this['_threadCommentModel']['getUnit'](_0x5ea791['unitId'])[_0x504006(0x206)](_0x4adc1d=>_0x4adc1d['threadId']===_0x5ea791[_0x504006(0x23e)]))==null?void 0x0:_0x5037ab[_0x504006(0x1fe)];_0x50d3ae&&this[_0x504006(0x1ca)][_0x504006(0x1fb)](_0x5670c8,_0x4a78f9,_0x50d3ae['id'],_0x5ea791[_0x504006(0x23f)]===_0x137c8d[_0x504006(0x1d8)]);break;}}}));}};_0x5d5359=_0x21ed80([_0x5b0d5f(0x0,_0x3e06ff['Inject'](_0x4ebd7c[_0x4a5f86(0x1ce)])),_0x5b0d5f(0x1,_0x3e06ff[_0x4a5f86(0x234)](_0x33dd0d[_0x4a5f86(0x237)])),_0x5b0d5f(0x2,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x23b)])),_0x5b0d5f(0x3,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x207)]))],_0x5d5359);const _0x3b08bc=_0x4a5f86(0x1cb),_0x2833f6={};var _0x5535cd=Object['getOwnPropertyDescriptor'],_0x3bc456=(_0x386f89,_0x3704c2,_0x9f4572,_0x347c7f)=>{for(var _0x145ad8=_0x347c7f>0x1?void 0x0:_0x347c7f?_0x5535cd(_0x3704c2,_0x9f4572):_0x3704c2,_0x1713e9=_0x386f89['length']-0x1,_0x144881;_0x1713e9>=0x0;_0x1713e9--)(_0x144881=_0x386f89[_0x1713e9])&&(_0x145ad8=_0x144881(_0x145ad8)||_0x145ad8);return _0x145ad8;},_0x39995f=(_0x2cf4e5,_0x54847e)=>(_0x452b5f,_0x23464e)=>_0x54847e(_0x452b5f,_0x23464e,_0x2cf4e5);function _0x491fe1(_0x3adb6e,_0x487ec8){const _0x2d7e6c=_0x4a5f86,_0x3d4618=_0x3adb6e[_0x2d7e6c(0x249)][0x0];return{..._0x487ec8,'id':_0x3d4618['replyId'],'resolved':_0x3adb6e[_0x2d7e6c(0x23f)]===0x1,'dT':_0x28e987(_0x3d4618[_0x2d7e6c(0x1ff)]),'personId':_0x3d4618[_0x2d7e6c(0x1d5)],'threadId':_0x3d4618['threadId']};}function _0x1453e8(_0x39100f,_0x115db7,_0x370dd0){const _0x4c854f=_0x4a5f86;var _0x14679c,_0x9da0c5;if(((_0x9da0c5=(_0x14679c=_0x39100f==null?void 0x0:_0x39100f['replies'])==null?void 0x0:_0x14679c[_0x4c854f(0x1ee)])!=null?_0x9da0c5:0x0)>0x0){const _0x2d7006=(_0x4d85f8,_0x2fd07d)=>({'id':_0x4d85f8['replyId'],'threadId':_0x4d85f8[_0x4c854f(0x23e)],'dT':_0x28e987(_0x4d85f8['createTimestamp']),'personId':_0x4d85f8[_0x4c854f(0x1d5)],'resolved':_0x39100f[_0x4c854f(0x23f)]===_0x137c8d['Solved'],'unitId':_0x115db7,'subUnitId':_0x370dd0,'text':JSON[_0x4c854f(0x20f)](_0x4d85f8[_0x4c854f(0x216)]),'parentId':_0x2fd07d}),_0x487d6a=_0x2d7006(_0x39100f[_0x4c854f(0x249)][0x0]);return{..._0x487d6a,'children':_0x39100f[_0x4c854f(0x249)][_0x4c854f(0x231)](0x1)['map'](_0x4961b2=>_0x2d7006(_0x4961b2,_0x487d6a['id']))};}return null;}let _0x1f4fd0=class{constructor(_0x4a72e4,_0x38cbed,_0x32520e){const _0x476394=_0x4a5f86;this[_0x476394(0x1c5)]=_0x4a72e4,this[_0x476394(0x1f5)]=_0x38cbed,this[_0x476394(0x230)]=_0x32520e;}async[_0x4a5f86(0x24b)](_0x5a0c6a){const _0x4e0529=_0x4a5f86;var _0x511ce3,_0x5cfd87;const {parentId:_0x6364bd,unitId:_0x43319c,text:_0xcc0cd4,threadId:_0x1764f9}=_0x5a0c6a,_0x39cb58=(_0x5cfd87=(_0x511ce3=_0xcc0cd4[_0x4e0529(0x1ed)])==null?void 0x0:_0x511ce3[_0x4e0529(0x1d1)](_0x1c54a7=>_0x1c54a7[_0x4e0529(0x1d0)]===_0x3e06ff[_0x4e0529(0x1f3)][_0x4e0529(0x23a)])[_0x4e0529(0x215)](_0x435299=>_0x435299[_0x4e0529(0x20e)]))!=null?_0x5cfd87:[],_0xa00eb8=JSON[_0x4e0529(0x1f1)](_0xcc0cd4),_0x232f21=(await this[_0x4e0529(0x230)][_0x4e0529(0x1eb)](_0x43319c))[_0x4e0529(0x22f)]();if(_0x6364bd){const _0x44a4a4={'memberId':_0x232f21,'unitId':_0x43319c,'content':_0xa00eb8,'mention':_0x39cb58,'threadId':_0x1764f9},_0x507f29=(await this[_0x4e0529(0x1c5)][_0x4e0529(0x1c7)](_0x4e0529(0x1cc)+_0x43319c+_0x4e0529(0x1e0),{'body':_0x44a4a4}))[_0x4e0529(0x200)][_0x4e0529(0x1d3)];return{..._0x5a0c6a,'id':_0x507f29['replyId'],'dT':_0x3e06ff[_0x4e0529(0x1fd)](+_0x507f29[_0x4e0529(0x1ff)])[_0x4e0529(0x244)](_0x4e0529(0x227)),'personId':_0x507f29[_0x4e0529(0x1d5)]};}else{const _0x5ad1df={'memberId':_0x232f21,'unitId':_0x43319c,'content':_0xa00eb8,'mention':_0x39cb58},_0x3238d8=await this[_0x4e0529(0x1c5)]['post'](_0x4e0529(0x1cc)+_0x43319c+_0x4e0529(0x22d),{'body':_0x5ad1df});return _0x491fe1(_0x3238d8['body'][_0x4e0529(0x1da)],_0x5a0c6a);}}async[_0x4a5f86(0x223)](_0x2f44de){const _0x62a97c=_0x4a5f86;var _0x42c715,_0xa675e6;const {text:_0x5b96e4,unitId:_0x5ec067}=_0x2f44de,_0x5b2085=(_0xa675e6=(_0x42c715=_0x5b96e4['customRanges'])==null?void 0x0:_0x42c715[_0x62a97c(0x1d1)](_0x199fb5=>_0x199fb5['rangeType']===_0x3e06ff[_0x62a97c(0x1f3)][_0x62a97c(0x23a)])[_0x62a97c(0x215)](_0x522ffd=>_0x522ffd['rangeId']))!=null?_0xa675e6:[],_0x1aa76c=JSON[_0x62a97c(0x1f1)](_0x5b96e4),_0x1ea54e=_0x2f44de['threadId'],_0x13ce46=_0x2f44de['id'],_0xc67b3a={'memberId':(await this[_0x62a97c(0x230)][_0x62a97c(0x1eb)](_0x5ec067))[_0x62a97c(0x22f)](),'unitId':_0x5ec067,'threadId':_0x1ea54e,'mention':_0x5b2085,'content':_0x1aa76c,'replyId':_0x13ce46},_0x2e54f4=await this[_0x62a97c(0x1c5)]['post']('/universer-api/comment/unit/'+_0x5ec067+_0x62a97c(0x1e3),{'body':_0xc67b3a});return!_0x2e54f4[_0x62a97c(0x200)]['error']||_0x2e54f4['body'][_0x62a97c(0x1fc)][_0x62a97c(0x21b)]===0x1;}async[_0x4a5f86(0x1fb)](_0x3d21ca){const _0x557dad=_0x4a5f86,{unitId:_0x4e4d8c}=_0x3d21ca,_0x56efe9=_0x3d21ca[_0x557dad(0x23e)],_0xbaceb0={'memberId':this[_0x557dad(0x1f5)][_0x557dad(0x232)]()[_0x557dad(0x1f6)],'unitId':_0x4e4d8c,'threadId':_0x56efe9,'solved':_0x3d21ca[_0x557dad(0x1dc)]?_0x137c8d[_0x557dad(0x1d8)]:_0x137c8d['OpenOrReOpen']},_0x8679=await this['_httpService'][_0x557dad(0x1c7)](_0x557dad(0x1cc)+_0x4e4d8c+_0x557dad(0x1e1),{'body':_0xbaceb0});return!_0x8679[_0x557dad(0x200)][_0x557dad(0x1fc)]||_0x8679[_0x557dad(0x200)][_0x557dad(0x1fc)][_0x557dad(0x21b)]===0x1;}async[_0x4a5f86(0x222)](_0xe374d9,_0x32ada2,_0x4d56e9,_0x4cfccc){const _0xb98d56=_0x4a5f86,_0xeb324a={'memberId':(await this[_0xb98d56(0x230)]['requireSession'](_0xe374d9))['getMemberID'](),'threadId':_0x4d56e9,'replyId':_0x4cfccc,'unitId':_0xe374d9},_0x34cbe9=await this[_0xb98d56(0x1c5)][_0xb98d56(0x1c7)](_0xb98d56(0x1cc)+_0xe374d9+'/delete',{'body':_0xeb324a});return!_0x34cbe9['body']['error']||_0x34cbe9[_0xb98d56(0x200)][_0xb98d56(0x1fc)]['code']===0x1;}async[_0x4a5f86(0x226)](_0x2630cc,_0x476e15,_0x561546){const _0x36b49e=_0x4a5f86,_0x5137da={'unitId':_0x2630cc,'threadId':_0x561546},_0x2dfa12=await this[_0x36b49e(0x1c5)][_0x36b49e(0x1c7)]('/universer-api/comment/unit/'+_0x2630cc+_0x36b49e(0x211),{'body':_0x5137da}),_0x2e16f5=_0x561546[_0x36b49e(0x215)](_0x5e954c=>_0x1453e8(_0x2dfa12[_0x36b49e(0x200)][_0x36b49e(0x1fa)][_0x5e954c],_0x2630cc,_0x476e15))[_0x36b49e(0x1d1)](Boolean);return Object['values'](_0x2dfa12['body']['users'])['forEach'](_0x556976=>{const _0x61f727=_0x36b49e;this[_0x61f727(0x1f5)][_0x61f727(0x233)](_0x556976);}),_0x2e16f5;}[_0x4a5f86(0x1e8)](_0x103d13){const _0x48b8f4=_0x4a5f86;return{'id':_0x103d13['id'],'threadId':_0x103d13[_0x48b8f4(0x23e)],'ref':_0x103d13[_0x48b8f4(0x205)]};}};_0x1f4fd0=_0x3bc456([_0x39995f(0x0,_0x3e06ff[_0x4a5f86(0x234)](_0x1af0b5[_0x4a5f86(0x22e)])),_0x39995f(0x1,_0x3e06ff[_0x4a5f86(0x234)](_0x3e06ff[_0x4a5f86(0x23b)])),_0x39995f(0x2,_0x3e06ff['Inject'](_0x4ebd7c[_0x4a5f86(0x212)]))],_0x1f4fd0);var _0xbe8f6a=Object[_0x4a5f86(0x219)],_0x47fb0d=(_0x503f06,_0x433883,_0x1f461b,_0x2134c6)=>{const _0x41b0c6=_0x4a5f86;for(var _0x253a7f=_0x2134c6>0x1?void 0x0:_0x2134c6?_0xbe8f6a(_0x433883,_0x1f461b):_0x433883,_0x4be89c=_0x503f06[_0x41b0c6(0x1ee)]-0x1,_0x5cc202;_0x4be89c>=0x0;_0x4be89c--)(_0x5cc202=_0x503f06[_0x4be89c])&&(_0x253a7f=_0x5cc202(_0x253a7f)||_0x253a7f);return _0x253a7f;},_0x17dccf=(_0x427610,_0x48251c)=>(_0x2697bd,_0x29619d)=>_0x48251c(_0x2697bd,_0x29619d,_0x427610);let _0x15f3b5=class extends _0x3e06ff[_0x4a5f86(0x20d)]{constructor(_0x18b085,_0x124d80){const _0x55edde=_0x4a5f86;super(),this[_0x55edde(0x218)]=_0x18b085,this[_0x55edde(0x240)]=_0x124d80,this[_0x55edde(0x221)]();}[_0x4a5f86(0x221)](){const _0x57632e=_0x4a5f86;this[_0x57632e(0x218)][_0x57632e(0x217)]=this[_0x57632e(0x240)],this[_0x57632e(0x218)][_0x57632e(0x1f9)]=!0x1;}};_0x15f3b5=_0x47fb0d([_0x17dccf(0x0,_0x33dd0d['IThreadCommentDataSourceService']),_0x17dccf(0x1,_0x3e06ff['Inject'](_0x1f4fd0))],_0x15f3b5);var _0xbe078d=Object[_0x4a5f86(0x242)],_0x551b2d=Object['getOwnPropertyDescriptor'],_0x208660=(_0x222905,_0x20f503,_0x40ff55)=>_0x20f503 in _0x222905?_0xbe078d(_0x222905,_0x20f503,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40ff55}):_0x222905[_0x20f503]=_0x40ff55,_0x523ee5=(_0x51444d,_0x3df040,_0x4a7c20,_0x3b6212)=>{const _0x40805c=_0x4a5f86;for(var _0x388a5d=_0x3b6212>0x1?void 0x0:_0x3b6212?_0x551b2d(_0x3df040,_0x4a7c20):_0x3df040,_0x87a1ef=_0x51444d[_0x40805c(0x1ee)]-0x1,_0x282b63;_0x87a1ef>=0x0;_0x87a1ef--)(_0x282b63=_0x51444d[_0x87a1ef])&&(_0x388a5d=_0x282b63(_0x388a5d)||_0x388a5d);return _0x388a5d;},_0x35fc04=(_0x5bab6a,_0x1c0590)=>(_0x57ed95,_0x104d7b)=>_0x1c0590(_0x57ed95,_0x104d7b,_0x5bab6a),_0x4a2b1a=(_0x5e6134,_0x4426af,_0x4a29e0)=>_0x208660(_0x5e6134,typeof _0x4426af!=_0x4a5f86(0x239)?_0x4426af+'':_0x4426af,_0x4a29e0);_0x347b73[_0x4a5f86(0x225)]=class extends _0x3e06ff[_0x4a5f86(0x20b)]{constructor(_0x8c6c71=_0x2833f6,_0x2a11e6,_0x18fa5f){const _0x29e345=_0x4a5f86;super(),this[_0x29e345(0x1cf)]=_0x8c6c71,this[_0x29e345(0x21c)]=_0x2a11e6,this[_0x29e345(0x201)]=_0x18fa5f;const {..._0x4ec4ba}=_0x3e06ff[_0x29e345(0x238)]({},_0x2833f6,this[_0x29e345(0x1cf)]);this['_configService'][_0x29e345(0x20a)](_0x3b08bc,_0x4ec4ba);}['onStarting'](){const _0xc452ad=_0x4a5f86;[[_0x1f4fd0],[_0x15f3b5],[_0x5d5359]][_0xc452ad(0x23c)](_0x341205=>{const _0x5c69eb=_0xc452ad;this[_0x5c69eb(0x21c)][_0x5c69eb(0x1c9)](_0x341205);});}['onReady'](){const _0x229cfc=_0x4a5f86;this[_0x229cfc(0x21c)][_0x229cfc(0x1e2)](_0x15f3b5),this[_0x229cfc(0x21c)][_0x229cfc(0x1e2)](_0x5d5359);}},_0x4a2b1a(_0x347b73[_0x4a5f86(0x225)],_0x4a5f86(0x1f2),_0x36598d),_0x4a2b1a(_0x347b73[_0x4a5f86(0x225)],_0x4a5f86(0x20c),_0x3e06ff[_0x4a5f86(0x248)][_0x4a5f86(0x1f4)]),_0x347b73[_0x4a5f86(0x225)]=_0x523ee5([_0x3e06ff[_0x4a5f86(0x224)](_0x2663f5['UniverThreadCommentUIPlugin'],_0x4ebd7c['UniverCollaborationClientPlugin'],_0x240775[_0x4a5f86(0x204)]),_0x35fc04(0x1,_0x3e06ff['Inject'](_0x3e06ff[_0x4a5f86(0x207)])),_0x35fc04(0x2,_0x3e06ff[_0x4a5f86(0x213)])],_0x347b73[_0x4a5f86(0x225)]),Object[_0x4a5f86(0x242)](_0x347b73,Symbol[_0x4a5f86(0x246)],{'value':_0x4a5f86(0x1e4)});}));function _0x5ce5(){const _0x1f6733=['subscribe','ThreadCommentModel','merge','symbol','COMMENT','UserManagerService','forEach','3112gDADfb','threadId','solved','_threadCommentDataSource','disposeWithMe','defineProperty','UniverCore','format','commentUpdate$','toStringTag','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverInstanceType','replies','121512kJOafl','addComment','delete','_init','getUser','_httpService','@univerjs/thread-comment-ui','post','526050VjgGsV','add','_threadCommentModel','thread-comment-data-source.config','/universer-api/comment/unit/','/universer-api/user/list','CommentService','_config','rangeType','filter','UniverProThreadCommentDatasource','reply','Edit','userId','UNRECOGNIZED','963400RDVEDs','Solved','OpenOrReOpen','comment','parentId','resolved','153cmAsNs','bufferTime','rxjs','/reply','/solved','get','/edit','Module','222rxCXPr','users','6JlqmAk','saveCommentToSnapshot','object','getUnit','requireSession','UniverProCollaborationClient','customRanges','length','1408580xmhyuh','Delete','stringify','pluginName','CustomRangeType','UNIVER_UNKNOWN','_userService','userID','@univerjs-pro/license','Reply','syncUpdateMutationToColla','comments','resolveComment','error','dayjs','root','createTimestamp','body','_configService','@univerjs/core','UniverThreadComment','UniverLicensePlugin','ref','find','Injector','getComment','@univerjs-pro/collaboration-client','setConfig','Plugin','type','Disposable','rangeId','parse','@univerjs/thread-comment','/list','CollaborationSessionService','IConfigService','Unknown','map','content','dataSource','_threadCommentDataSourceService','getOwnPropertyDescriptor','personId','code','_injector','exports','Add','replyId','Solve','_initDataSource','deleteComment','updateComment','DependentOn','UniverThreadCommentDataSourcePlugin','listComments','YYYY/MM/DD\x20HH:mm','UniverThreadCommentUi','_initUserSync','user','90pFSppk','5622428iZyKNu','/add','HTTPService','getMemberID','_sessionService','slice','getCurrentUser','addUser','Inject','837892RGWzDU'];_0x5ce5=function(){return _0x1f6733;};return _0x5ce5();}
1
+ (function(_0x4e96b5,_0x5701b0){const _0x56b3d2=_0x3b2e,_0x435010=_0x4e96b5();while(!![]){try{const _0x5538b6=parseInt(_0x56b3d2(0x154))/0x1+parseInt(_0x56b3d2(0x10c))/0x2+parseInt(_0x56b3d2(0x140))/0x3*(parseInt(_0x56b3d2(0x15b))/0x4)+parseInt(_0x56b3d2(0x103))/0x5*(-parseInt(_0x56b3d2(0x130))/0x6)+-parseInt(_0x56b3d2(0x112))/0x7+-parseInt(_0x56b3d2(0x10a))/0x8+parseInt(_0x56b3d2(0x145))/0x9*(-parseInt(_0x56b3d2(0xf7))/0xa);if(_0x5538b6===_0x5701b0)break;else _0x435010['push'](_0x435010['shift']());}catch(_0x3c35c6){_0x435010['push'](_0x435010['shift']());}}}(_0x2590,0xb5f4b),function(_0x3edc63,_0x4bdb2c){const _0x4ca370=_0x3b2e;typeof exports==_0x4ca370(0x122)&&typeof module<'u'?_0x4bdb2c(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x4ca370(0x15e)&&define[_0x4ca370(0x10b)]?define([_0x4ca370(0x147),_0x4ca370(0x16c),'@univerjs-pro/license','@univerjs/core',_0x4ca370(0x110),_0x4ca370(0x119),_0x4ca370(0x148),_0x4ca370(0x14c)],_0x4bdb2c):(_0x3edc63=typeof globalThis<'u'?globalThis:_0x3edc63||self,_0x4bdb2c(_0x3edc63[_0x4ca370(0xfd)]={},_0x3edc63['UniverProCollaborationClient'],_0x3edc63[_0x4ca370(0x124)],_0x3edc63['UniverCore'],_0x3edc63[_0x4ca370(0xf6)],_0x3edc63[_0x4ca370(0x150)],_0x3edc63[_0x4ca370(0x148)],_0x3edc63[_0x4ca370(0x151)]));}(this,function(_0x4e57e6,_0x3f2754,_0x27f76b,_0x2565dc,_0x320c74,_0x4402ca,_0x106224,_0xa42d9a){'use strict';const _0x4278cb=_0x3b2e;const _0x5e429c=_0x4278cb(0x128);var _0x21b6cb=(_0x166f83=>(_0x166f83[_0x166f83['OpenOrReOpen']=0x0]=_0x4278cb(0x168),_0x166f83[_0x166f83['Solved']=0x1]='Solved',_0x166f83[_0x166f83[_0x4278cb(0x139)]=-0x1]=_0x4278cb(0x139),_0x166f83))(_0x21b6cb||{}),_0x2b9fd0=(_0x51af04=>(_0x51af04[_0x51af04[_0x4278cb(0x12d)]=0x0]=_0x4278cb(0x12d),_0x51af04[_0x51af04['Add']=0x1]=_0x4278cb(0x14d),_0x51af04[_0x51af04[_0x4278cb(0x16f)]=0x2]=_0x4278cb(0x16f),_0x51af04[_0x51af04['Edit']=0x3]=_0x4278cb(0xf4),_0x51af04[_0x51af04[_0x4278cb(0x121)]=0x4]=_0x4278cb(0x121),_0x51af04[_0x51af04['Solve']=0x5]=_0x4278cb(0x16d),_0x51af04[_0x51af04[_0x4278cb(0x139)]=-0x1]=_0x4278cb(0x139),_0x51af04))(_0x2b9fd0||{});const _0x17ff52=_0x11e6d6=>_0x2565dc['dayjs'](new Date(+_0x11e6d6))['format'](_0x4278cb(0x141)),_0x2f9f1c=async(_0x17c269,_0x5e5f10)=>{const _0x3e1d53=_0x4278cb,_0x9f6c19=_0x17c269['get'](_0x2565dc['UserManagerService']),_0x5b6c39=_0x17c269[_0x3e1d53(0xf5)](_0xa42d9a['HTTPService']);_0x5e5f10[_0x3e1d53(0x159)](_0x446491=>{const _0x468a59=_0x3e1d53;_0x9f6c19[_0x468a59(0x127)](_0x446491)&&_0x5e5f10['delete'](_0x446491);}),_0x5e5f10[_0x3e1d53(0x14e)]&&(await _0x5b6c39[_0x3e1d53(0xf5)](_0x3e1d53(0x125),{'params':{'userIDs':[..._0x5e5f10]}}))[_0x3e1d53(0x120)][_0x3e1d53(0x13a)][_0x3e1d53(0x159)](_0x2bf19a=>{const _0x2fe9ee=_0x3e1d53;_0x2bf19a&&_0x9f6c19[_0x2fe9ee(0x167)](_0x2bf19a);});};var _0x2629d7=Object[_0x4278cb(0x134)],_0x2b028d=(_0x4ab453,_0x5bf7e5,_0x8e4212,_0x6483ec)=>{const _0x2b685b=_0x4278cb;for(var _0x48f098=_0x6483ec>0x1?void 0x0:_0x6483ec?_0x2629d7(_0x5bf7e5,_0x8e4212):_0x5bf7e5,_0x1684a3=_0x4ab453[_0x2b685b(0x16b)]-0x1,_0x58b0c1;_0x1684a3>=0x0;_0x1684a3--)(_0x58b0c1=_0x4ab453[_0x1684a3])&&(_0x48f098=_0x58b0c1(_0x48f098)||_0x48f098);return _0x48f098;},_0x150fe2=(_0x3ec38c,_0x5eba94)=>(_0x2ef4ca,_0x15dc3f)=>_0x5eba94(_0x2ef4ca,_0x15dc3f,_0x3ec38c);let _0x1231f8=class extends _0x2565dc['Disposable']{constructor(_0x3112b1,_0x295d70,_0x5e170a,_0x50231d){const _0x33c284=_0x4278cb;super(),this[_0x33c284(0x12f)]=_0x3112b1,this[_0x33c284(0x172)]=_0x295d70,this[_0x33c284(0x158)]=_0x5e170a,this[_0x33c284(0x163)]=_0x50231d,this['_init'](),this['_initUserSync']();}[_0x4278cb(0x10f)](){const _0x4e27ae=_0x4278cb;this[_0x4e27ae(0x14b)](this[_0x4e27ae(0x172)][_0x4e27ae(0x12c)][_0x4e27ae(0x12a)](_0x106224['bufferTime'](0x10))[_0x4e27ae(0x142)](_0x4c7100=>{const _0x1f0876=_0x4e27ae,_0x17d5e2=new Set();_0x4c7100[_0x1f0876(0x159)](_0x1c4704=>{const _0x4cd712=_0x1f0876;if(_0x1c4704['type']===_0x4cd712(0x156)){const _0x3a91ba=_0x1c4704['payload'][_0x4cd712(0x157)];_0x17d5e2['add'](_0x3a91ba);}}),_0x2f9f1c(this[_0x1f0876(0x163)],_0x17d5e2);}));}[_0x4278cb(0x160)](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x35116f=>{const _0xf6f136=_0x3b2e;var _0x1dcdf8,_0x25a080,_0x201328,_0x27604d;const _0x281178=(_0x1dcdf8=this[_0xf6f136(0x172)][_0xf6f136(0xf1)](_0x35116f['unitId'])[_0xf6f136(0x155)](_0x1f144d=>_0x1f144d[_0xf6f136(0x165)]===_0x35116f[_0xf6f136(0x165)]))==null?void 0x0:_0x1dcdf8[_0xf6f136(0x13d)];if(!_0x281178)return;const {unitId:_0x1084ca,subUnitId:_0x203bcf}=_0x281178;switch(_0x35116f[_0xf6f136(0x12e)]&&this[_0xf6f136(0x158)]['addUser'](_0x35116f[_0xf6f136(0x12e)]),_0x35116f[_0xf6f136(0x10e)]){case _0x2b9fd0[_0xf6f136(0x14d)]:break;case _0x2b9fd0[_0xf6f136(0x16f)]:{this[_0xf6f136(0x172)][_0xf6f136(0x16e)](_0x1084ca,_0x203bcf,{'unitId':_0x1084ca,'subUnitId':_0x203bcf,'ref':'','id':_0x35116f[_0xf6f136(0xec)],'dT':_0x17ff52(+_0x35116f['createTimestamp']),'threadId':_0x35116f[_0xf6f136(0x165)],'personId':(_0x201328=(_0x25a080=_0x35116f[_0xf6f136(0x12e)])==null?void 0x0:_0x25a080[_0xf6f136(0xf3)])!=null?_0x201328:_0x35116f['userId'],'text':JSON[_0xf6f136(0x114)](_0x35116f['content']),'parentId':_0x281178['id']});break;}case _0x2b9fd0[_0xf6f136(0x121)]:{const _0x324e80=this['_threadCommentModel'][_0xf6f136(0x102)](_0x1084ca,_0x203bcf,_0x35116f[_0xf6f136(0xec)]);_0x324e80&&_0x324e80[_0xf6f136(0x101)]&&this[_0xf6f136(0x172)][_0xf6f136(0x149)](_0x1084ca,_0x203bcf,_0x35116f[_0xf6f136(0xec)]);break;}case _0x2b9fd0['Edit']:{this[_0xf6f136(0x172)][_0xf6f136(0x123)](_0x1084ca,_0x203bcf,{'commentId':_0x35116f[_0xf6f136(0xec)],'text':JSON[_0xf6f136(0x114)](_0x35116f[_0xf6f136(0xed)])});break;}case _0x2b9fd0[_0xf6f136(0x16d)]:{const _0x3b4048=(_0x27604d=this[_0xf6f136(0x172)][_0xf6f136(0xf1)](_0x35116f[_0xf6f136(0x100)])[_0xf6f136(0x155)](_0xf9ab3=>_0xf9ab3[_0xf6f136(0x165)]===_0x35116f[_0xf6f136(0x165)]))==null?void 0x0:_0x27604d['root'];_0x3b4048&&this['_threadCommentModel'][_0xf6f136(0x132)](_0x1084ca,_0x203bcf,_0x3b4048['id'],_0x35116f[_0xf6f136(0x105)]===_0x21b6cb[_0xf6f136(0x129)]);break;}}}));}};_0x1231f8=_0x2b028d([_0x150fe2(0x0,_0x2565dc[_0x4278cb(0x11e)](_0x3f2754[_0x4278cb(0x116)])),_0x150fe2(0x1,_0x2565dc[_0x4278cb(0x11e)](_0x4402ca[_0x4278cb(0x115)])),_0x150fe2(0x2,_0x2565dc[_0x4278cb(0x11e)](_0x2565dc[_0x4278cb(0x170)])),_0x150fe2(0x3,_0x2565dc[_0x4278cb(0x11e)](_0x2565dc[_0x4278cb(0x13e)]))],_0x1231f8);const _0x3c136d=_0x4278cb(0x14f),_0x18308d={};var _0x50a52b=Object['getOwnPropertyDescriptor'],_0x2187da=(_0x11838d,_0x4d94d8,_0x4f7888,_0x14af78)=>{const _0x5528c5=_0x4278cb;for(var _0x53b89b=_0x14af78>0x1?void 0x0:_0x14af78?_0x50a52b(_0x4d94d8,_0x4f7888):_0x4d94d8,_0x925862=_0x11838d[_0x5528c5(0x16b)]-0x1,_0x10c86b;_0x925862>=0x0;_0x925862--)(_0x10c86b=_0x11838d[_0x925862])&&(_0x53b89b=_0x10c86b(_0x53b89b)||_0x53b89b);return _0x53b89b;},_0x350610=(_0x3e38d6,_0x12c69f)=>(_0x1f3122,_0x253d83)=>_0x12c69f(_0x1f3122,_0x253d83,_0x3e38d6);function _0x29d2bc(_0x37aa3d,_0x3da123){const _0x931f3=_0x4278cb,_0x37325a=_0x37aa3d[_0x931f3(0x14a)][0x0];return{..._0x3da123,'id':_0x37325a[_0x931f3(0xec)],'resolved':_0x37aa3d['solved']===0x1,'dT':_0x17ff52(_0x37325a[_0x931f3(0x131)]),'personId':_0x37325a[_0x931f3(0x15a)],'threadId':_0x37325a[_0x931f3(0x165)]};}function _0xa68946(_0x5b8063,_0x4b46f9,_0x3ea943){const _0x43ed3f=_0x4278cb;var _0x585287,_0x12168;if(((_0x12168=(_0x585287=_0x5b8063==null?void 0x0:_0x5b8063[_0x43ed3f(0x14a)])==null?void 0x0:_0x585287[_0x43ed3f(0x16b)])!=null?_0x12168:0x0)>0x0){const _0x6987ad=(_0x4edf13,_0x270df0)=>({'id':_0x4edf13[_0x43ed3f(0xec)],'threadId':_0x4edf13[_0x43ed3f(0x165)],'dT':_0x17ff52(_0x4edf13['createTimestamp']),'personId':_0x4edf13[_0x43ed3f(0x15a)],'resolved':_0x5b8063['solved']===_0x21b6cb[_0x43ed3f(0x129)],'unitId':_0x4b46f9,'subUnitId':_0x3ea943,'text':JSON[_0x43ed3f(0x114)](_0x4edf13['content']),'parentId':_0x270df0}),_0x304324=_0x6987ad(_0x5b8063['replies'][0x0]);return{..._0x304324,'children':_0x5b8063[_0x43ed3f(0x14a)]['slice'](0x1)['map'](_0x3ac0c6=>_0x6987ad(_0x3ac0c6,_0x304324['id']))};}return null;}let _0x470775=class{constructor(_0x4df437,_0x2c3a6d,_0x231a20){const _0x3d63d3=_0x4278cb;this['_httpService']=_0x4df437,this[_0x3d63d3(0x158)]=_0x2c3a6d,this[_0x3d63d3(0x13c)]=_0x231a20;}async[_0x4278cb(0x16e)](_0x410d86){const _0x421a4f=_0x4278cb;var _0x56cf35,_0xbb8e11;const {parentId:_0x76fcb,unitId:_0x479777,text:_0x1785f3,threadId:_0x5304a7}=_0x410d86,_0x19779b=(_0xbb8e11=(_0x56cf35=_0x1785f3[_0x421a4f(0x16a)])==null?void 0x0:_0x56cf35[_0x421a4f(0x161)](_0x3dfaf5=>_0x3dfaf5[_0x421a4f(0xf2)]===_0x2565dc[_0x421a4f(0x136)][_0x421a4f(0x104)])[_0x421a4f(0x162)](_0x4adff1=>_0x4adff1['rangeId']))!=null?_0xbb8e11:[],_0x41224e=JSON[_0x421a4f(0x106)](_0x1785f3),_0x3e0616=(await this[_0x421a4f(0x13c)]['requireSession'](_0x479777))[_0x421a4f(0x13f)]();if(_0x76fcb){const _0x47a4f7={'memberId':_0x3e0616,'unitId':_0x479777,'content':_0x41224e,'mention':_0x19779b,'threadId':_0x5304a7},_0x57b1c9=(await this[_0x421a4f(0x118)][_0x421a4f(0x10d)](_0x421a4f(0x109)+_0x479777+'/reply',{'body':_0x47a4f7}))[_0x421a4f(0x120)][_0x421a4f(0x11a)];return{..._0x410d86,'id':_0x57b1c9[_0x421a4f(0xec)],'dT':_0x2565dc['dayjs'](+_0x57b1c9[_0x421a4f(0x131)])[_0x421a4f(0xf0)](_0x421a4f(0x141)),'personId':_0x57b1c9[_0x421a4f(0x15a)]};}else{const _0xc71c0={'memberId':_0x3e0616,'unitId':_0x479777,'content':_0x41224e,'mention':_0x19779b},_0x18e28d=await this[_0x421a4f(0x118)][_0x421a4f(0x10d)](_0x421a4f(0x109)+_0x479777+'/add',{'body':_0xc71c0});return _0x29d2bc(_0x18e28d[_0x421a4f(0x120)][_0x421a4f(0x13b)],_0x410d86);}}async[_0x4278cb(0x123)](_0x171d5f){const _0x1ed5a8=_0x4278cb;var _0x3f48a2,_0x1de28f;const {text:_0x43c8fa,unitId:_0x56a733}=_0x171d5f,_0xe59c38=(_0x1de28f=(_0x3f48a2=_0x43c8fa[_0x1ed5a8(0x16a)])==null?void 0x0:_0x3f48a2[_0x1ed5a8(0x161)](_0x42cd62=>_0x42cd62['rangeType']===_0x2565dc[_0x1ed5a8(0x136)][_0x1ed5a8(0x104)])[_0x1ed5a8(0x162)](_0x56d529=>_0x56d529['rangeId']))!=null?_0x1de28f:[],_0x9dcf71=JSON['stringify'](_0x43c8fa),_0x36a25e=_0x171d5f['threadId'],_0x2341ba=_0x171d5f['id'],_0x555e29={'memberId':(await this[_0x1ed5a8(0x13c)][_0x1ed5a8(0xf9)](_0x56a733))[_0x1ed5a8(0x13f)](),'unitId':_0x56a733,'threadId':_0x36a25e,'mention':_0xe59c38,'content':_0x9dcf71,'replyId':_0x2341ba},_0x4b97e9=await this['_httpService']['post'](_0x1ed5a8(0x109)+_0x56a733+_0x1ed5a8(0x11f),{'body':_0x555e29});return!_0x4b97e9[_0x1ed5a8(0x120)][_0x1ed5a8(0x15f)]||_0x4b97e9['body'][_0x1ed5a8(0x15f)]['code']===0x1;}async[_0x4278cb(0x132)](_0x55a853){const _0x3ea50d=_0x4278cb,{unitId:_0x2f306a}=_0x55a853,_0x1f132c=_0x55a853[_0x3ea50d(0x165)],_0x3c97f9={'memberId':this[_0x3ea50d(0x158)][_0x3ea50d(0x153)]()[_0x3ea50d(0xf3)],'unitId':_0x2f306a,'threadId':_0x1f132c,'solved':_0x55a853[_0x3ea50d(0x11d)]?_0x21b6cb[_0x3ea50d(0x129)]:_0x21b6cb[_0x3ea50d(0x168)]},_0x56ba4d=await this[_0x3ea50d(0x118)][_0x3ea50d(0x10d)](_0x3ea50d(0x109)+_0x2f306a+_0x3ea50d(0x11c),{'body':_0x3c97f9});return!_0x56ba4d[_0x3ea50d(0x120)][_0x3ea50d(0x15f)]||_0x56ba4d[_0x3ea50d(0x120)][_0x3ea50d(0x15f)][_0x3ea50d(0x143)]===0x1;}async[_0x4278cb(0x149)](_0x51543f,_0x26b44c,_0x82cf1e,_0x2d62f4){const _0x3c457f=_0x4278cb,_0x4475e5={'memberId':(await this[_0x3c457f(0x13c)][_0x3c457f(0xf9)](_0x51543f))[_0x3c457f(0x13f)](),'threadId':_0x82cf1e,'replyId':_0x2d62f4,'unitId':_0x51543f},_0x4d3f12=await this[_0x3c457f(0x118)][_0x3c457f(0x10d)](_0x3c457f(0x109)+_0x51543f+_0x3c457f(0x107),{'body':_0x4475e5});return!_0x4d3f12[_0x3c457f(0x120)][_0x3c457f(0x15f)]||_0x4d3f12[_0x3c457f(0x120)]['error']['code']===0x1;}async[_0x4278cb(0x113)](_0x377ad1,_0x15ab8,_0x34c2ed){const _0x20d011=_0x4278cb,_0x1acc06={'unitId':_0x377ad1,'threadId':_0x34c2ed},_0x5e019a=await this[_0x20d011(0x118)][_0x20d011(0x10d)](_0x20d011(0x109)+_0x377ad1+_0x20d011(0x144),{'body':_0x1acc06}),_0x16b57a=_0x34c2ed[_0x20d011(0x162)](_0x2c8666=>_0xa68946(_0x5e019a[_0x20d011(0x120)]['comments'][_0x2c8666],_0x377ad1,_0x15ab8))[_0x20d011(0x161)](Boolean);return Object[_0x20d011(0xf8)](_0x5e019a['body'][_0x20d011(0x13a)])[_0x20d011(0x159)](_0x8269fc=>{const _0x41d381=_0x20d011;this['_userService'][_0x41d381(0x167)](_0x8269fc);}),_0x16b57a;}['saveCommentToSnapshot'](_0x2deaf1){const _0xd44b6e=_0x4278cb;return{'id':_0x2deaf1['id'],'threadId':_0x2deaf1[_0xd44b6e(0x165)],'ref':_0x2deaf1[_0xd44b6e(0xee)]};}};_0x470775=_0x2187da([_0x350610(0x0,_0x2565dc['Inject'](_0xa42d9a[_0x4278cb(0xfa)])),_0x350610(0x1,_0x2565dc[_0x4278cb(0x11e)](_0x2565dc[_0x4278cb(0x170)])),_0x350610(0x2,_0x2565dc[_0x4278cb(0x11e)](_0x3f2754[_0x4278cb(0x166)]))],_0x470775);var _0x4e92c2=Object[_0x4278cb(0x134)],_0x57034b=(_0x2bf78f,_0x41a0eb,_0x489815,_0xa83d72)=>{const _0x3db992=_0x4278cb;for(var _0x530593=_0xa83d72>0x1?void 0x0:_0xa83d72?_0x4e92c2(_0x41a0eb,_0x489815):_0x41a0eb,_0x783f25=_0x2bf78f[_0x3db992(0x16b)]-0x1,_0x21120a;_0x783f25>=0x0;_0x783f25--)(_0x21120a=_0x2bf78f[_0x783f25])&&(_0x530593=_0x21120a(_0x530593)||_0x530593);return _0x530593;},_0x2202f2=(_0xa38a3a,_0xe27932)=>(_0x1de2b4,_0x5df256)=>_0xe27932(_0x1de2b4,_0x5df256,_0xa38a3a);let _0x52a555=class extends _0x2565dc[_0x4278cb(0xfc)]{constructor(_0x147016,_0x66ca85){const _0x2a30d8=_0x4278cb;super(),this['_threadCommentDataSourceService']=_0x147016,this['_threadCommentDataSource']=_0x66ca85,this[_0x2a30d8(0x137)]();}[_0x4278cb(0x137)](){const _0x502c66=_0x4278cb;this[_0x502c66(0xef)][_0x502c66(0x152)]=this[_0x502c66(0x135)],this[_0x502c66(0xef)][_0x502c66(0x12b)]=!0x1;}};_0x52a555=_0x57034b([_0x2202f2(0x0,_0x4402ca[_0x4278cb(0x11b)]),_0x2202f2(0x1,_0x2565dc[_0x4278cb(0x11e)](_0x470775))],_0x52a555);var _0x19a0a0=Object[_0x4278cb(0x138)],_0x30527f=Object[_0x4278cb(0x134)],_0x27b260=(_0x1648d9,_0x2fb0cb,_0x508659)=>_0x2fb0cb in _0x1648d9?_0x19a0a0(_0x1648d9,_0x2fb0cb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x508659}):_0x1648d9[_0x2fb0cb]=_0x508659,_0x5022d0=(_0x3010e9,_0x2961c0,_0x5672eb,_0x12ebb8)=>{const _0x26659d=_0x4278cb;for(var _0xbdd4f3=_0x12ebb8>0x1?void 0x0:_0x12ebb8?_0x30527f(_0x2961c0,_0x5672eb):_0x2961c0,_0x35eb52=_0x3010e9[_0x26659d(0x16b)]-0x1,_0x31f473;_0x35eb52>=0x0;_0x35eb52--)(_0x31f473=_0x3010e9[_0x35eb52])&&(_0xbdd4f3=_0x31f473(_0xbdd4f3)||_0xbdd4f3);return _0xbdd4f3;},_0x14b975=(_0x59f8d0,_0x1a8c14)=>(_0x4abe07,_0x218401)=>_0x1a8c14(_0x4abe07,_0x218401,_0x59f8d0),_0x2f3c2d=(_0x2d7bef,_0x3e7f16,_0x1ccf6d)=>_0x27b260(_0x2d7bef,typeof _0x3e7f16!='symbol'?_0x3e7f16+'':_0x3e7f16,_0x1ccf6d);_0x4e57e6['UniverThreadCommentDataSourcePlugin']=class extends _0x2565dc[_0x4278cb(0x133)]{constructor(_0x2ba469=_0x18308d,_0x2b52cd,_0x5365a4){const _0x6f3959=_0x4278cb;super(),this[_0x6f3959(0x15c)]=_0x2ba469,this[_0x6f3959(0x163)]=_0x2b52cd,this[_0x6f3959(0x108)]=_0x5365a4;const {..._0x3aa05e}=_0x2565dc[_0x6f3959(0x146)]({},_0x18308d,this['_config']);this['_configService'][_0x6f3959(0xfe)](_0x3c136d,_0x3aa05e);}['onStarting'](){[[_0x470775],[_0x52a555],[_0x1231f8]]['forEach'](_0x41b0cd=>{const _0x4f5c21=_0x3b2e;this[_0x4f5c21(0x163)]['add'](_0x41b0cd);});}[_0x4278cb(0x111)](){const _0x220fe9=_0x4278cb;this['_injector'][_0x220fe9(0xf5)](_0x52a555),this[_0x220fe9(0x163)]['get'](_0x1231f8);}},_0x2f3c2d(_0x4e57e6[_0x4278cb(0x164)],_0x4278cb(0x171),_0x5e429c),_0x2f3c2d(_0x4e57e6[_0x4278cb(0x164)],'type',_0x2565dc[_0x4278cb(0x117)]['UNIVER_UNKNOWN']),_0x4e57e6[_0x4278cb(0x164)]=_0x5022d0([_0x2565dc['DependentOn'](_0x320c74[_0x4278cb(0x126)],_0x3f2754[_0x4278cb(0x15d)],_0x27f76b[_0x4278cb(0xff)]),_0x14b975(0x1,_0x2565dc['Inject'](_0x2565dc[_0x4278cb(0x13e)])),_0x14b975(0x2,_0x2565dc['IConfigService'])],_0x4e57e6[_0x4278cb(0x164)]),Object[_0x4278cb(0x138)](_0x4e57e6,Symbol[_0x4278cb(0xfb)],{'value':_0x4278cb(0x169)});}));function _0x3b2e(_0x36409a,_0x4978eb){_0x36409a=_0x36409a-0xec;const _0x2590fa=_0x2590();let _0x3b2e18=_0x2590fa[_0x36409a];return _0x3b2e18;}function _0x2590(){const _0x31d1c6=['UserManagerService','pluginName','_threadCommentModel','replyId','content','ref','_threadCommentDataSourceService','format','getUnit','rangeType','userID','Edit','get','UniverThreadCommentUi','3400QpzHBb','values','requireSession','HTTPService','toStringTag','Disposable','UniverProThreadCommentDatasource','setConfig','UniverLicensePlugin','unitId','parentId','getComment','98555UirDZh','COMMENT','solved','stringify','/delete','_configService','/universer-api/comment/unit/','9038112UYFSQK','amd','2542456IOAZeN','post','type','_initUserSync','@univerjs/thread-comment-ui','onReady','1853187AVkTTE','listComments','parse','ThreadCommentModel','CommentService','UniverInstanceType','_httpService','@univerjs/thread-comment','reply','IThreadCommentDataSourceService','/solved','resolved','Inject','/edit','body','Delete','object','updateComment','UniverProLicense','/universer-api/user/list','UniverThreadCommentUIPlugin','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','pipe','syncUpdateMutationToColla','commentUpdate$','Unknown','user','_commentService','102nskYls','createTimestamp','resolveComment','Plugin','getOwnPropertyDescriptor','_threadCommentDataSource','CustomRangeType','_initDataSource','defineProperty','UNRECOGNIZED','users','comment','_sessionService','root','Injector','getMemberID','1017sBssRP','YYYY/MM/DD\x20HH:mm','subscribe','code','/list','10377LFbuIW','merge','exports','rxjs','deleteComment','replies','disposeWithMe','@univerjs/network','Add','size','thread-comment-data-source.config','UniverThreadComment','UniverNetwork','dataSource','getCurrentUser','978356WFuaXN','find','add','personId','_userService','forEach','userId','7284vmBbrO','_config','UniverCollaborationClientPlugin','function','error','_init','filter','map','_injector','UniverThreadCommentDataSourcePlugin','threadId','CollaborationSessionService','addUser','OpenOrReOpen','Module','customRanges','length','@univerjs-pro/collaboration-client','Solve','addComment','Reply'];_0x2590=function(){return _0x31d1c6;};return _0x2590();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.1",
3
+ "version": "0.15.2-insiders.20260122-b1556b1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.15.1",
49
- "@univerjs-pro/license": "0.15.1",
50
- "@univerjs/core": "0.15.1",
48
+ "@univerjs-pro/collaboration-client": "0.15.2-insiders.20260122-b1556b1",
49
+ "@univerjs-pro/license": "0.15.2-insiders.20260122-b1556b1",
51
50
  "@univerjs/protocol": "0.1.48",
52
- "@univerjs/network": "0.15.1",
53
- "@univerjs/thread-comment": "0.15.1",
54
- "@univerjs/thread-comment-ui": "0.15.1"
51
+ "@univerjs/core": "0.15.2-insiders.20260122-b1556b1",
52
+ "@univerjs/thread-comment-ui": "0.15.2-insiders.20260122-b1556b1",
53
+ "@univerjs/thread-comment": "0.15.2-insiders.20260122-b1556b1",
54
+ "@univerjs/network": "0.15.2-insiders.20260122-b1556b1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
59
  "vite": "^7.3.1",
60
60
  "vitest": "^4.0.16",
61
- "@univerjs-infra/shared": "0.15.1"
61
+ "@univerjs-infra/shared": "0.15.2"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",