@univerjs-pro/thread-comment-datasource 0.5.3 → 0.5.4-nightly.202501131606

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 _0x2556b8=_0xe5de;(function(_0x582d3c,_0x5158b5){const _0x4d432d=_0xe5de,_0x44690e=_0x582d3c();while(!![]){try{const _0x4f692a=parseInt(_0x4d432d(0x1a6))/0x1*(parseInt(_0x4d432d(0x1d4))/0x2)+parseInt(_0x4d432d(0x1ce))/0x3+-parseInt(_0x4d432d(0x1c3))/0x4+parseInt(_0x4d432d(0x1f9))/0x5*(-parseInt(_0x4d432d(0x1cd))/0x6)+-parseInt(_0x4d432d(0x209))/0x7+-parseInt(_0x4d432d(0x1b2))/0x8*(-parseInt(_0x4d432d(0x1fb))/0x9)+-parseInt(_0x4d432d(0x1ee))/0xa;if(_0x4f692a===_0x5158b5)break;else _0x44690e['push'](_0x44690e['shift']());}catch(_0x4eb6df){_0x44690e['push'](_0x44690e['shift']());}}}(_0x81c2,0xd5190));function _0x81c2(){const _0xa93a=['Edit','createTimestamp','getMemberID','_sessionService','_initUserSync','threadId','Add','UniverCollaborationClientPlugin','parentId','UserManagerService','type','map','format','_configService','Delete','_commentService','forEach','listComments','IThreadCommentDataSourceService','pluginName','dayjs','@univerjs/core','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeId','_injector','Reply','userID','18199tzzcVo','_init','requireSession','Solved','delete','thread-comment-data-source.config','body','Solve','Plugin','comment','code','UniverThreadCommentUIPlugin','8ikdlxw','resolveComment','resolved','solved','@univerjs/network','Inject','stringify','_initDataSource','error','@univerjs/thread-comment-ui','disposeWithMe','getCurrentUser','user','payload','OpenOrReOpen','/universer-api/user/list','/solved','4660944xUGbNJ','customRanges','merge','replies','HTTPService','syncUpdateMutationToColla','@univerjs-pro/license','getUser','addUser','rxjs','90eFzpyX','4856820oZtWhY','UNRECOGNIZED','_threadCommentDataSourceService','defineProperty','CollaborationSessionService','reply','118qlEOBj','replyId','length','UniverThreadCommentDataSourcePlugin','UNIVER_UNKNOWN','onReady','add','YYYY/MM/DD\x20HH:mm','get','updateComment','userId','getUnit','getOwnPropertyDescriptor','CustomRangeType','Module','CommentService','addComment','/universer-api/comment/unit/','content','dataSource','commentUpdate$','/list','_threadCommentDataSource','_config','users','UniverInstanceType','9273200pGwQAB','Disposable','subscribe','root','getComment','unitId','Injector','slice','/reply','IConfigService','pipe','383155JXtHml','_userService','14481297BUroHG','values','ref','COMMENT','_httpService','Unknown','post','_threadCommentModel','ThreadCommentModel','filter','deleteComment','parse','rangeType','DependentOn','1307915LdtqkU'];_0x81c2=function(){return _0xa93a;};return _0x81c2();}Object[_0x2556b8(0x1d1)](exports,Symbol['toStringTag'],{'value':_0x2556b8(0x1e2)});const C=require('@univerjs-pro/collaboration-client'),T=require(_0x2556b8(0x1c9)),c=require(_0x2556b8(0x21f)),w=require(_0x2556b8(0x1bb)),P=require('@univerjs/thread-comment'),U=require(_0x2556b8(0x1cc)),M=require(_0x2556b8(0x1b6)),R=_0x2556b8(0x220);var I=(_0x234743=>(_0x234743[_0x234743[_0x2556b8(0x1c0)]=0x0]=_0x2556b8(0x1c0),_0x234743[_0x234743[_0x2556b8(0x1a9)]=0x1]='Solved',_0x234743[_0x234743['UNRECOGNIZED']=-0x1]=_0x2556b8(0x1cf),_0x234743))(I||{}),v=(_0x4833eb=>(_0x4833eb[_0x4833eb[_0x2556b8(0x200)]=0x0]=_0x2556b8(0x200),_0x4833eb[_0x4833eb[_0x2556b8(0x210)]=0x1]=_0x2556b8(0x210),_0x4833eb[_0x4833eb['Reply']=0x2]=_0x2556b8(0x1a4),_0x4833eb[_0x4833eb['Edit']=0x3]='Edit',_0x4833eb[_0x4833eb['Delete']=0x4]='Delete',_0x4833eb[_0x4833eb['Solve']=0x5]=_0x2556b8(0x1ad),_0x4833eb[_0x4833eb['UNRECOGNIZED']=-0x1]=_0x2556b8(0x1cf),_0x4833eb))(v||{});const g=_0x336bf6=>c[_0x2556b8(0x21e)](new Date(+_0x336bf6))[_0x2556b8(0x216)](_0x2556b8(0x1db)),$=async(_0x3a968f,_0x50ddb2)=>{const _0x4ea972=_0x2556b8,_0x277531=_0x3a968f[_0x4ea972(0x1dc)](c['UserManagerService']),_0x1d7aab=_0x3a968f[_0x4ea972(0x1dc)](M[_0x4ea972(0x1c7)]);_0x50ddb2['forEach'](_0x14b581=>{const _0x28cc94=_0x4ea972;_0x277531[_0x28cc94(0x1ca)](_0x14b581)&&_0x50ddb2[_0x28cc94(0x1aa)](_0x14b581);}),_0x50ddb2['size']&&(await _0x1d7aab[_0x4ea972(0x1dc)](_0x4ea972(0x1c1),{'params':{'userIDs':[..._0x50ddb2]}}))['body'][_0x4ea972(0x1ec)][_0x4ea972(0x21a)](_0x2d7a1f=>{const _0x2f9e17=_0x4ea972;_0x2d7a1f&&_0x277531[_0x2f9e17(0x1cb)](_0x2d7a1f);});};var E=Object[_0x2556b8(0x1d1)],q=Object[_0x2556b8(0x1e0)],A=(_0x4afbf7,_0x876b1c,_0x287702,_0x2052bd)=>{const _0x9a318a=_0x2556b8;for(var _0x1b1bb8=_0x2052bd>0x1?void 0x0:_0x2052bd?q(_0x876b1c,_0x287702):_0x876b1c,_0x36007f=_0x4afbf7[_0x9a318a(0x1d6)]-0x1,_0xcd6515;_0x36007f>=0x0;_0x36007f--)(_0xcd6515=_0x4afbf7[_0x36007f])&&(_0x1b1bb8=(_0x2052bd?_0xcd6515(_0x876b1c,_0x287702,_0x1b1bb8):_0xcd6515(_0x1b1bb8))||_0x1b1bb8);return _0x2052bd&&_0x1b1bb8&&E(_0x876b1c,_0x287702,_0x1b1bb8),_0x1b1bb8;},_=(_0x110b48,_0x54aff9)=>(_0x230e3f,_0x2dea47)=>_0x54aff9(_0x230e3f,_0x2dea47,_0x110b48);function _0xe5de(_0x4f5757,_0x2ec4bb){const _0x81c264=_0x81c2();return _0xe5de=function(_0xe5de88,_0x2eaf10){_0xe5de88=_0xe5de88-0x1a4;let _0x2c2709=_0x81c264[_0xe5de88];return _0x2c2709;},_0xe5de(_0x4f5757,_0x2ec4bb);}let S=class extends c[_0x2556b8(0x1ef)]{constructor(_0x36865d,_0x178ddd,_0xfc10aa,_0x5536c5){const _0x301f4c=_0x2556b8;super(),this['_commentService']=_0x36865d,this[_0x301f4c(0x202)]=_0x178ddd,this[_0x301f4c(0x1fa)]=_0xfc10aa,this[_0x301f4c(0x222)]=_0x5536c5,this[_0x301f4c(0x1a7)](),this['_initUserSync']();}[_0x2556b8(0x20e)](){const _0x2a5ce0=_0x2556b8;this[_0x2a5ce0(0x1bc)](this['_threadCommentModel'][_0x2a5ce0(0x1e8)][_0x2a5ce0(0x1f8)](U['bufferTime'](0x10))[_0x2a5ce0(0x1f0)](_0x2ec81a=>{const _0x596c13=_0x2a5ce0,_0x5dbb24=new Set();_0x2ec81a['forEach'](_0x47f220=>{const _0x6eac47=_0xe5de;switch(_0x47f220[_0x6eac47(0x214)]){case _0x6eac47(0x1da):{const _0x43dc06=_0x47f220[_0x6eac47(0x1bf)]['personId'];_0x5dbb24['add'](_0x43dc06);break;}}}),$(this[_0x596c13(0x222)],_0x5dbb24);}));}[_0x2556b8(0x1a7)](){const _0x5ddc1c=_0x2556b8;this[_0x5ddc1c(0x1bc)](this[_0x5ddc1c(0x219)][_0x5ddc1c(0x1e8)][_0x5ddc1c(0x1f0)](async _0x31cb0e=>{const _0x32d777=_0x5ddc1c;var _0x15c075,_0x58fef0,_0x53d742,_0x5e51a5;const _0xbb5aea=(_0x15c075=this[_0x32d777(0x202)][_0x32d777(0x1df)](_0x31cb0e[_0x32d777(0x1f3)])['find'](_0x385762=>_0x385762[_0x32d777(0x20f)]===_0x31cb0e[_0x32d777(0x20f)]))==null?void 0x0:_0x15c075[_0x32d777(0x1f1)];if(!_0xbb5aea)return;const {unitId:_0x53129f,subUnitId:_0x2ff014}=_0xbb5aea;switch(_0x31cb0e[_0x32d777(0x1be)]&&this[_0x32d777(0x1fa)]['addUser'](_0x31cb0e[_0x32d777(0x1be)]),_0x31cb0e[_0x32d777(0x214)]){case v['Add']:break;case v[_0x32d777(0x1a4)]:{this[_0x32d777(0x202)][_0x32d777(0x1e4)](_0x53129f,_0x2ff014,{'unitId':_0x53129f,'subUnitId':_0x2ff014,'ref':'','id':_0x31cb0e[_0x32d777(0x1d5)],'dT':g(+_0x31cb0e[_0x32d777(0x20b)]),'threadId':_0x31cb0e[_0x32d777(0x20f)],'personId':(_0x53d742=(_0x58fef0=_0x31cb0e[_0x32d777(0x1be)])==null?void 0x0:_0x58fef0[_0x32d777(0x1a5)])!=null?_0x53d742:_0x31cb0e[_0x32d777(0x1de)],'text':JSON['parse'](_0x31cb0e[_0x32d777(0x1e6)]),'parentId':_0xbb5aea['id']});break;}case v[_0x32d777(0x218)]:{const _0x3c93f1=this[_0x32d777(0x202)][_0x32d777(0x1f2)](_0x53129f,_0x2ff014,_0x31cb0e[_0x32d777(0x1d5)]);_0x3c93f1&&_0x3c93f1[_0x32d777(0x212)]&&this['_threadCommentModel'][_0x32d777(0x205)](_0x53129f,_0x2ff014,_0x31cb0e['replyId']);break;}case v[_0x32d777(0x20a)]:{this['_threadCommentModel'][_0x32d777(0x1dd)](_0x53129f,_0x2ff014,{'commentId':_0x31cb0e[_0x32d777(0x1d5)],'text':JSON[_0x32d777(0x206)](_0x31cb0e[_0x32d777(0x1e6)])});break;}case v[_0x32d777(0x1ad)]:{const _0x4bfc6a=(_0x5e51a5=this[_0x32d777(0x202)][_0x32d777(0x1df)](_0x31cb0e[_0x32d777(0x1f3)])['find'](_0x2f40a7=>_0x2f40a7['threadId']===_0x31cb0e['threadId']))==null?void 0x0:_0x5e51a5[_0x32d777(0x1f1)];_0x4bfc6a&&this[_0x32d777(0x202)][_0x32d777(0x1b3)](_0x53129f,_0x2ff014,_0x4bfc6a['id'],_0x31cb0e[_0x32d777(0x1b5)]===I[_0x32d777(0x1a9)]);break;}}}));}};S=A([_(0x0,c[_0x2556b8(0x1b7)](C[_0x2556b8(0x1e3)])),_(0x1,c['Inject'](P[_0x2556b8(0x203)])),_(0x2,c[_0x2556b8(0x1b7)](c[_0x2556b8(0x213)])),_(0x3,c[_0x2556b8(0x1b7)](c[_0x2556b8(0x1f4)]))],S);const x=_0x2556b8(0x1ab),D={};var Y=Object['defineProperty'],G=Object['getOwnPropertyDescriptor'],H=(_0x122e5a,_0x1604b4,_0x131cd2,_0x357a80)=>{const _0x57efe6=_0x2556b8;for(var _0x3464e0=_0x357a80>0x1?void 0x0:_0x357a80?G(_0x1604b4,_0x131cd2):_0x1604b4,_0x21b1d2=_0x122e5a[_0x57efe6(0x1d6)]-0x1,_0x4da8ba;_0x21b1d2>=0x0;_0x21b1d2--)(_0x4da8ba=_0x122e5a[_0x21b1d2])&&(_0x3464e0=(_0x357a80?_0x4da8ba(_0x1604b4,_0x131cd2,_0x3464e0):_0x4da8ba(_0x3464e0))||_0x3464e0);return _0x357a80&&_0x3464e0&&Y(_0x1604b4,_0x131cd2,_0x3464e0),_0x3464e0;},p=(_0x4163b2,_0x2a2c58)=>(_0x3690f3,_0x2b77ce)=>_0x2a2c58(_0x3690f3,_0x2b77ce,_0x4163b2);function J(_0x4c1e29,_0x19046f){const _0x333b19=_0x2556b8,_0x314225=_0x4c1e29[_0x333b19(0x1c6)][0x0];return{..._0x19046f,'id':_0x314225[_0x333b19(0x1d5)],'resolved':_0x4c1e29['solved']===0x1,'dT':g(_0x314225[_0x333b19(0x20b)]),'personId':_0x314225[_0x333b19(0x1de)],'threadId':_0x314225['threadId']};}function F(_0x4621ba,_0x4abdc5,_0x2435b6){const _0x529236=_0x2556b8;var _0x8ad7ff,_0x1cafcc;if(((_0x1cafcc=(_0x8ad7ff=_0x4621ba==null?void 0x0:_0x4621ba[_0x529236(0x1c6)])==null?void 0x0:_0x8ad7ff[_0x529236(0x1d6)])!=null?_0x1cafcc:0x0)>0x0){const _0x2bb1ef=(_0x3a01a1,_0x2c3ad2)=>({'id':_0x3a01a1[_0x529236(0x1d5)],'threadId':_0x3a01a1[_0x529236(0x20f)],'dT':g(_0x3a01a1[_0x529236(0x20b)]),'personId':_0x3a01a1[_0x529236(0x1de)],'resolved':_0x4621ba[_0x529236(0x1b5)]===I[_0x529236(0x1a9)],'unitId':_0x4abdc5,'subUnitId':_0x2435b6,'text':JSON['parse'](_0x3a01a1[_0x529236(0x1e6)]),'parentId':_0x2c3ad2}),_0x207bb8=_0x2bb1ef(_0x4621ba['replies'][0x0]);return{..._0x207bb8,'children':_0x4621ba[_0x529236(0x1c6)][_0x529236(0x1f5)](0x1)[_0x529236(0x215)](_0x3b3663=>_0x2bb1ef(_0x3b3663,_0x207bb8['id']))};}return null;}let f=class{constructor(_0x3ccacb,_0x418309,_0x126050,_0x307342){const _0x964bdb=_0x2556b8;this[_0x964bdb(0x1ff)]=_0x3ccacb,this['_userService']=_0x418309,this[_0x964bdb(0x20d)]=_0x126050,this[_0x964bdb(0x222)]=_0x307342;}async['addComment'](_0x3e06a9){const _0x68e94=_0x2556b8;var _0x51795e,_0x588beb;const {parentId:_0x37b058,unitId:_0x3c3199,text:_0x4a5e14,threadId:_0x4946bc}=_0x3e06a9,_0x366b68=(_0x588beb=(_0x51795e=_0x4a5e14[_0x68e94(0x1c4)])==null?void 0x0:_0x51795e['filter'](_0x38d05c=>_0x38d05c[_0x68e94(0x207)]===c['CustomRangeType'][_0x68e94(0x1fe)])['map'](_0x3bee62=>_0x3bee62[_0x68e94(0x221)]))!=null?_0x588beb:[],_0xd744c1=JSON[_0x68e94(0x1b8)](_0x4a5e14),_0x3542e0=(await this[_0x68e94(0x20d)][_0x68e94(0x1a8)](_0x3c3199))[_0x68e94(0x20c)]();if(_0x37b058){const _0x30cdc0={'memberId':_0x3542e0,'unitId':_0x3c3199,'content':_0xd744c1,'mention':_0x366b68,'threadId':_0x4946bc},_0x247d50=(await this[_0x68e94(0x1ff)][_0x68e94(0x201)](_0x68e94(0x1e5)+_0x3c3199+_0x68e94(0x1f6),{'body':_0x30cdc0}))['body'][_0x68e94(0x1d3)];return{..._0x3e06a9,'id':_0x247d50[_0x68e94(0x1d5)],'dT':c['dayjs'](+_0x247d50[_0x68e94(0x20b)])['format'](_0x68e94(0x1db)),'personId':_0x247d50['userId']};}else{const _0x2e252c={'memberId':_0x3542e0,'unitId':_0x3c3199,'content':_0xd744c1,'mention':_0x366b68},_0xaf457b=await this[_0x68e94(0x1ff)][_0x68e94(0x201)](_0x68e94(0x1e5)+_0x3c3199+'/add',{'body':_0x2e252c});return J(_0xaf457b[_0x68e94(0x1ac)][_0x68e94(0x1af)],_0x3e06a9);}}async[_0x2556b8(0x1dd)](_0x1c92e6){const _0x4a4a7a=_0x2556b8;var _0x1d3d25,_0x247cd0;const {text:_0x610bb4,unitId:_0x376c9e}=_0x1c92e6,_0x14f789=(_0x247cd0=(_0x1d3d25=_0x610bb4[_0x4a4a7a(0x1c4)])==null?void 0x0:_0x1d3d25[_0x4a4a7a(0x204)](_0x138628=>_0x138628[_0x4a4a7a(0x207)]===c[_0x4a4a7a(0x1e1)][_0x4a4a7a(0x1fe)])['map'](_0x380e50=>_0x380e50['rangeId']))!=null?_0x247cd0:[],_0x43bb40=JSON[_0x4a4a7a(0x1b8)](_0x610bb4),_0x283815=_0x1c92e6[_0x4a4a7a(0x20f)],_0x5e7584=_0x1c92e6['id'],_0x118260={'memberId':(await this['_sessionService'][_0x4a4a7a(0x1a8)](_0x376c9e))['getMemberID'](),'unitId':_0x376c9e,'threadId':_0x283815,'mention':_0x14f789,'content':_0x43bb40,'replyId':_0x5e7584},_0x433206=await this[_0x4a4a7a(0x1ff)][_0x4a4a7a(0x201)](_0x4a4a7a(0x1e5)+_0x376c9e+'/edit',{'body':_0x118260});return!_0x433206[_0x4a4a7a(0x1ac)]['error']||_0x433206[_0x4a4a7a(0x1ac)]['error'][_0x4a4a7a(0x1b0)]===0x1;}async[_0x2556b8(0x1b3)](_0x365ada){const _0x97b408=_0x2556b8,{unitId:_0x17a9eb}=_0x365ada,_0xc4c72b=_0x365ada['threadId'],_0x26abf8={'memberId':this[_0x97b408(0x1fa)][_0x97b408(0x1bd)]()[_0x97b408(0x1a5)],'unitId':_0x17a9eb,'threadId':_0xc4c72b,'solved':_0x365ada[_0x97b408(0x1b4)]?I[_0x97b408(0x1a9)]:I[_0x97b408(0x1c0)]},_0x912d5b=await this[_0x97b408(0x1ff)][_0x97b408(0x201)](_0x97b408(0x1e5)+_0x17a9eb+_0x97b408(0x1c2),{'body':_0x26abf8});return!_0x912d5b['body'][_0x97b408(0x1ba)]||_0x912d5b['body'][_0x97b408(0x1ba)]['code']===0x1;}async['deleteComment'](_0x36dbb3,_0x491305,_0x494888,_0x35ccd9){const _0x5d68cc=_0x2556b8,_0x203311={'memberId':(await this[_0x5d68cc(0x20d)][_0x5d68cc(0x1a8)](_0x36dbb3))['getMemberID'](),'threadId':_0x494888,'replyId':_0x35ccd9,'unitId':_0x36dbb3},_0x3a0afd=await this[_0x5d68cc(0x1ff)][_0x5d68cc(0x201)](_0x5d68cc(0x1e5)+_0x36dbb3+'/delete',{'body':_0x203311});return!_0x3a0afd[_0x5d68cc(0x1ac)][_0x5d68cc(0x1ba)]||_0x3a0afd[_0x5d68cc(0x1ac)][_0x5d68cc(0x1ba)][_0x5d68cc(0x1b0)]===0x1;}async[_0x2556b8(0x21b)](_0x597fd2,_0x307b5c,_0x78bb07){const _0x5bcb02=_0x2556b8,_0x409701={'unitId':_0x597fd2,'threadId':_0x78bb07},_0x2e185b=await this[_0x5bcb02(0x1ff)]['post'](_0x5bcb02(0x1e5)+_0x597fd2+_0x5bcb02(0x1e9),{'body':_0x409701}),_0x5ea61a=_0x78bb07['map'](_0x52c0f9=>F(_0x2e185b['body']['comments'][_0x52c0f9],_0x597fd2,_0x307b5c))['filter'](Boolean);return Object[_0x5bcb02(0x1fc)](_0x2e185b['body'][_0x5bcb02(0x1ec)])['forEach'](_0x3782fc=>{const _0x2879c5=_0x5bcb02;this[_0x2879c5(0x1fa)][_0x2879c5(0x1cb)](_0x3782fc);}),_0x5ea61a;}['saveCommentToSnapshot'](_0x1d51f3){const _0x25e0d6=_0x2556b8;return{'id':_0x1d51f3['id'],'threadId':_0x1d51f3['threadId'],'ref':_0x1d51f3[_0x25e0d6(0x1fd)]};}};f=H([p(0x0,c[_0x2556b8(0x1b7)](M[_0x2556b8(0x1c7)])),p(0x1,c[_0x2556b8(0x1b7)](c[_0x2556b8(0x213)])),p(0x2,c[_0x2556b8(0x1b7)](C[_0x2556b8(0x1d2)])),p(0x3,c['Inject'](c[_0x2556b8(0x1f4)]))],f);var L=Object[_0x2556b8(0x1d1)],Z=Object[_0x2556b8(0x1e0)],W=(_0x4e4d33,_0x457d08,_0x20012d,_0x21f4cb)=>{const _0x576423=_0x2556b8;for(var _0x26dfb7=_0x21f4cb>0x1?void 0x0:_0x21f4cb?Z(_0x457d08,_0x20012d):_0x457d08,_0x59ff2c=_0x4e4d33[_0x576423(0x1d6)]-0x1,_0x13cd69;_0x59ff2c>=0x0;_0x59ff2c--)(_0x13cd69=_0x4e4d33[_0x59ff2c])&&(_0x26dfb7=(_0x21f4cb?_0x13cd69(_0x457d08,_0x20012d,_0x26dfb7):_0x13cd69(_0x26dfb7))||_0x26dfb7);return _0x21f4cb&&_0x26dfb7&&L(_0x457d08,_0x20012d,_0x26dfb7),_0x26dfb7;},O=(_0x381374,_0x346360)=>(_0x3a3630,_0x1a09c2)=>_0x346360(_0x3a3630,_0x1a09c2,_0x381374);let b=class extends c[_0x2556b8(0x1ef)]{constructor(_0x47f2ae,_0x3006a2){const _0x38a4fe=_0x2556b8;super(),this[_0x38a4fe(0x1d0)]=_0x47f2ae,this[_0x38a4fe(0x1ea)]=_0x3006a2,this[_0x38a4fe(0x1b9)]();}[_0x2556b8(0x1b9)](){const _0x331071=_0x2556b8;this[_0x331071(0x1d0)][_0x331071(0x1e7)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x331071(0x1c8)]=!0x1;}};b=W([O(0x0,P[_0x2556b8(0x21c)]),O(0x1,c[_0x2556b8(0x1b7)](f))],b);var j=Object[_0x2556b8(0x1d1)],B=Object[_0x2556b8(0x1e0)],K=(_0x427f3d,_0x2b896a,_0x4c2b0f)=>_0x2b896a in _0x427f3d?j(_0x427f3d,_0x2b896a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c2b0f}):_0x427f3d[_0x2b896a]=_0x4c2b0f,V=(_0x20b78c,_0x5d4d73,_0x25f56e,_0x20937a)=>{const _0x6e49d=_0x2556b8;for(var _0x1bc033=_0x20937a>0x1?void 0x0:_0x20937a?B(_0x5d4d73,_0x25f56e):_0x5d4d73,_0x1c74d0=_0x20b78c[_0x6e49d(0x1d6)]-0x1,_0x3693d1;_0x1c74d0>=0x0;_0x1c74d0--)(_0x3693d1=_0x20b78c[_0x1c74d0])&&(_0x1bc033=(_0x20937a?_0x3693d1(_0x5d4d73,_0x25f56e,_0x1bc033):_0x3693d1(_0x1bc033))||_0x1bc033);return _0x20937a&&_0x1bc033&&j(_0x5d4d73,_0x25f56e,_0x1bc033),_0x1bc033;},y=(_0x5ecf53,_0x1608cc)=>(_0x28fde3,_0x25bf8c)=>_0x1608cc(_0x28fde3,_0x25bf8c,_0x5ecf53),N=(_0x36c0ac,_0x43e14b,_0x55b3b1)=>K(_0x36c0ac,typeof _0x43e14b!='symbol'?_0x43e14b+'':_0x43e14b,_0x55b3b1);exports[_0x2556b8(0x1d7)]=class extends c[_0x2556b8(0x1ae)]{constructor(_0x45f99f=D,_0x2a73df,_0x4aeb99){const _0x446706=_0x2556b8;super(),this[_0x446706(0x1eb)]=_0x45f99f,this[_0x446706(0x222)]=_0x2a73df,this['_configService']=_0x4aeb99;const {..._0x4f77ab}=c[_0x446706(0x1c5)]({},D,this[_0x446706(0x1eb)]);this[_0x446706(0x217)]['setConfig'](x,_0x4f77ab);}['onStarting'](){const _0x56239c=_0x2556b8;[[f],[b],[S]][_0x56239c(0x21a)](_0x965c03=>{const _0x1cd4d2=_0x56239c;this[_0x1cd4d2(0x222)][_0x1cd4d2(0x1da)](_0x965c03);});}[_0x2556b8(0x1d9)](){const _0x161fd5=_0x2556b8;this['_injector'][_0x161fd5(0x1dc)](b),this[_0x161fd5(0x222)][_0x161fd5(0x1dc)](S);}},N(exports[_0x2556b8(0x1d7)],_0x2556b8(0x21d),R),N(exports[_0x2556b8(0x1d7)],_0x2556b8(0x214),c[_0x2556b8(0x1ed)][_0x2556b8(0x1d8)]),exports['UniverThreadCommentDataSourcePlugin']=V([c[_0x2556b8(0x208)](w[_0x2556b8(0x1b1)],C[_0x2556b8(0x211)],T['UniverLicensePlugin']),y(0x1,c[_0x2556b8(0x1b7)](c['Injector'])),y(0x2,c[_0x2556b8(0x1f7)])],exports[_0x2556b8(0x1d7)]);
1
+ 'use strict';const _0x264128=_0x1bfa;function _0x1bfa(_0x3ebfde,_0x426431){const _0xec3559=_0xec35();return _0x1bfa=function(_0x1bfaa3,_0x56522b){_0x1bfaa3=_0x1bfaa3-0x1e4;let _0x5b1d93=_0xec3559[_0x1bfaa3];return _0x5b1d93;},_0x1bfa(_0x3ebfde,_0x426431);}(function(_0x5dc536,_0x50a95e){const _0x13249f=_0x1bfa,_0x4c81d5=_0x5dc536();while(!![]){try{const _0x5a72a7=parseInt(_0x13249f(0x261))/0x1+-parseInt(_0x13249f(0x207))/0x2*(parseInt(_0x13249f(0x226))/0x3)+parseInt(_0x13249f(0x262))/0x4*(-parseInt(_0x13249f(0x1f6))/0x5)+-parseInt(_0x13249f(0x20d))/0x6+parseInt(_0x13249f(0x1ea))/0x7+-parseInt(_0x13249f(0x212))/0x8*(-parseInt(_0x13249f(0x236))/0x9)+parseInt(_0x13249f(0x23d))/0xa;if(_0x5a72a7===_0x50a95e)break;else _0x4c81d5['push'](_0x4c81d5['shift']());}catch(_0x470ac4){_0x4c81d5['push'](_0x4c81d5['shift']());}}}(_0xec35,0x2a5e8));Object[_0x264128(0x253)](exports,Symbol[_0x264128(0x229)],{'value':_0x264128(0x1e7)});const C=require(_0x264128(0x223)),T=require('@univerjs-pro/license'),c=require(_0x264128(0x1e4)),w=require(_0x264128(0x23e)),P=require(_0x264128(0x233)),U=require(_0x264128(0x257)),M=require(_0x264128(0x1f7)),R=_0x264128(0x21a);var v=(_0x55e035=>(_0x55e035[_0x55e035[_0x264128(0x216)]=0x0]=_0x264128(0x216),_0x55e035[_0x55e035[_0x264128(0x1e6)]=0x1]=_0x264128(0x1e6),_0x55e035[_0x55e035[_0x264128(0x1f3)]=-0x1]=_0x264128(0x1f3),_0x55e035))(v||{}),I=(_0x3cc255=>(_0x3cc255[_0x3cc255[_0x264128(0x200)]=0x0]=_0x264128(0x200),_0x3cc255[_0x3cc255[_0x264128(0x231)]=0x1]=_0x264128(0x231),_0x3cc255[_0x3cc255[_0x264128(0x1fa)]=0x2]='Reply',_0x3cc255[_0x3cc255[_0x264128(0x238)]=0x3]=_0x264128(0x238),_0x3cc255[_0x3cc255[_0x264128(0x252)]=0x4]='Delete',_0x3cc255[_0x3cc255[_0x264128(0x1e9)]=0x5]='Solve',_0x3cc255[_0x3cc255[_0x264128(0x1f3)]=-0x1]=_0x264128(0x1f3),_0x3cc255))(I||{});const g=_0x5f1904=>c[_0x264128(0x1ef)](new Date(+_0x5f1904))['format'](_0x264128(0x258)),$=async(_0x88e75d,_0x2d48e3)=>{const _0x2f3fcb=_0x264128,_0x2fec46=_0x88e75d[_0x2f3fcb(0x213)](c[_0x2f3fcb(0x245)]),_0x1ddf2b=_0x88e75d['get'](M[_0x2f3fcb(0x21b)]);_0x2d48e3[_0x2f3fcb(0x230)](_0x1849da=>{const _0x5dda92=_0x2f3fcb;_0x2fec46[_0x5dda92(0x1f5)](_0x1849da)&&_0x2d48e3[_0x5dda92(0x251)](_0x1849da);}),_0x2d48e3['size']&&(await _0x1ddf2b[_0x2f3fcb(0x213)](_0x2f3fcb(0x220),{'params':{'userIDs':[..._0x2d48e3]}}))[_0x2f3fcb(0x23a)][_0x2f3fcb(0x243)][_0x2f3fcb(0x230)](_0x1f681f=>{const _0x5c30a6=_0x2f3fcb;_0x1f681f&&_0x2fec46[_0x5c30a6(0x1f9)](_0x1f681f);});};var E=Object[_0x264128(0x253)],q=Object[_0x264128(0x202)],A=(_0x11ff91,_0x10ddb8,_0x19d511,_0x555d4f)=>{const _0x157c7f=_0x264128;for(var _0x395d17=_0x555d4f>0x1?void 0x0:_0x555d4f?q(_0x10ddb8,_0x19d511):_0x10ddb8,_0x49fe4c=_0x11ff91[_0x157c7f(0x210)]-0x1,_0x4a83a4;_0x49fe4c>=0x0;_0x49fe4c--)(_0x4a83a4=_0x11ff91[_0x49fe4c])&&(_0x395d17=(_0x555d4f?_0x4a83a4(_0x10ddb8,_0x19d511,_0x395d17):_0x4a83a4(_0x395d17))||_0x395d17);return _0x555d4f&&_0x395d17&&E(_0x10ddb8,_0x19d511,_0x395d17),_0x395d17;},_=(_0x4273f3,_0x21c341)=>(_0x216413,_0x28501d)=>_0x21c341(_0x216413,_0x28501d,_0x4273f3);let S=class extends c[_0x264128(0x260)]{constructor(_0x49c4c3,_0x4616a9,_0x190e5b,_0x2559e7){const _0x10984c=_0x264128;super(),this[_0x10984c(0x24b)]=_0x49c4c3,this[_0x10984c(0x209)]=_0x4616a9,this['_userService']=_0x190e5b,this['_injector']=_0x2559e7,this[_0x10984c(0x225)](),this['_initUserSync']();}[_0x264128(0x244)](){const _0x501004=_0x264128;this[_0x501004(0x1f0)](this[_0x501004(0x209)][_0x501004(0x20b)][_0x501004(0x232)](U['bufferTime'](0x10))['subscribe'](_0x4e0557=>{const _0x48eca1=_0x501004,_0x59e004=new Set();_0x4e0557[_0x48eca1(0x230)](_0x5ed2f7=>{const _0x3ea6f9=_0x48eca1;switch(_0x5ed2f7[_0x3ea6f9(0x239)]){case _0x3ea6f9(0x204):{const _0x1f6eb7=_0x5ed2f7[_0x3ea6f9(0x24d)][_0x3ea6f9(0x23b)];_0x59e004[_0x3ea6f9(0x204)](_0x1f6eb7);break;}}}),$(this[_0x48eca1(0x20e)],_0x59e004);}));}[_0x264128(0x225)](){const _0x1ed28a=_0x264128;this[_0x1ed28a(0x1f0)](this['_commentService']['commentUpdate$'][_0x1ed28a(0x21e)](async _0x4e3398=>{const _0x4c11cf=_0x1ed28a;var _0x5d9cf1,_0x14fe5d,_0x1d9d4a,_0xb2f440;const _0x3881ba=(_0x5d9cf1=this[_0x4c11cf(0x209)][_0x4c11cf(0x218)](_0x4e3398['unitId'])[_0x4c11cf(0x254)](_0xb7c279=>_0xb7c279['threadId']===_0x4e3398[_0x4c11cf(0x25b)]))==null?void 0x0:_0x5d9cf1[_0x4c11cf(0x1fe)];if(!_0x3881ba)return;const {unitId:_0x1c78fd,subUnitId:_0x1657b9}=_0x3881ba;switch(_0x4e3398[_0x4c11cf(0x24c)]&&this['_userService']['addUser'](_0x4e3398[_0x4c11cf(0x24c)]),_0x4e3398[_0x4c11cf(0x239)]){case I[_0x4c11cf(0x231)]:break;case I['Reply']:{this[_0x4c11cf(0x209)]['addComment'](_0x1c78fd,_0x1657b9,{'unitId':_0x1c78fd,'subUnitId':_0x1657b9,'ref':'','id':_0x4e3398[_0x4c11cf(0x24a)],'dT':g(+_0x4e3398[_0x4c11cf(0x23f)]),'threadId':_0x4e3398[_0x4c11cf(0x25b)],'personId':(_0x1d9d4a=(_0x14fe5d=_0x4e3398['user'])==null?void 0x0:_0x14fe5d['userID'])!=null?_0x1d9d4a:_0x4e3398[_0x4c11cf(0x214)],'text':JSON[_0x4c11cf(0x205)](_0x4e3398[_0x4c11cf(0x1eb)]),'parentId':_0x3881ba['id']});break;}case I[_0x4c11cf(0x252)]:{const _0x3c9157=this[_0x4c11cf(0x209)][_0x4c11cf(0x22b)](_0x1c78fd,_0x1657b9,_0x4e3398[_0x4c11cf(0x24a)]);_0x3c9157&&_0x3c9157[_0x4c11cf(0x22a)]&&this['_threadCommentModel'][_0x4c11cf(0x22e)](_0x1c78fd,_0x1657b9,_0x4e3398[_0x4c11cf(0x24a)]);break;}case I[_0x4c11cf(0x238)]:{this[_0x4c11cf(0x209)][_0x4c11cf(0x25a)](_0x1c78fd,_0x1657b9,{'commentId':_0x4e3398[_0x4c11cf(0x24a)],'text':JSON[_0x4c11cf(0x205)](_0x4e3398[_0x4c11cf(0x1eb)])});break;}case I[_0x4c11cf(0x1e9)]:{const _0x488431=(_0xb2f440=this[_0x4c11cf(0x209)]['getUnit'](_0x4e3398['unitId'])[_0x4c11cf(0x254)](_0x12eb6f=>_0x12eb6f[_0x4c11cf(0x25b)]===_0x4e3398[_0x4c11cf(0x25b)]))==null?void 0x0:_0xb2f440[_0x4c11cf(0x1fe)];_0x488431&&this[_0x4c11cf(0x209)][_0x4c11cf(0x20a)](_0x1c78fd,_0x1657b9,_0x488431['id'],_0x4e3398['solved']===v['Solved']);break;}}}));}};S=A([_(0x0,c['Inject'](C[_0x264128(0x211)])),_(0x1,c[_0x264128(0x22c)](P['ThreadCommentModel'])),_(0x2,c[_0x264128(0x22c)](c[_0x264128(0x245)])),_(0x3,c['Inject'](c[_0x264128(0x240)]))],S);const x=_0x264128(0x25d),D={};function _0xec35(){const _0x1627a8=['_configService','Solved','Module','CollaborationSessionService','Solve','2211370fdDBId','content','post','_userService','/list','dayjs','disposeWithMe','/delete','_config','UNRECOGNIZED','listComments','getUser','25eRNQqr','@univerjs/network','merge','addUser','Reply','rangeId','slice','requireSession','root','CustomRangeType','Unknown','_threadCommentDataSourceService','getOwnPropertyDescriptor','ref','add','parse','error','5852jNgaEz','symbol','_threadCommentModel','resolveComment','commentUpdate$','replies','960216IxiiCC','_injector','map','length','CommentService','674704TGnnrf','get','userId','setConfig','OpenOrReOpen','addComment','getUnit','onReady','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','HTTPService','/edit','UniverThreadCommentDataSourcePlugin','subscribe','_httpService','/universer-api/user/list','syncUpdateMutationToColla','customRanges','@univerjs-pro/collaboration-client','getCurrentUser','_init','258nZSoVg','rangeType','getMemberID','toStringTag','parentId','getComment','Inject','dataSource','deleteComment','/add','forEach','Add','pipe','@univerjs/thread-comment','_threadCommentDataSource','values','9buPpgR','UniverCollaborationClientPlugin','Edit','type','body','personId','/reply','885650hGRdJA','@univerjs/thread-comment-ui','createTimestamp','Injector','UniverInstanceType','code','users','_initUserSync','UserManagerService','resolved','reply','saveCommentToSnapshot','/solved','replyId','_commentService','user','payload','solved','UniverLicensePlugin','/universer-api/comment/unit/','delete','Delete','defineProperty','find','_initDataSource','IThreadCommentDataSourceService','rxjs','YYYY/MM/DD\x20HH:mm','IConfigService','updateComment','threadId','filter','thread-comment-data-source.config','UniverThreadCommentUIPlugin','stringify','Disposable','175173DTyFwW','63016vowHQz','_sessionService','@univerjs/core'];_0xec35=function(){return _0x1627a8;};return _0xec35();}var Y=Object['defineProperty'],G=Object[_0x264128(0x202)],H=(_0x5e8d53,_0xc34383,_0x4ca369,_0x340322)=>{const _0x279c5e=_0x264128;for(var _0x41a1c9=_0x340322>0x1?void 0x0:_0x340322?G(_0xc34383,_0x4ca369):_0xc34383,_0x283973=_0x5e8d53[_0x279c5e(0x210)]-0x1,_0x35a4d3;_0x283973>=0x0;_0x283973--)(_0x35a4d3=_0x5e8d53[_0x283973])&&(_0x41a1c9=(_0x340322?_0x35a4d3(_0xc34383,_0x4ca369,_0x41a1c9):_0x35a4d3(_0x41a1c9))||_0x41a1c9);return _0x340322&&_0x41a1c9&&Y(_0xc34383,_0x4ca369,_0x41a1c9),_0x41a1c9;},p=(_0x1827a4,_0x53c697)=>(_0x3aec19,_0x52c147)=>_0x53c697(_0x3aec19,_0x52c147,_0x1827a4);function J(_0x43dd18,_0x247f66){const _0x31e147=_0x264128,_0x208190=_0x43dd18['replies'][0x0];return{..._0x247f66,'id':_0x208190[_0x31e147(0x24a)],'resolved':_0x43dd18[_0x31e147(0x24e)]===0x1,'dT':g(_0x208190['createTimestamp']),'personId':_0x208190[_0x31e147(0x214)],'threadId':_0x208190[_0x31e147(0x25b)]};}function F(_0x1bb017,_0x219841,_0x4ff604){const _0x6853f=_0x264128;var _0x4037f7,_0x8d9cf4;if(((_0x8d9cf4=(_0x4037f7=_0x1bb017==null?void 0x0:_0x1bb017[_0x6853f(0x20c)])==null?void 0x0:_0x4037f7[_0x6853f(0x210)])!=null?_0x8d9cf4:0x0)>0x0){const _0x199534=(_0x2df837,_0x1bdd55)=>({'id':_0x2df837['replyId'],'threadId':_0x2df837[_0x6853f(0x25b)],'dT':g(_0x2df837[_0x6853f(0x23f)]),'personId':_0x2df837[_0x6853f(0x214)],'resolved':_0x1bb017['solved']===v['Solved'],'unitId':_0x219841,'subUnitId':_0x4ff604,'text':JSON[_0x6853f(0x205)](_0x2df837[_0x6853f(0x1eb)]),'parentId':_0x1bdd55}),_0x517e4e=_0x199534(_0x1bb017[_0x6853f(0x20c)][0x0]);return{..._0x517e4e,'children':_0x1bb017[_0x6853f(0x20c)][_0x6853f(0x1fc)](0x1)[_0x6853f(0x20f)](_0x486b58=>_0x199534(_0x486b58,_0x517e4e['id']))};}return null;}let f=class{constructor(_0x2743a1,_0x19fbe7,_0x38463e,_0x196b79){const _0x55ca38=_0x264128;this[_0x55ca38(0x21f)]=_0x2743a1,this[_0x55ca38(0x1ed)]=_0x19fbe7,this[_0x55ca38(0x263)]=_0x38463e,this[_0x55ca38(0x20e)]=_0x196b79;}async[_0x264128(0x217)](_0x23e953){const _0x345621=_0x264128;var _0x26275a,_0x93bbae;const {parentId:_0x561b41,unitId:_0x2e4611,text:_0xa0f32f,threadId:_0x1ee63b}=_0x23e953,_0x5cc653=(_0x93bbae=(_0x26275a=_0xa0f32f[_0x345621(0x222)])==null?void 0x0:_0x26275a[_0x345621(0x25c)](_0x5d2395=>_0x5d2395[_0x345621(0x227)]===c[_0x345621(0x1ff)]['COMMENT'])[_0x345621(0x20f)](_0x522c82=>_0x522c82['rangeId']))!=null?_0x93bbae:[],_0x21c5c4=JSON[_0x345621(0x25f)](_0xa0f32f),_0x593c19=(await this[_0x345621(0x263)][_0x345621(0x1fd)](_0x2e4611))[_0x345621(0x228)]();if(_0x561b41){const _0x21041b={'memberId':_0x593c19,'unitId':_0x2e4611,'content':_0x21c5c4,'mention':_0x5cc653,'threadId':_0x1ee63b},_0x43ff8a=(await this[_0x345621(0x21f)][_0x345621(0x1ec)](_0x345621(0x250)+_0x2e4611+_0x345621(0x23c),{'body':_0x21041b}))[_0x345621(0x23a)][_0x345621(0x247)];return{..._0x23e953,'id':_0x43ff8a['replyId'],'dT':c[_0x345621(0x1ef)](+_0x43ff8a[_0x345621(0x23f)])['format'](_0x345621(0x258)),'personId':_0x43ff8a[_0x345621(0x214)]};}else{const _0x854d80={'memberId':_0x593c19,'unitId':_0x2e4611,'content':_0x21c5c4,'mention':_0x5cc653},_0x4e7426=await this[_0x345621(0x21f)][_0x345621(0x1ec)]('/universer-api/comment/unit/'+_0x2e4611+_0x345621(0x22f),{'body':_0x854d80});return J(_0x4e7426[_0x345621(0x23a)]['comment'],_0x23e953);}}async[_0x264128(0x25a)](_0x1e92ec){const _0x328864=_0x264128;var _0x56c3d8,_0xa932d7;const {text:_0x47ce5f,unitId:_0xe08b19}=_0x1e92ec,_0x26d83a=(_0xa932d7=(_0x56c3d8=_0x47ce5f[_0x328864(0x222)])==null?void 0x0:_0x56c3d8[_0x328864(0x25c)](_0x4dd124=>_0x4dd124['rangeType']===c[_0x328864(0x1ff)]['COMMENT'])[_0x328864(0x20f)](_0xdf96c1=>_0xdf96c1[_0x328864(0x1fb)]))!=null?_0xa932d7:[],_0x31f2dd=JSON[_0x328864(0x25f)](_0x47ce5f),_0x102bf0=_0x1e92ec['threadId'],_0x4876a0=_0x1e92ec['id'],_0x44a372={'memberId':(await this['_sessionService'][_0x328864(0x1fd)](_0xe08b19))[_0x328864(0x228)](),'unitId':_0xe08b19,'threadId':_0x102bf0,'mention':_0x26d83a,'content':_0x31f2dd,'replyId':_0x4876a0},_0x405a1f=await this[_0x328864(0x21f)][_0x328864(0x1ec)]('/universer-api/comment/unit/'+_0xe08b19+_0x328864(0x21c),{'body':_0x44a372});return!_0x405a1f['body'][_0x328864(0x206)]||_0x405a1f[_0x328864(0x23a)][_0x328864(0x206)][_0x328864(0x242)]===0x1;}async[_0x264128(0x20a)](_0x52cde0){const _0x36318c=_0x264128,{unitId:_0x812a4a}=_0x52cde0,_0x391f20=_0x52cde0[_0x36318c(0x25b)],_0x12eac4={'memberId':this[_0x36318c(0x1ed)][_0x36318c(0x224)]()['userID'],'unitId':_0x812a4a,'threadId':_0x391f20,'solved':_0x52cde0[_0x36318c(0x246)]?v[_0x36318c(0x1e6)]:v[_0x36318c(0x216)]},_0x2c98fd=await this[_0x36318c(0x21f)][_0x36318c(0x1ec)](_0x36318c(0x250)+_0x812a4a+_0x36318c(0x249),{'body':_0x12eac4});return!_0x2c98fd[_0x36318c(0x23a)][_0x36318c(0x206)]||_0x2c98fd[_0x36318c(0x23a)]['error'][_0x36318c(0x242)]===0x1;}async[_0x264128(0x22e)](_0x323cec,_0x31b00b,_0x1d6d96,_0x4dd761){const _0x407441=_0x264128,_0x3be16f={'memberId':(await this[_0x407441(0x263)][_0x407441(0x1fd)](_0x323cec))[_0x407441(0x228)](),'threadId':_0x1d6d96,'replyId':_0x4dd761,'unitId':_0x323cec},_0x32fae6=await this[_0x407441(0x21f)][_0x407441(0x1ec)](_0x407441(0x250)+_0x323cec+_0x407441(0x1f1),{'body':_0x3be16f});return!_0x32fae6[_0x407441(0x23a)][_0x407441(0x206)]||_0x32fae6[_0x407441(0x23a)][_0x407441(0x206)][_0x407441(0x242)]===0x1;}async[_0x264128(0x1f4)](_0x2ea52e,_0x11d580,_0x5a8141){const _0x368701=_0x264128,_0x3636da={'unitId':_0x2ea52e,'threadId':_0x5a8141},_0x5c4c90=await this[_0x368701(0x21f)][_0x368701(0x1ec)](_0x368701(0x250)+_0x2ea52e+_0x368701(0x1ee),{'body':_0x3636da}),_0x51f083=_0x5a8141[_0x368701(0x20f)](_0x5a9c63=>F(_0x5c4c90[_0x368701(0x23a)]['comments'][_0x5a9c63],_0x2ea52e,_0x11d580))[_0x368701(0x25c)](Boolean);return Object[_0x368701(0x235)](_0x5c4c90[_0x368701(0x23a)][_0x368701(0x243)])['forEach'](_0x29918f=>{const _0x20719a=_0x368701;this[_0x20719a(0x1ed)][_0x20719a(0x1f9)](_0x29918f);}),_0x51f083;}[_0x264128(0x248)](_0xef549c){const _0x2be4ad=_0x264128;return{'id':_0xef549c['id'],'threadId':_0xef549c[_0x2be4ad(0x25b)],'ref':_0xef549c[_0x2be4ad(0x203)]};}};f=H([p(0x0,c[_0x264128(0x22c)](M[_0x264128(0x21b)])),p(0x1,c['Inject'](c['UserManagerService'])),p(0x2,c[_0x264128(0x22c)](C[_0x264128(0x1e8)])),p(0x3,c[_0x264128(0x22c)](c[_0x264128(0x240)]))],f);var L=Object[_0x264128(0x253)],Z=Object[_0x264128(0x202)],W=(_0x27c13d,_0xb4aa6f,_0x14325a,_0x23e88d)=>{for(var _0x55db23=_0x23e88d>0x1?void 0x0:_0x23e88d?Z(_0xb4aa6f,_0x14325a):_0xb4aa6f,_0x274d8d=_0x27c13d['length']-0x1,_0x52cd1f;_0x274d8d>=0x0;_0x274d8d--)(_0x52cd1f=_0x27c13d[_0x274d8d])&&(_0x55db23=(_0x23e88d?_0x52cd1f(_0xb4aa6f,_0x14325a,_0x55db23):_0x52cd1f(_0x55db23))||_0x55db23);return _0x23e88d&&_0x55db23&&L(_0xb4aa6f,_0x14325a,_0x55db23),_0x55db23;},O=(_0xb11316,_0x46cfe1)=>(_0x20ae6f,_0x26a140)=>_0x46cfe1(_0x20ae6f,_0x26a140,_0xb11316);let b=class extends c[_0x264128(0x260)]{constructor(_0x400d1d,_0x256c9b){const _0x42319a=_0x264128;super(),this[_0x42319a(0x201)]=_0x400d1d,this['_threadCommentDataSource']=_0x256c9b,this[_0x42319a(0x255)]();}[_0x264128(0x255)](){const _0x44580e=_0x264128;this[_0x44580e(0x201)][_0x44580e(0x22d)]=this[_0x44580e(0x234)],this[_0x44580e(0x201)][_0x44580e(0x221)]=!0x1;}};b=W([O(0x0,P[_0x264128(0x256)]),O(0x1,c['Inject'](f))],b);var j=Object[_0x264128(0x253)],B=Object[_0x264128(0x202)],K=(_0xa5091f,_0x3c5778,_0x4e3b9b)=>_0x3c5778 in _0xa5091f?j(_0xa5091f,_0x3c5778,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4e3b9b}):_0xa5091f[_0x3c5778]=_0x4e3b9b,V=(_0x28e525,_0x49c6c9,_0x581081,_0x4224cf)=>{const _0x429c26=_0x264128;for(var _0x377a88=_0x4224cf>0x1?void 0x0:_0x4224cf?B(_0x49c6c9,_0x581081):_0x49c6c9,_0x675e13=_0x28e525[_0x429c26(0x210)]-0x1,_0x185220;_0x675e13>=0x0;_0x675e13--)(_0x185220=_0x28e525[_0x675e13])&&(_0x377a88=(_0x4224cf?_0x185220(_0x49c6c9,_0x581081,_0x377a88):_0x185220(_0x377a88))||_0x377a88);return _0x4224cf&&_0x377a88&&j(_0x49c6c9,_0x581081,_0x377a88),_0x377a88;},y=(_0x54355b,_0x181e0a)=>(_0x34796c,_0x5e77d5)=>_0x181e0a(_0x34796c,_0x5e77d5,_0x54355b),N=(_0x263f74,_0x1cab57,_0x2bf29b)=>K(_0x263f74,typeof _0x1cab57!=_0x264128(0x208)?_0x1cab57+'':_0x1cab57,_0x2bf29b);exports[_0x264128(0x21d)]=class extends c['Plugin']{constructor(_0x501ed8=D,_0x56f806,_0x418c38){const _0x255091=_0x264128;super(),this[_0x255091(0x1f2)]=_0x501ed8,this[_0x255091(0x20e)]=_0x56f806,this[_0x255091(0x1e5)]=_0x418c38;const {..._0x426342}=c[_0x255091(0x1f8)]({},D,this[_0x255091(0x1f2)]);this['_configService'][_0x255091(0x215)](x,_0x426342);}['onStarting'](){[[f],[b],[S]]['forEach'](_0x41ca60=>{const _0x1ac8dd=_0x1bfa;this[_0x1ac8dd(0x20e)][_0x1ac8dd(0x204)](_0x41ca60);});}[_0x264128(0x219)](){const _0x5ba4a5=_0x264128;this[_0x5ba4a5(0x20e)][_0x5ba4a5(0x213)](b),this[_0x5ba4a5(0x20e)]['get'](S);}},N(exports[_0x264128(0x21d)],'pluginName',R),N(exports[_0x264128(0x21d)],_0x264128(0x239),c[_0x264128(0x241)]['UNIVER_UNKNOWN']),exports[_0x264128(0x21d)]=V([c['DependentOn'](w[_0x264128(0x25e)],C[_0x264128(0x237)],T[_0x264128(0x24f)]),y(0x1,c[_0x264128(0x22c)](c[_0x264128(0x240)])),y(0x2,c[_0x264128(0x259)])],exports[_0x264128(0x21d)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x49a43c=_0x9690;(function(_0x2b01e8,_0x5843fb){const _0x676c49=_0x9690,_0x109221=_0x2b01e8();while(!![]){try{const _0x178de6=-parseInt(_0x676c49(0x1aa))/0x1+-parseInt(_0x676c49(0x183))/0x2*(parseInt(_0x676c49(0x1d4))/0x3)+-parseInt(_0x676c49(0x19a))/0x4*(-parseInt(_0x676c49(0x1c9))/0x5)+-parseInt(_0x676c49(0x1cb))/0x6*(parseInt(_0x676c49(0x1d9))/0x7)+-parseInt(_0x676c49(0x19f))/0x8+-parseInt(_0x676c49(0x1d1))/0x9+parseInt(_0x676c49(0x17f))/0xa;if(_0x178de6===_0x5843fb)break;else _0x109221['push'](_0x109221['shift']());}catch(_0x3b9878){_0x109221['push'](_0x109221['shift']());}}}(_0xeb68,0x8b680));import{CommentService as _0x23b448,CollaborationSessionService as _0x46fd22,UniverCollaborationClientPlugin as _0x192a75}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2e972a}from'@univerjs-pro/license';import{dayjs as _0x5828b6,UserManagerService as _0x21a274,Inject as _0x1ece54,Injector as _0x2e703f,Disposable as _0x2599c0,CustomRangeType as _0x29e93f,UniverInstanceType as _0x1c4ab6,DependentOn as _0x2312d9,Plugin as _0x515e41,merge as _0xae27d9,IConfigService as _0x597de3}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x54a460}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2acc31,IThreadCommentDataSourceService as _0x5c11c1}from'@univerjs/thread-comment';import{bufferTime as _0x59e321}from'rxjs';import{HTTPService as _0x2731d6}from'@univerjs/network';const B=_0x49a43c(0x195);function _0x9690(_0x2452d0,_0x1dc44c){const _0xeb6850=_0xeb68();return _0x9690=function(_0x96907f,_0x7ea2e7){_0x96907f=_0x96907f-0x176;let _0x2146b6=_0xeb6850[_0x96907f];return _0x2146b6;},_0x9690(_0x2452d0,_0x1dc44c);}function _0xeb68(){const _0x6a8991=['/universer-api/user/list','onStarting','user','content','Add','1092163SzMvtW','Solved','Delete','slice','thread-comment-data-source.config','find','delete','createTimestamp','UNRECOGNIZED','Edit','_sessionService','YYYY/MM/DD\x20HH:mm','/edit','userId','ref','unitId','getUser','_userService','_threadCommentModel','resolved','root','filter','map','getOwnPropertyDescriptor','rangeType','subscribe','threadId','users','body','setConfig','code','65ZSwVka','parse','114uyvfIU','getUnit','COMMENT','dataSource','onReady','_commentService','4188393RPgvVI','/delete','/add','418428vfjapf','comment','length','replyId','personId','55489KJkNrc','solved','_httpService','replies','stringify','updateComment','disposeWithMe','_initDataSource','pluginName','format','/universer-api/comment/unit/','_initUserSync','38578290mFDUuj','userID','listComments','get','14UXMmgH','OpenOrReOpen','_threadCommentDataSourceService','rangeId','commentUpdate$','comments','symbol','error','Unknown','post','_threadCommentDataSource','deleteComment','/reply','Solve','_injector','customRanges','size','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','resolveComment','/list','addUser','39436PLUzbz','Reply','add','_config','_configService','5844024typqxV','requireSession','type','defineProperty','_init','getCurrentUser'];_0xeb68=function(){return _0x6a8991;};return _0xeb68();}var v=(_0x4e8ba6=>(_0x4e8ba6[_0x4e8ba6[_0x49a43c(0x184)]=0x0]='OpenOrReOpen',_0x4e8ba6[_0x4e8ba6[_0x49a43c(0x1ab)]=0x1]=_0x49a43c(0x1ab),_0x4e8ba6[_0x4e8ba6[_0x49a43c(0x1b2)]=-0x1]=_0x49a43c(0x1b2),_0x4e8ba6))(v||{}),p=(_0x374bea=>(_0x374bea[_0x374bea[_0x49a43c(0x18b)]=0x0]='Unknown',_0x374bea[_0x374bea[_0x49a43c(0x1a9)]=0x1]=_0x49a43c(0x1a9),_0x374bea[_0x374bea[_0x49a43c(0x19b)]=0x2]=_0x49a43c(0x19b),_0x374bea[_0x374bea['Edit']=0x3]='Edit',_0x374bea[_0x374bea[_0x49a43c(0x1ac)]=0x4]=_0x49a43c(0x1ac),_0x374bea[_0x374bea['Solve']=0x5]=_0x49a43c(0x190),_0x374bea[_0x374bea['UNRECOGNIZED']=-0x1]=_0x49a43c(0x1b2),_0x374bea))(p||{});const O=_0x16fd64=>_0x5828b6(new Date(+_0x16fd64))[_0x49a43c(0x17c)]('YYYY/MM/DD\x20HH:mm'),K=async(_0x8a5188,_0x502646)=>{const _0xcca3bb=_0x49a43c,_0x473bfa=_0x8a5188['get'](_0x21a274),_0x28ced9=_0x8a5188[_0xcca3bb(0x182)](_0x2731d6);_0x502646[_0xcca3bb(0x194)](_0x5c3904=>{const _0x2d5b15=_0xcca3bb;_0x473bfa[_0x2d5b15(0x1ba)](_0x5c3904)&&_0x502646[_0x2d5b15(0x1b0)](_0x5c3904);}),_0x502646[_0xcca3bb(0x193)]&&(await _0x28ced9[_0xcca3bb(0x182)](_0xcca3bb(0x1a5),{'params':{'userIDs':[..._0x502646]}}))[_0xcca3bb(0x1c6)][_0xcca3bb(0x1c5)][_0xcca3bb(0x194)](_0xa8b9f3=>{const _0x528cd3=_0xcca3bb;_0xa8b9f3&&_0x473bfa[_0x528cd3(0x199)](_0xa8b9f3);});};var V=Object[_0x49a43c(0x1a2)],z=Object[_0x49a43c(0x1c1)],Q=(_0x46f9bf,_0x8142e7,_0x9d8ced,_0x49d523)=>{const _0x25e520=_0x49a43c;for(var _0x549f84=_0x49d523>0x1?void 0x0:_0x49d523?z(_0x8142e7,_0x9d8ced):_0x8142e7,_0x4fa447=_0x46f9bf[_0x25e520(0x1d6)]-0x1,_0x52d49e;_0x4fa447>=0x0;_0x4fa447--)(_0x52d49e=_0x46f9bf[_0x4fa447])&&(_0x549f84=(_0x49d523?_0x52d49e(_0x8142e7,_0x9d8ced,_0x549f84):_0x52d49e(_0x549f84))||_0x549f84);return _0x49d523&&_0x549f84&&V(_0x8142e7,_0x9d8ced,_0x549f84),_0x549f84;},_=(_0x520715,_0x8341b6)=>(_0x2b9058,_0x271b7a)=>_0x8341b6(_0x2b9058,_0x271b7a,_0x520715);let f=class extends _0x2599c0{constructor(_0x11191f,_0xe47969,_0x551968,_0x23999c){const _0x30528d=_0x49a43c;super(),this[_0x30528d(0x1d0)]=_0x11191f,this[_0x30528d(0x1bc)]=_0xe47969,this['_userService']=_0x551968,this['_injector']=_0x23999c,this[_0x30528d(0x1a3)](),this[_0x30528d(0x17e)]();}['_initUserSync'](){const _0x16afbb=_0x49a43c;this[_0x16afbb(0x179)](this[_0x16afbb(0x1bc)][_0x16afbb(0x187)]['pipe'](_0x59e321(0x10))['subscribe'](_0x519fae=>{const _0x4fb04a=_0x16afbb,_0x4d1b03=new Set();_0x519fae['forEach'](_0x428849=>{const _0x4549bf=_0x9690;switch(_0x428849[_0x4549bf(0x1a1)]){case _0x4549bf(0x19c):{const _0x29a28e=_0x428849['payload'][_0x4549bf(0x1d8)];_0x4d1b03[_0x4549bf(0x19c)](_0x29a28e);break;}}}),K(this[_0x4fb04a(0x191)],_0x4d1b03);}));}[_0x49a43c(0x1a3)](){const _0x4e4d07=_0x49a43c;this['disposeWithMe'](this[_0x4e4d07(0x1d0)]['commentUpdate$'][_0x4e4d07(0x1c3)](async _0x4a2b3e=>{const _0x550d7f=_0x4e4d07;var _0x31c451,_0x3d3ea6,_0xd2c1cd,_0xf5ffa7;const _0xbb3fd=(_0x31c451=this[_0x550d7f(0x1bc)][_0x550d7f(0x1cc)](_0x4a2b3e['unitId'])[_0x550d7f(0x1af)](_0x286dd5=>_0x286dd5[_0x550d7f(0x1c4)]===_0x4a2b3e[_0x550d7f(0x1c4)]))==null?void 0x0:_0x31c451['root'];if(!_0xbb3fd)return;const {unitId:_0x20ab2d,subUnitId:_0x468198}=_0xbb3fd;switch(_0x4a2b3e[_0x550d7f(0x1a7)]&&this[_0x550d7f(0x1bb)][_0x550d7f(0x199)](_0x4a2b3e[_0x550d7f(0x1a7)]),_0x4a2b3e['type']){case p[_0x550d7f(0x1a9)]:break;case p[_0x550d7f(0x19b)]:{this[_0x550d7f(0x1bc)]['addComment'](_0x20ab2d,_0x468198,{'unitId':_0x20ab2d,'subUnitId':_0x468198,'ref':'','id':_0x4a2b3e[_0x550d7f(0x1d7)],'dT':O(+_0x4a2b3e['createTimestamp']),'threadId':_0x4a2b3e[_0x550d7f(0x1c4)],'personId':(_0xd2c1cd=(_0x3d3ea6=_0x4a2b3e[_0x550d7f(0x1a7)])==null?void 0x0:_0x3d3ea6['userID'])!=null?_0xd2c1cd:_0x4a2b3e[_0x550d7f(0x1b7)],'text':JSON['parse'](_0x4a2b3e[_0x550d7f(0x1a8)]),'parentId':_0xbb3fd['id']});break;}case p[_0x550d7f(0x1ac)]:{const _0x24a774=this[_0x550d7f(0x1bc)]['getComment'](_0x20ab2d,_0x468198,_0x4a2b3e[_0x550d7f(0x1d7)]);_0x24a774&&_0x24a774['parentId']&&this[_0x550d7f(0x1bc)][_0x550d7f(0x18e)](_0x20ab2d,_0x468198,_0x4a2b3e[_0x550d7f(0x1d7)]);break;}case p[_0x550d7f(0x1b3)]:{this[_0x550d7f(0x1bc)][_0x550d7f(0x178)](_0x20ab2d,_0x468198,{'commentId':_0x4a2b3e[_0x550d7f(0x1d7)],'text':JSON[_0x550d7f(0x1ca)](_0x4a2b3e[_0x550d7f(0x1a8)])});break;}case p[_0x550d7f(0x190)]:{const _0x97a19f=(_0xf5ffa7=this[_0x550d7f(0x1bc)][_0x550d7f(0x1cc)](_0x4a2b3e[_0x550d7f(0x1b9)])[_0x550d7f(0x1af)](_0x366f61=>_0x366f61[_0x550d7f(0x1c4)]===_0x4a2b3e[_0x550d7f(0x1c4)]))==null?void 0x0:_0xf5ffa7[_0x550d7f(0x1be)];_0x97a19f&&this[_0x550d7f(0x1bc)][_0x550d7f(0x197)](_0x20ab2d,_0x468198,_0x97a19f['id'],_0x4a2b3e[_0x550d7f(0x1da)]===v[_0x550d7f(0x1ab)]);break;}}}));}};f=Q([_(0x0,_0x1ece54(_0x23b448)),_(0x1,_0x1ece54(_0x2acc31)),_(0x2,_0x1ece54(_0x21a274)),_(0x3,_0x1ece54(_0x2e703f))],f);const X=_0x49a43c(0x1ae),P={};var k=Object[_0x49a43c(0x1a2)],ee=Object['getOwnPropertyDescriptor'],re=(_0x1b0a59,_0x48d557,_0x1bd142,_0xf77e03)=>{const _0x24cd14=_0x49a43c;for(var _0x3bdb30=_0xf77e03>0x1?void 0x0:_0xf77e03?ee(_0x48d557,_0x1bd142):_0x48d557,_0x2fc757=_0x1b0a59[_0x24cd14(0x1d6)]-0x1,_0x671b48;_0x2fc757>=0x0;_0x2fc757--)(_0x671b48=_0x1b0a59[_0x2fc757])&&(_0x3bdb30=(_0xf77e03?_0x671b48(_0x48d557,_0x1bd142,_0x3bdb30):_0x671b48(_0x3bdb30))||_0x3bdb30);return _0xf77e03&&_0x3bdb30&&k(_0x48d557,_0x1bd142,_0x3bdb30),_0x3bdb30;},I=(_0x2040e7,_0x14d6cb)=>(_0x278bb9,_0x3d923e)=>_0x14d6cb(_0x278bb9,_0x3d923e,_0x2040e7);function te(_0x3a5b42,_0x2054ad){const _0x2ad0f3=_0x49a43c,_0x28cb15=_0x3a5b42['replies'][0x0];return{..._0x2054ad,'id':_0x28cb15['replyId'],'resolved':_0x3a5b42[_0x2ad0f3(0x1da)]===0x1,'dT':O(_0x28cb15['createTimestamp']),'personId':_0x28cb15['userId'],'threadId':_0x28cb15[_0x2ad0f3(0x1c4)]};}function se(_0x33556d,_0x577371,_0x5730ea){const _0xd17a4f=_0x49a43c;var _0x41d62d,_0x15004a;if(((_0x15004a=(_0x41d62d=_0x33556d==null?void 0x0:_0x33556d[_0xd17a4f(0x176)])==null?void 0x0:_0x41d62d[_0xd17a4f(0x1d6)])!=null?_0x15004a:0x0)>0x0){const _0x3dd3d4=(_0x5364ac,_0x33f65c)=>({'id':_0x5364ac[_0xd17a4f(0x1d7)],'threadId':_0x5364ac['threadId'],'dT':O(_0x5364ac[_0xd17a4f(0x1b1)]),'personId':_0x5364ac[_0xd17a4f(0x1b7)],'resolved':_0x33556d[_0xd17a4f(0x1da)]===v[_0xd17a4f(0x1ab)],'unitId':_0x577371,'subUnitId':_0x5730ea,'text':JSON[_0xd17a4f(0x1ca)](_0x5364ac[_0xd17a4f(0x1a8)]),'parentId':_0x33f65c}),_0x47459d=_0x3dd3d4(_0x33556d['replies'][0x0]);return{..._0x47459d,'children':_0x33556d['replies'][_0xd17a4f(0x1ad)](0x1)[_0xd17a4f(0x1c0)](_0x153a37=>_0x3dd3d4(_0x153a37,_0x47459d['id']))};}return null;}let S=class{constructor(_0xf7d4bb,_0x12cb1b,_0x1adfac,_0x3a11a4){const _0x55beac=_0x49a43c;this[_0x55beac(0x1db)]=_0xf7d4bb,this[_0x55beac(0x1bb)]=_0x12cb1b,this['_sessionService']=_0x1adfac,this[_0x55beac(0x191)]=_0x3a11a4;}async['addComment'](_0x556818){const _0x179109=_0x49a43c;var _0x4ab0d3,_0x8ebbe7;const {parentId:_0x21a265,unitId:_0x1826ff,text:_0x219fc5,threadId:_0x2cbbb1}=_0x556818,_0x2f0f2e=(_0x8ebbe7=(_0x4ab0d3=_0x219fc5[_0x179109(0x192)])==null?void 0x0:_0x4ab0d3['filter'](_0x26b1a9=>_0x26b1a9[_0x179109(0x1c2)]===_0x29e93f[_0x179109(0x1cd)])[_0x179109(0x1c0)](_0x65aab4=>_0x65aab4[_0x179109(0x186)]))!=null?_0x8ebbe7:[],_0x5d6d63=JSON[_0x179109(0x177)](_0x219fc5),_0x2f92a0=(await this[_0x179109(0x1b4)][_0x179109(0x1a0)](_0x1826ff))['getMemberID']();if(_0x21a265){const _0x33764b={'memberId':_0x2f92a0,'unitId':_0x1826ff,'content':_0x5d6d63,'mention':_0x2f0f2e,'threadId':_0x2cbbb1},_0x455159=(await this['_httpService'][_0x179109(0x18c)](_0x179109(0x17d)+_0x1826ff+_0x179109(0x18f),{'body':_0x33764b}))[_0x179109(0x1c6)]['reply'];return{..._0x556818,'id':_0x455159[_0x179109(0x1d7)],'dT':_0x5828b6(+_0x455159['createTimestamp'])[_0x179109(0x17c)](_0x179109(0x1b5)),'personId':_0x455159[_0x179109(0x1b7)]};}else{const _0xeb0482={'memberId':_0x2f92a0,'unitId':_0x1826ff,'content':_0x5d6d63,'mention':_0x2f0f2e},_0x33f1de=await this[_0x179109(0x1db)][_0x179109(0x18c)](_0x179109(0x17d)+_0x1826ff+_0x179109(0x1d3),{'body':_0xeb0482});return te(_0x33f1de[_0x179109(0x1c6)][_0x179109(0x1d5)],_0x556818);}}async[_0x49a43c(0x178)](_0xf6cbf1){const _0x2152e0=_0x49a43c;var _0x1b5627,_0x49a654;const {text:_0x91e25a,unitId:_0x14d1ea}=_0xf6cbf1,_0x31a615=(_0x49a654=(_0x1b5627=_0x91e25a[_0x2152e0(0x192)])==null?void 0x0:_0x1b5627[_0x2152e0(0x1bf)](_0x358055=>_0x358055['rangeType']===_0x29e93f[_0x2152e0(0x1cd)])[_0x2152e0(0x1c0)](_0x177018=>_0x177018[_0x2152e0(0x186)]))!=null?_0x49a654:[],_0x1c2ed1=JSON[_0x2152e0(0x177)](_0x91e25a),_0x3d3499=_0xf6cbf1[_0x2152e0(0x1c4)],_0x1c476a=_0xf6cbf1['id'],_0x4ef064={'memberId':(await this[_0x2152e0(0x1b4)]['requireSession'](_0x14d1ea))[_0x2152e0(0x196)](),'unitId':_0x14d1ea,'threadId':_0x3d3499,'mention':_0x31a615,'content':_0x1c2ed1,'replyId':_0x1c476a},_0x21002f=await this[_0x2152e0(0x1db)][_0x2152e0(0x18c)]('/universer-api/comment/unit/'+_0x14d1ea+_0x2152e0(0x1b6),{'body':_0x4ef064});return!_0x21002f[_0x2152e0(0x1c6)][_0x2152e0(0x18a)]||_0x21002f['body'][_0x2152e0(0x18a)][_0x2152e0(0x1c8)]===0x1;}async[_0x49a43c(0x197)](_0x4b8d2e){const _0x54314d=_0x49a43c,{unitId:_0xee532e}=_0x4b8d2e,_0x19dc57=_0x4b8d2e[_0x54314d(0x1c4)],_0x102427={'memberId':this[_0x54314d(0x1bb)][_0x54314d(0x1a4)]()[_0x54314d(0x180)],'unitId':_0xee532e,'threadId':_0x19dc57,'solved':_0x4b8d2e[_0x54314d(0x1bd)]?v[_0x54314d(0x1ab)]:v['OpenOrReOpen']},_0x28c23a=await this[_0x54314d(0x1db)][_0x54314d(0x18c)](_0x54314d(0x17d)+_0xee532e+'/solved',{'body':_0x102427});return!_0x28c23a[_0x54314d(0x1c6)][_0x54314d(0x18a)]||_0x28c23a[_0x54314d(0x1c6)]['error']['code']===0x1;}async['deleteComment'](_0x3fb400,_0x3d85f9,_0x5776d5,_0x25ef5b){const _0x16a5a0=_0x49a43c,_0x2d7cb1={'memberId':(await this[_0x16a5a0(0x1b4)][_0x16a5a0(0x1a0)](_0x3fb400))[_0x16a5a0(0x196)](),'threadId':_0x5776d5,'replyId':_0x25ef5b,'unitId':_0x3fb400},_0x29abd3=await this[_0x16a5a0(0x1db)]['post']('/universer-api/comment/unit/'+_0x3fb400+_0x16a5a0(0x1d2),{'body':_0x2d7cb1});return!_0x29abd3[_0x16a5a0(0x1c6)]['error']||_0x29abd3[_0x16a5a0(0x1c6)][_0x16a5a0(0x18a)]['code']===0x1;}async[_0x49a43c(0x181)](_0x3260e0,_0x3eb225,_0x307497){const _0x23f259=_0x49a43c,_0x34e3e1={'unitId':_0x3260e0,'threadId':_0x307497},_0x14ae4a=await this[_0x23f259(0x1db)][_0x23f259(0x18c)](_0x23f259(0x17d)+_0x3260e0+_0x23f259(0x198),{'body':_0x34e3e1}),_0xdd7049=_0x307497[_0x23f259(0x1c0)](_0x5a137d=>se(_0x14ae4a[_0x23f259(0x1c6)][_0x23f259(0x188)][_0x5a137d],_0x3260e0,_0x3eb225))['filter'](Boolean);return Object['values'](_0x14ae4a[_0x23f259(0x1c6)][_0x23f259(0x1c5)])['forEach'](_0x176f84=>{const _0x52358f=_0x23f259;this[_0x52358f(0x1bb)][_0x52358f(0x199)](_0x176f84);}),_0xdd7049;}['saveCommentToSnapshot'](_0x5a78f9){const _0x549115=_0x49a43c;return{'id':_0x5a78f9['id'],'threadId':_0x5a78f9[_0x549115(0x1c4)],'ref':_0x5a78f9[_0x549115(0x1b8)]};}};S=re([I(0x0,_0x1ece54(_0x2731d6)),I(0x1,_0x1ece54(_0x21a274)),I(0x2,_0x1ece54(_0x46fd22)),I(0x3,_0x1ece54(_0x2e703f))],S);var oe=Object[_0x49a43c(0x1a2)],ne=Object[_0x49a43c(0x1c1)],ie=(_0x5a4fdb,_0x3b3ef7,_0x3a2d4f,_0x29fc71)=>{const _0x34feb=_0x49a43c;for(var _0x2bdc18=_0x29fc71>0x1?void 0x0:_0x29fc71?ne(_0x3b3ef7,_0x3a2d4f):_0x3b3ef7,_0x3a8f07=_0x5a4fdb[_0x34feb(0x1d6)]-0x1,_0x5e4979;_0x3a8f07>=0x0;_0x3a8f07--)(_0x5e4979=_0x5a4fdb[_0x3a8f07])&&(_0x2bdc18=(_0x29fc71?_0x5e4979(_0x3b3ef7,_0x3a2d4f,_0x2bdc18):_0x5e4979(_0x2bdc18))||_0x2bdc18);return _0x29fc71&&_0x2bdc18&&oe(_0x3b3ef7,_0x3a2d4f,_0x2bdc18),_0x2bdc18;},M=(_0x54978c,_0x36ded4)=>(_0x2e0ec2,_0x1fcfd3)=>_0x36ded4(_0x2e0ec2,_0x1fcfd3,_0x54978c);let b=class extends _0x2599c0{constructor(_0x50c7b7,_0x4f6eaf){const _0x3cc4b1=_0x49a43c;super(),this['_threadCommentDataSourceService']=_0x50c7b7,this[_0x3cc4b1(0x18d)]=_0x4f6eaf,this[_0x3cc4b1(0x17a)]();}[_0x49a43c(0x17a)](){const _0x8165da=_0x49a43c;this[_0x8165da(0x185)][_0x8165da(0x1ce)]=this[_0x8165da(0x18d)],this[_0x8165da(0x185)]['syncUpdateMutationToColla']=!0x1;}};b=ie([M(0x0,_0x5c11c1),M(0x1,_0x1ece54(S))],b);var $=Object[_0x49a43c(0x1a2)],ce=Object['getOwnPropertyDescriptor'],ae=(_0x3602d0,_0x5e1c6a,_0x425c24)=>_0x5e1c6a in _0x3602d0?$(_0x3602d0,_0x5e1c6a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x425c24}):_0x3602d0[_0x5e1c6a]=_0x425c24,de=(_0xb86562,_0xe24f36,_0x109451,_0x4279e2)=>{const _0xd17deb=_0x49a43c;for(var _0x5bc738=_0x4279e2>0x1?void 0x0:_0x4279e2?ce(_0xe24f36,_0x109451):_0xe24f36,_0x3ab4f6=_0xb86562[_0xd17deb(0x1d6)]-0x1,_0x20290a;_0x3ab4f6>=0x0;_0x3ab4f6--)(_0x20290a=_0xb86562[_0x3ab4f6])&&(_0x5bc738=(_0x4279e2?_0x20290a(_0xe24f36,_0x109451,_0x5bc738):_0x20290a(_0x5bc738))||_0x5bc738);return _0x4279e2&&_0x5bc738&&$(_0xe24f36,_0x109451,_0x5bc738),_0x5bc738;},N=(_0x32242e,_0x2973e0)=>(_0x339dcf,_0x1acc45)=>_0x2973e0(_0x339dcf,_0x1acc45,_0x32242e),j=(_0x385c20,_0x34acf6,_0x28fe6f)=>ae(_0x385c20,typeof _0x34acf6!=_0x49a43c(0x189)?_0x34acf6+'':_0x34acf6,_0x28fe6f);let C=class extends _0x515e41{constructor(_0x5be38a=P,_0x22b334,_0x3bb2f0){const _0x24c639=_0x49a43c;super(),this[_0x24c639(0x19d)]=_0x5be38a,this[_0x24c639(0x191)]=_0x22b334,this[_0x24c639(0x19e)]=_0x3bb2f0;const {..._0x5e4da5}=_0xae27d9({},P,this[_0x24c639(0x19d)]);this['_configService'][_0x24c639(0x1c7)](X,_0x5e4da5);}[_0x49a43c(0x1a6)](){const _0x3c8632=_0x49a43c;[[S],[b],[f]][_0x3c8632(0x194)](_0x5c544a=>{const _0x2d2ca3=_0x3c8632;this[_0x2d2ca3(0x191)][_0x2d2ca3(0x19c)](_0x5c544a);});}[_0x49a43c(0x1cf)](){const _0x2187d2=_0x49a43c;this[_0x2187d2(0x191)][_0x2187d2(0x182)](b),this['_injector']['get'](f);}};j(C,_0x49a43c(0x17b),B),j(C,_0x49a43c(0x1a1),_0x1c4ab6['UNIVER_UNKNOWN']),C=de([_0x2312d9(_0x54a460,_0x192a75,_0x2e972a),N(0x1,_0x1ece54(_0x2e703f)),N(0x2,_0x597de3)],C);export{C as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1b7fa2=_0xba9e;(function(_0xdce366,_0xf04f6){const _0x218583=_0xba9e,_0x3e7650=_0xdce366();while(!![]){try{const _0x38db81=parseInt(_0x218583(0x1e4))/0x1+-parseInt(_0x218583(0x1eb))/0x2*(-parseInt(_0x218583(0x235))/0x3)+parseInt(_0x218583(0x223))/0x4+-parseInt(_0x218583(0x21b))/0x5+-parseInt(_0x218583(0x226))/0x6+-parseInt(_0x218583(0x1d7))/0x7+parseInt(_0x218583(0x1f4))/0x8;if(_0x38db81===_0xf04f6)break;else _0x3e7650['push'](_0x3e7650['shift']());}catch(_0x36ee09){_0x3e7650['push'](_0x3e7650['shift']());}}}(_0x56ff,0x1ad83));import{CommentService as _0x58e924,CollaborationSessionService as _0x58397e,UniverCollaborationClientPlugin as _0x2ac980}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x48b4fe}from'@univerjs-pro/license';import{dayjs as _0x126bd1,UserManagerService as _0x5b6abe,Inject as _0x2bb097,Injector as _0x5f23bb,Disposable as _0x409403,CustomRangeType as _0x1d5637,UniverInstanceType as _0x9b79c3,DependentOn as _0x12de59,Plugin as _0x5beb04,merge as _0x3905b4,IConfigService as _0x2e3672}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x27f09f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x423faf,IThreadCommentDataSourceService as _0x415315}from'@univerjs/thread-comment';import{bufferTime as _0x15745b}from'rxjs';import{HTTPService as _0x398f23}from'@univerjs/network';const B=_0x1b7fa2(0x219);var _=(_0x55bd53=>(_0x55bd53[_0x55bd53[_0x1b7fa2(0x230)]=0x0]=_0x1b7fa2(0x230),_0x55bd53[_0x55bd53[_0x1b7fa2(0x23c)]=0x1]=_0x1b7fa2(0x23c),_0x55bd53[_0x55bd53['UNRECOGNIZED']=-0x1]=_0x1b7fa2(0x23a),_0x55bd53))(_||{}),p=(_0x4ad58e=>(_0x4ad58e[_0x4ad58e[_0x1b7fa2(0x213)]=0x0]=_0x1b7fa2(0x213),_0x4ad58e[_0x4ad58e['Add']=0x1]=_0x1b7fa2(0x229),_0x4ad58e[_0x4ad58e[_0x1b7fa2(0x210)]=0x2]=_0x1b7fa2(0x210),_0x4ad58e[_0x4ad58e[_0x1b7fa2(0x207)]=0x3]=_0x1b7fa2(0x207),_0x4ad58e[_0x4ad58e[_0x1b7fa2(0x1f5)]=0x4]=_0x1b7fa2(0x1f5),_0x4ad58e[_0x4ad58e[_0x1b7fa2(0x201)]=0x5]=_0x1b7fa2(0x201),_0x4ad58e[_0x4ad58e[_0x1b7fa2(0x23a)]=-0x1]=_0x1b7fa2(0x23a),_0x4ad58e))(p||{});function _0xba9e(_0x4ca86c,_0x1e5fe8){const _0x56ff4e=_0x56ff();return _0xba9e=function(_0xba9eb9,_0x170de7){_0xba9eb9=_0xba9eb9-0x1d6;let _0x4234a8=_0x56ff4e[_0xba9eb9];return _0x4234a8;},_0xba9e(_0x4ca86c,_0x1e5fe8);}const O=_0x4c9784=>_0x126bd1(new Date(+_0x4c9784))[_0x1b7fa2(0x236)](_0x1b7fa2(0x1ed)),K=async(_0xa7530c,_0xd5c29b)=>{const _0x2f4892=_0x1b7fa2,_0x6dd97=_0xa7530c[_0x2f4892(0x1fc)](_0x5b6abe),_0xbd03ad=_0xa7530c['get'](_0x398f23);_0xd5c29b[_0x2f4892(0x218)](_0xa4a418=>{const _0x495bfe=_0x2f4892;_0x6dd97[_0x495bfe(0x231)](_0xa4a418)&&_0xd5c29b['delete'](_0xa4a418);}),_0xd5c29b[_0x2f4892(0x22b)]&&(await _0xbd03ad['get'](_0x2f4892(0x1ea),{'params':{'userIDs':[..._0xd5c29b]}}))[_0x2f4892(0x20b)][_0x2f4892(0x1e8)][_0x2f4892(0x218)](_0xb638f=>{const _0x12b22b=_0x2f4892;_0xb638f&&_0x6dd97[_0x12b22b(0x1f9)](_0xb638f);});};var V=Object['defineProperty'],z=Object[_0x1b7fa2(0x21f)],Q=(_0x12bd55,_0x499a2e,_0x5e9b2d,_0x266bfe)=>{for(var _0x4c9d93=_0x266bfe>0x1?void 0x0:_0x266bfe?z(_0x499a2e,_0x5e9b2d):_0x499a2e,_0x16dac7=_0x12bd55['length']-0x1,_0x12ecd6;_0x16dac7>=0x0;_0x16dac7--)(_0x12ecd6=_0x12bd55[_0x16dac7])&&(_0x4c9d93=(_0x266bfe?_0x12ecd6(_0x499a2e,_0x5e9b2d,_0x4c9d93):_0x12ecd6(_0x4c9d93))||_0x4c9d93);return _0x266bfe&&_0x4c9d93&&V(_0x499a2e,_0x5e9b2d,_0x4c9d93),_0x4c9d93;},v=(_0x4d04c9,_0x4ea396)=>(_0x1c7af1,_0x4c0013)=>_0x4ea396(_0x1c7af1,_0x4c0013,_0x4d04c9);let I=class extends _0x409403{constructor(_0x569b59,_0x98c3e5,_0xebcfcd,_0x7e978a){const _0x170ef2=_0x1b7fa2;super(),this[_0x170ef2(0x1dc)]=_0x569b59,this[_0x170ef2(0x222)]=_0x98c3e5,this[_0x170ef2(0x221)]=_0xebcfcd,this['_injector']=_0x7e978a,this[_0x170ef2(0x1d8)](),this['_initUserSync']();}[_0x1b7fa2(0x203)](){const _0x2fe4c4=_0x1b7fa2;this[_0x2fe4c4(0x1f6)](this[_0x2fe4c4(0x222)][_0x2fe4c4(0x20e)][_0x2fe4c4(0x1da)](_0x15745b(0x10))[_0x2fe4c4(0x1f7)](_0x57d83c=>{const _0x200812=_0x2fe4c4,_0x5a429b=new Set();_0x57d83c['forEach'](_0x58e0f0=>{const _0x1dd4a5=_0xba9e;switch(_0x58e0f0[_0x1dd4a5(0x237)]){case _0x1dd4a5(0x1f2):{const _0x9b4128=_0x58e0f0['payload'][_0x1dd4a5(0x208)];_0x5a429b['add'](_0x9b4128);break;}}}),K(this[_0x200812(0x1ee)],_0x5a429b);}));}['_init'](){const _0x283abb=_0x1b7fa2;this['disposeWithMe'](this[_0x283abb(0x1dc)][_0x283abb(0x20e)][_0x283abb(0x1f7)](async _0x13fd12=>{const _0x5356d7=_0x283abb;var _0x5a90b8,_0xe8777e,_0xaccaba,_0x1b890b;const _0xed1589=(_0x5a90b8=this[_0x5356d7(0x222)][_0x5356d7(0x23d)](_0x13fd12[_0x5356d7(0x1fa)])[_0x5356d7(0x1e6)](_0x3648e9=>_0x3648e9[_0x5356d7(0x1e7)]===_0x13fd12[_0x5356d7(0x1e7)]))==null?void 0x0:_0x5a90b8['root'];if(!_0xed1589)return;const {unitId:_0x91e96c,subUnitId:_0x14eaeb}=_0xed1589;switch(_0x13fd12[_0x5356d7(0x1dd)]&&this[_0x5356d7(0x221)][_0x5356d7(0x1f9)](_0x13fd12['user']),_0x13fd12['type']){case p['Add']:break;case p[_0x5356d7(0x210)]:{this['_threadCommentModel'][_0x5356d7(0x220)](_0x91e96c,_0x14eaeb,{'unitId':_0x91e96c,'subUnitId':_0x14eaeb,'ref':'','id':_0x13fd12['replyId'],'dT':O(+_0x13fd12['createTimestamp']),'threadId':_0x13fd12[_0x5356d7(0x1e7)],'personId':(_0xaccaba=(_0xe8777e=_0x13fd12['user'])==null?void 0x0:_0xe8777e[_0x5356d7(0x22c)])!=null?_0xaccaba:_0x13fd12[_0x5356d7(0x217)],'text':JSON[_0x5356d7(0x234)](_0x13fd12[_0x5356d7(0x227)]),'parentId':_0xed1589['id']});break;}case p[_0x5356d7(0x1f5)]:{const _0x22ff67=this[_0x5356d7(0x222)][_0x5356d7(0x1f1)](_0x91e96c,_0x14eaeb,_0x13fd12[_0x5356d7(0x1f0)]);_0x22ff67&&_0x22ff67[_0x5356d7(0x1e5)]&&this[_0x5356d7(0x222)][_0x5356d7(0x1fb)](_0x91e96c,_0x14eaeb,_0x13fd12[_0x5356d7(0x1f0)]);break;}case p[_0x5356d7(0x207)]:{this[_0x5356d7(0x222)][_0x5356d7(0x20c)](_0x91e96c,_0x14eaeb,{'commentId':_0x13fd12[_0x5356d7(0x1f0)],'text':JSON[_0x5356d7(0x234)](_0x13fd12['content'])});break;}case p[_0x5356d7(0x201)]:{const _0x2af565=(_0x1b890b=this['_threadCommentModel'][_0x5356d7(0x23d)](_0x13fd12['unitId'])[_0x5356d7(0x1e6)](_0x21897d=>_0x21897d[_0x5356d7(0x1e7)]===_0x13fd12[_0x5356d7(0x1e7)]))==null?void 0x0:_0x1b890b[_0x5356d7(0x22a)];_0x2af565&&this['_threadCommentModel']['resolveComment'](_0x91e96c,_0x14eaeb,_0x2af565['id'],_0x13fd12['solved']===_['Solved']);break;}}}));}};I=Q([v(0x0,_0x2bb097(_0x58e924)),v(0x1,_0x2bb097(_0x423faf)),v(0x2,_0x2bb097(_0x5b6abe)),v(0x3,_0x2bb097(_0x5f23bb))],I);const X=_0x1b7fa2(0x204),P={};var k=Object[_0x1b7fa2(0x22f)],ee=Object[_0x1b7fa2(0x21f)],re=(_0x3e8bae,_0x436bec,_0x128122,_0x1f3faa)=>{for(var _0x2d9320=_0x1f3faa>0x1?void 0x0:_0x1f3faa?ee(_0x436bec,_0x128122):_0x436bec,_0x36628c=_0x3e8bae['length']-0x1,_0x488054;_0x36628c>=0x0;_0x36628c--)(_0x488054=_0x3e8bae[_0x36628c])&&(_0x2d9320=(_0x1f3faa?_0x488054(_0x436bec,_0x128122,_0x2d9320):_0x488054(_0x2d9320))||_0x2d9320);return _0x1f3faa&&_0x2d9320&&k(_0x436bec,_0x128122,_0x2d9320),_0x2d9320;},f=(_0x172741,_0x32baf5)=>(_0x54a58c,_0x5788fb)=>_0x32baf5(_0x54a58c,_0x5788fb,_0x172741);function te(_0x3a399e,_0x118ac7){const _0x40e554=_0x1b7fa2,_0x1aa4e0=_0x3a399e[_0x40e554(0x233)][0x0];return{..._0x118ac7,'id':_0x1aa4e0[_0x40e554(0x1f0)],'resolved':_0x3a399e['solved']===0x1,'dT':O(_0x1aa4e0[_0x40e554(0x22e)]),'personId':_0x1aa4e0[_0x40e554(0x217)],'threadId':_0x1aa4e0[_0x40e554(0x1e7)]};}function se(_0xd14c2d,_0x447349,_0x5af482){const _0x7d8785=_0x1b7fa2;var _0x40768f,_0x4b9e26;if(((_0x4b9e26=(_0x40768f=_0xd14c2d==null?void 0x0:_0xd14c2d['replies'])==null?void 0x0:_0x40768f[_0x7d8785(0x1f8)])!=null?_0x4b9e26:0x0)>0x0){const _0x54fe72=(_0xafac09,_0x112d71)=>({'id':_0xafac09['replyId'],'threadId':_0xafac09[_0x7d8785(0x1e7)],'dT':O(_0xafac09[_0x7d8785(0x22e)]),'personId':_0xafac09['userId'],'resolved':_0xd14c2d[_0x7d8785(0x1db)]===_[_0x7d8785(0x23c)],'unitId':_0x447349,'subUnitId':_0x5af482,'text':JSON[_0x7d8785(0x234)](_0xafac09[_0x7d8785(0x227)]),'parentId':_0x112d71}),_0x34dce5=_0x54fe72(_0xd14c2d['replies'][0x0]);return{..._0x34dce5,'children':_0xd14c2d['replies'][_0x7d8785(0x1ff)](0x1)['map'](_0x54b262=>_0x54fe72(_0x54b262,_0x34dce5['id']))};}return null;}let S=class{constructor(_0x120b63,_0x132952,_0xf97c51,_0x3df20f){const _0x3a1e27=_0x1b7fa2;this[_0x3a1e27(0x202)]=_0x120b63,this[_0x3a1e27(0x221)]=_0x132952,this[_0x3a1e27(0x1d9)]=_0xf97c51,this[_0x3a1e27(0x1ee)]=_0x3df20f;}async['addComment'](_0x777f71){const _0x513f36=_0x1b7fa2;var _0x254fed,_0x926d38;const {parentId:_0x14abdc,unitId:_0x25ef60,text:_0x932cf5,threadId:_0x2b294c}=_0x777f71,_0x264005=(_0x926d38=(_0x254fed=_0x932cf5[_0x513f36(0x1ec)])==null?void 0x0:_0x254fed[_0x513f36(0x21e)](_0x3ad70f=>_0x3ad70f['rangeType']===_0x1d5637[_0x513f36(0x20d)])['map'](_0x31b3e9=>_0x31b3e9['rangeId']))!=null?_0x926d38:[],_0x18afba=JSON[_0x513f36(0x206)](_0x932cf5),_0x24cd16=(await this[_0x513f36(0x1d9)][_0x513f36(0x200)](_0x25ef60))['getMemberID']();if(_0x14abdc){const _0x141792={'memberId':_0x24cd16,'unitId':_0x25ef60,'content':_0x18afba,'mention':_0x264005,'threadId':_0x2b294c},_0x138179=(await this[_0x513f36(0x202)][_0x513f36(0x211)](_0x513f36(0x209)+_0x25ef60+_0x513f36(0x1e3),{'body':_0x141792}))['body'][_0x513f36(0x214)];return{..._0x777f71,'id':_0x138179[_0x513f36(0x1f0)],'dT':_0x126bd1(+_0x138179[_0x513f36(0x22e)])[_0x513f36(0x236)](_0x513f36(0x1ed)),'personId':_0x138179[_0x513f36(0x217)]};}else{const _0xf5ef74={'memberId':_0x24cd16,'unitId':_0x25ef60,'content':_0x18afba,'mention':_0x264005},_0x43fa15=await this[_0x513f36(0x202)][_0x513f36(0x211)]('/universer-api/comment/unit/'+_0x25ef60+_0x513f36(0x21c),{'body':_0xf5ef74});return te(_0x43fa15[_0x513f36(0x20b)]['comment'],_0x777f71);}}async['updateComment'](_0x531acb){const _0x296be3=_0x1b7fa2;var _0x5bbb79,_0x1d55f0;const {text:_0x4090fa,unitId:_0xf8d497}=_0x531acb,_0x1339d1=(_0x1d55f0=(_0x5bbb79=_0x4090fa[_0x296be3(0x1ec)])==null?void 0x0:_0x5bbb79[_0x296be3(0x21e)](_0xe02b8=>_0xe02b8[_0x296be3(0x1fe)]===_0x1d5637[_0x296be3(0x20d)])[_0x296be3(0x232)](_0x4c0506=>_0x4c0506['rangeId']))!=null?_0x1d55f0:[],_0x2ef548=JSON[_0x296be3(0x206)](_0x4090fa),_0x1a284b=_0x531acb[_0x296be3(0x1e7)],_0x3b3a86=_0x531acb['id'],_0x4bc1fd={'memberId':(await this[_0x296be3(0x1d9)][_0x296be3(0x200)](_0xf8d497))[_0x296be3(0x1df)](),'unitId':_0xf8d497,'threadId':_0x1a284b,'mention':_0x1339d1,'content':_0x2ef548,'replyId':_0x3b3a86},_0x1f8927=await this[_0x296be3(0x202)][_0x296be3(0x211)](_0x296be3(0x209)+_0xf8d497+'/edit',{'body':_0x4bc1fd});return!_0x1f8927[_0x296be3(0x20b)]['error']||_0x1f8927[_0x296be3(0x20b)]['error'][_0x296be3(0x22d)]===0x1;}async[_0x1b7fa2(0x23b)](_0x496985){const _0x453109=_0x1b7fa2,{unitId:_0x11451f}=_0x496985,_0x1e1742=_0x496985['threadId'],_0xbc0e83={'memberId':this[_0x453109(0x221)][_0x453109(0x20a)]()[_0x453109(0x22c)],'unitId':_0x11451f,'threadId':_0x1e1742,'solved':_0x496985[_0x453109(0x1e2)]?_[_0x453109(0x23c)]:_[_0x453109(0x230)]},_0x23a884=await this[_0x453109(0x202)][_0x453109(0x211)](_0x453109(0x209)+_0x11451f+_0x453109(0x1fd),{'body':_0xbc0e83});return!_0x23a884[_0x453109(0x20b)][_0x453109(0x21d)]||_0x23a884[_0x453109(0x20b)][_0x453109(0x21d)][_0x453109(0x22d)]===0x1;}async['deleteComment'](_0x1707ce,_0x5c77c1,_0x40619f,_0x47bcec){const _0x2fd9f0=_0x1b7fa2,_0x53b92c={'memberId':(await this[_0x2fd9f0(0x1d9)][_0x2fd9f0(0x200)](_0x1707ce))[_0x2fd9f0(0x1df)](),'threadId':_0x40619f,'replyId':_0x47bcec,'unitId':_0x1707ce},_0x26ccce=await this[_0x2fd9f0(0x202)][_0x2fd9f0(0x211)](_0x2fd9f0(0x209)+_0x1707ce+'/delete',{'body':_0x53b92c});return!_0x26ccce[_0x2fd9f0(0x20b)]['error']||_0x26ccce['body'][_0x2fd9f0(0x21d)][_0x2fd9f0(0x22d)]===0x1;}async[_0x1b7fa2(0x1f3)](_0x358e90,_0x30af66,_0x5d4beb){const _0x5e5d27=_0x1b7fa2,_0x2c97d7={'unitId':_0x358e90,'threadId':_0x5d4beb},_0x5cc26a=await this[_0x5e5d27(0x202)][_0x5e5d27(0x211)](_0x5e5d27(0x209)+_0x358e90+_0x5e5d27(0x238),{'body':_0x2c97d7}),_0x1500e9=_0x5d4beb['map'](_0x4f7044=>se(_0x5cc26a[_0x5e5d27(0x20b)][_0x5e5d27(0x21a)][_0x4f7044],_0x358e90,_0x30af66))[_0x5e5d27(0x21e)](Boolean);return Object[_0x5e5d27(0x1e9)](_0x5cc26a[_0x5e5d27(0x20b)]['users'])[_0x5e5d27(0x218)](_0x323c9e=>{const _0x192701=_0x5e5d27;this[_0x192701(0x221)][_0x192701(0x1f9)](_0x323c9e);}),_0x1500e9;}[_0x1b7fa2(0x225)](_0x14f0e2){const _0x3d9ad0=_0x1b7fa2;return{'id':_0x14f0e2['id'],'threadId':_0x14f0e2[_0x3d9ad0(0x1e7)],'ref':_0x14f0e2[_0x3d9ad0(0x228)]};}};S=re([f(0x0,_0x2bb097(_0x398f23)),f(0x1,_0x2bb097(_0x5b6abe)),f(0x2,_0x2bb097(_0x58397e)),f(0x3,_0x2bb097(_0x5f23bb))],S);var oe=Object['defineProperty'],ne=Object['getOwnPropertyDescriptor'],ie=(_0x37d3fc,_0x28e38d,_0x41ec39,_0x409eae)=>{const _0xf5aef=_0x1b7fa2;for(var _0x4d777d=_0x409eae>0x1?void 0x0:_0x409eae?ne(_0x28e38d,_0x41ec39):_0x28e38d,_0x232c6c=_0x37d3fc[_0xf5aef(0x1f8)]-0x1,_0x55f5bf;_0x232c6c>=0x0;_0x232c6c--)(_0x55f5bf=_0x37d3fc[_0x232c6c])&&(_0x4d777d=(_0x409eae?_0x55f5bf(_0x28e38d,_0x41ec39,_0x4d777d):_0x55f5bf(_0x4d777d))||_0x4d777d);return _0x409eae&&_0x4d777d&&oe(_0x28e38d,_0x41ec39,_0x4d777d),_0x4d777d;},M=(_0xf3c606,_0x59a4ab)=>(_0x499088,_0x54d007)=>_0x59a4ab(_0x499088,_0x54d007,_0xf3c606);let b=class extends _0x409403{constructor(_0x469f8d,_0x1f1968){const _0x3a8883=_0x1b7fa2;super(),this[_0x3a8883(0x215)]=_0x469f8d,this[_0x3a8883(0x239)]=_0x1f1968,this[_0x3a8883(0x1de)]();}[_0x1b7fa2(0x1de)](){const _0x5d6c6d=_0x1b7fa2;this[_0x5d6c6d(0x215)][_0x5d6c6d(0x224)]=this['_threadCommentDataSource'],this[_0x5d6c6d(0x215)][_0x5d6c6d(0x20f)]=!0x1;}};function _0x56ff(){const _0x24a77b=['type','/list','_threadCommentDataSource','UNRECOGNIZED','resolveComment','Solved','getUnit','UNIVER_UNKNOWN','1226659ZQlTHg','_init','_sessionService','pipe','solved','_commentService','user','_initDataSource','getMemberID','onStarting','setConfig','resolved','/reply','151419XOrZnZ','parentId','find','threadId','users','values','/universer-api/user/list','325078UxyxZD','customRanges','YYYY/MM/DD\x20HH:mm','_injector','_configService','replyId','getComment','add','listComments','828680dYPAaJ','Delete','disposeWithMe','subscribe','length','addUser','unitId','deleteComment','get','/solved','rangeType','slice','requireSession','Solve','_httpService','_initUserSync','thread-comment-data-source.config','symbol','stringify','Edit','personId','/universer-api/comment/unit/','getCurrentUser','body','updateComment','COMMENT','commentUpdate$','syncUpdateMutationToColla','Reply','post','_config','Unknown','reply','_threadCommentDataSourceService','onReady','userId','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','631470oIijvF','/add','error','filter','getOwnPropertyDescriptor','addComment','_userService','_threadCommentModel','97084niuriA','dataSource','saveCommentToSnapshot','181968nkEmlu','content','ref','Add','root','size','userID','code','createTimestamp','defineProperty','OpenOrReOpen','getUser','map','replies','parse','3EXRWMV','format'];_0x56ff=function(){return _0x24a77b;};return _0x56ff();}b=ie([M(0x0,_0x415315),M(0x1,_0x2bb097(S))],b);var $=Object['defineProperty'],ce=Object[_0x1b7fa2(0x21f)],ae=(_0x59a67b,_0x40e870,_0x6bd2c4)=>_0x40e870 in _0x59a67b?$(_0x59a67b,_0x40e870,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x6bd2c4}):_0x59a67b[_0x40e870]=_0x6bd2c4,de=(_0x2c242a,_0x298fff,_0x20c59f,_0x323f8e)=>{const _0x3403f0=_0x1b7fa2;for(var _0x4eb2fe=_0x323f8e>0x1?void 0x0:_0x323f8e?ce(_0x298fff,_0x20c59f):_0x298fff,_0x520c3f=_0x2c242a[_0x3403f0(0x1f8)]-0x1,_0x2ebdf1;_0x520c3f>=0x0;_0x520c3f--)(_0x2ebdf1=_0x2c242a[_0x520c3f])&&(_0x4eb2fe=(_0x323f8e?_0x2ebdf1(_0x298fff,_0x20c59f,_0x4eb2fe):_0x2ebdf1(_0x4eb2fe))||_0x4eb2fe);return _0x323f8e&&_0x4eb2fe&&$(_0x298fff,_0x20c59f,_0x4eb2fe),_0x4eb2fe;},N=(_0x3e8d9e,_0x1b4351)=>(_0x3ec013,_0x3e19ed)=>_0x1b4351(_0x3ec013,_0x3e19ed,_0x3e8d9e),j=(_0x562be2,_0x4ebb91,_0x496d5a)=>ae(_0x562be2,typeof _0x4ebb91!=_0x1b7fa2(0x205)?_0x4ebb91+'':_0x4ebb91,_0x496d5a);let C=class extends _0x5beb04{constructor(_0x558e13=P,_0x462381,_0x52d3db){const _0x5d0b82=_0x1b7fa2;super(),this[_0x5d0b82(0x212)]=_0x558e13,this[_0x5d0b82(0x1ee)]=_0x462381,this[_0x5d0b82(0x1ef)]=_0x52d3db;const {..._0x50a8b6}=_0x3905b4({},P,this[_0x5d0b82(0x212)]);this[_0x5d0b82(0x1ef)][_0x5d0b82(0x1e1)](X,_0x50a8b6);}[_0x1b7fa2(0x1e0)](){const _0x2a9851=_0x1b7fa2;[[S],[b],[I]][_0x2a9851(0x218)](_0x8d5dae=>{const _0x1d6113=_0x2a9851;this['_injector'][_0x1d6113(0x1f2)](_0x8d5dae);});}[_0x1b7fa2(0x216)](){const _0x3636f5=_0x1b7fa2;this[_0x3636f5(0x1ee)]['get'](b),this[_0x3636f5(0x1ee)][_0x3636f5(0x1fc)](I);}};j(C,'pluginName',B),j(C,_0x1b7fa2(0x237),_0x9b79c3[_0x1b7fa2(0x1d6)]),C=de([_0x12de59(_0x27f09f,_0x2ac980,_0x48b4fe),N(0x1,_0x2bb097(_0x5f23bb)),N(0x2,_0x2e3672)],C);export{C as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x4cd3b6,_0x3f975b){const _0xa4281e=_0x213f,_0x20792d=_0x4cd3b6();while(!![]){try{const _0x4d072e=-parseInt(_0xa4281e(0x76))/0x1+-parseInt(_0xa4281e(0xe5))/0x2*(-parseInt(_0xa4281e(0xda))/0x3)+-parseInt(_0xa4281e(0xc0))/0x4+parseInt(_0xa4281e(0xb6))/0x5*(-parseInt(_0xa4281e(0xe1))/0x6)+parseInt(_0xa4281e(0xee))/0x7*(parseInt(_0xa4281e(0xef))/0x8)+parseInt(_0xa4281e(0xbf))/0x9*(-parseInt(_0xa4281e(0x9d))/0xa)+parseInt(_0xa4281e(0x84))/0xb;if(_0x4d072e===_0x3f975b)break;else _0x20792d['push'](_0x20792d['shift']());}catch(_0x426c30){_0x20792d['push'](_0x20792d['shift']());}}}(_0x1617,0xd5dab),function(_0x143190,_0x350d64){const _0x3780ad=_0x213f;typeof exports==_0x3780ad(0xc9)&&typeof module<'u'?_0x350d64(exports,require(_0x3780ad(0xe0)),require(_0x3780ad(0xb2)),require('@univerjs/core'),require(_0x3780ad(0xca)),require(_0x3780ad(0xdd)),require(_0x3780ad(0xeb)),require(_0x3780ad(0x8f))):typeof define==_0x3780ad(0xb0)&&define[_0x3780ad(0xe4)]?define(['exports',_0x3780ad(0xe0),_0x3780ad(0xb2),_0x3780ad(0x73),_0x3780ad(0xca),_0x3780ad(0xdd),'rxjs',_0x3780ad(0x8f)],_0x350d64):(_0x143190=typeof globalThis<'u'?globalThis:_0x143190||self,_0x350d64(_0x143190['UniverProThreadCommentDatasource']={},_0x143190['UniverProCollaborationClient'],_0x143190[_0x3780ad(0x7e)],_0x143190[_0x3780ad(0xa8)],_0x143190[_0x3780ad(0x79)],_0x143190['UniverThreadComment'],_0x143190[_0x3780ad(0xeb)],_0x143190[_0x3780ad(0x6f)]));}(this,function(_0x906bb0,_0x1202b0,_0x476a94,_0x3363e0,_0x568744,_0x3c9c3d,_0x1eb0da,_0x105fba){'use strict';const _0x4e7149=_0x213f;const _0x21bea2=_0x4e7149(0x88);var _0x599247=(_0x4d5c80=>(_0x4d5c80[_0x4d5c80['OpenOrReOpen']=0x0]=_0x4e7149(0xd1),_0x4d5c80[_0x4d5c80['Solved']=0x1]='Solved',_0x4d5c80[_0x4d5c80[_0x4e7149(0x9f)]=-0x1]=_0x4e7149(0x9f),_0x4d5c80))(_0x599247||{}),_0x19d9b7=(_0x53bfb2=>(_0x53bfb2[_0x53bfb2['Unknown']=0x0]=_0x4e7149(0xd2),_0x53bfb2[_0x53bfb2[_0x4e7149(0xa6)]=0x1]=_0x4e7149(0xa6),_0x53bfb2[_0x53bfb2[_0x4e7149(0xf4)]=0x2]=_0x4e7149(0xf4),_0x53bfb2[_0x53bfb2['Edit']=0x3]=_0x4e7149(0x95),_0x53bfb2[_0x53bfb2[_0x4e7149(0xcc)]=0x4]='Delete',_0x53bfb2[_0x53bfb2['Solve']=0x5]=_0x4e7149(0xbc),_0x53bfb2[_0x53bfb2[_0x4e7149(0x9f)]=-0x1]=_0x4e7149(0x9f),_0x53bfb2))(_0x19d9b7||{});const _0x466a5e=_0x38e131=>_0x3363e0[_0x4e7149(0xa4)](new Date(+_0x38e131))[_0x4e7149(0xf1)](_0x4e7149(0x9b)),_0x19dd50=async(_0x5c6eaf,_0xd3265e)=>{const _0x53d97f=_0x4e7149,_0x1e3210=_0x5c6eaf[_0x53d97f(0xed)](_0x3363e0[_0x53d97f(0x83)]),_0x37e3e7=_0x5c6eaf[_0x53d97f(0xed)](_0x105fba[_0x53d97f(0xbe)]);_0xd3265e[_0x53d97f(0xb3)](_0x4d383e=>{const _0x5cdfef=_0x53d97f;_0x1e3210[_0x5cdfef(0xac)](_0x4d383e)&&_0xd3265e['delete'](_0x4d383e);}),_0xd3265e[_0x53d97f(0xa0)]&&(await _0x37e3e7[_0x53d97f(0xed)](_0x53d97f(0xec),{'params':{'userIDs':[..._0xd3265e]}}))[_0x53d97f(0xdb)][_0x53d97f(0xbd)][_0x53d97f(0xb3)](_0x4db59d=>{const _0x1136ab=_0x53d97f;_0x4db59d&&_0x1e3210[_0x1136ab(0xa2)](_0x4db59d);});};var _0x610164=Object[_0x4e7149(0x7a)],_0x3d4ae4=Object['getOwnPropertyDescriptor'],_0xfe6d8e=(_0x47c934,_0x257235,_0x1811e4,_0x55ea35)=>{for(var _0x5584cd=_0x55ea35>0x1?void 0x0:_0x55ea35?_0x3d4ae4(_0x257235,_0x1811e4):_0x257235,_0x568dad=_0x47c934['length']-0x1,_0x50c403;_0x568dad>=0x0;_0x568dad--)(_0x50c403=_0x47c934[_0x568dad])&&(_0x5584cd=(_0x55ea35?_0x50c403(_0x257235,_0x1811e4,_0x5584cd):_0x50c403(_0x5584cd))||_0x5584cd);return _0x55ea35&&_0x5584cd&&_0x610164(_0x257235,_0x1811e4,_0x5584cd),_0x5584cd;},_0x56dfda=(_0x1f9a47,_0x4d8fcc)=>(_0xf5ea69,_0xcfafdc)=>_0x4d8fcc(_0xf5ea69,_0xcfafdc,_0x1f9a47);let _0x50b6c4=class extends _0x3363e0[_0x4e7149(0x87)]{constructor(_0x51383a,_0x3eb54c,_0x53b7c3,_0x2cd9f9){const _0x4e8296=_0x4e7149;super(),this['_commentService']=_0x51383a,this[_0x4e8296(0xde)]=_0x3eb54c,this[_0x4e8296(0xf6)]=_0x53b7c3,this[_0x4e8296(0xf2)]=_0x2cd9f9,this[_0x4e8296(0xad)](),this[_0x4e8296(0x7f)]();}[_0x4e7149(0x7f)](){const _0x13adec=_0x4e7149;this[_0x13adec(0x80)](this[_0x13adec(0xde)][_0x13adec(0xd7)][_0x13adec(0xc2)](_0x1eb0da[_0x13adec(0x99)](0x10))[_0x13adec(0xdc)](_0x293f1e=>{const _0x4a004a=_0x13adec,_0x5680a4=new Set();_0x293f1e[_0x4a004a(0xb3)](_0x145bca=>{const _0xd26635=_0x4a004a;switch(_0x145bca[_0xd26635(0xc1)]){case _0xd26635(0xe7):{const _0x11f0ad=_0x145bca['payload'][_0xd26635(0xf3)];_0x5680a4['add'](_0x11f0ad);break;}}}),_0x19dd50(this[_0x4a004a(0xf2)],_0x5680a4);}));}[_0x4e7149(0xad)](){const _0x1e7eab=_0x4e7149;this[_0x1e7eab(0x80)](this[_0x1e7eab(0x98)][_0x1e7eab(0xd7)][_0x1e7eab(0xdc)](async _0x3497bd=>{const _0x370539=_0x1e7eab;var _0x2e5f6b,_0x378fe8,_0x386b3b,_0x4e683c;const _0x17cf09=(_0x2e5f6b=this[_0x370539(0xde)][_0x370539(0x81)](_0x3497bd[_0x370539(0xc7)])[_0x370539(0xd6)](_0x44a6dd=>_0x44a6dd[_0x370539(0x71)]===_0x3497bd[_0x370539(0x71)]))==null?void 0x0:_0x2e5f6b[_0x370539(0xe6)];if(!_0x17cf09)return;const {unitId:_0x588bdd,subUnitId:_0x496a6d}=_0x17cf09;switch(_0x3497bd['user']&&this[_0x370539(0xf6)][_0x370539(0xa2)](_0x3497bd[_0x370539(0xc4)]),_0x3497bd[_0x370539(0xc1)]){case _0x19d9b7[_0x370539(0xa6)]:break;case _0x19d9b7['Reply']:{this['_threadCommentModel']['addComment'](_0x588bdd,_0x496a6d,{'unitId':_0x588bdd,'subUnitId':_0x496a6d,'ref':'','id':_0x3497bd[_0x370539(0xd9)],'dT':_0x466a5e(+_0x3497bd['createTimestamp']),'threadId':_0x3497bd[_0x370539(0x71)],'personId':(_0x386b3b=(_0x378fe8=_0x3497bd[_0x370539(0xc4)])==null?void 0x0:_0x378fe8[_0x370539(0xaf)])!=null?_0x386b3b:_0x3497bd[_0x370539(0x8d)],'text':JSON[_0x370539(0xd8)](_0x3497bd[_0x370539(0xf0)]),'parentId':_0x17cf09['id']});break;}case _0x19d9b7['Delete']:{const _0x173d4b=this[_0x370539(0xde)][_0x370539(0xbb)](_0x588bdd,_0x496a6d,_0x3497bd['replyId']);_0x173d4b&&_0x173d4b['parentId']&&this[_0x370539(0xde)][_0x370539(0xd5)](_0x588bdd,_0x496a6d,_0x3497bd[_0x370539(0xd9)]);break;}case _0x19d9b7['Edit']:{this[_0x370539(0xde)][_0x370539(0x82)](_0x588bdd,_0x496a6d,{'commentId':_0x3497bd['replyId'],'text':JSON[_0x370539(0xd8)](_0x3497bd[_0x370539(0xf0)])});break;}case _0x19d9b7[_0x370539(0xbc)]:{const _0xbec286=(_0x4e683c=this['_threadCommentModel']['getUnit'](_0x3497bd[_0x370539(0xc7)])['find'](_0x54b66d=>_0x54b66d[_0x370539(0x71)]===_0x3497bd[_0x370539(0x71)]))==null?void 0x0:_0x4e683c['root'];_0xbec286&&this[_0x370539(0xde)][_0x370539(0xba)](_0x588bdd,_0x496a6d,_0xbec286['id'],_0x3497bd['solved']===_0x599247[_0x370539(0xc6)]);break;}}}));}};_0x50b6c4=_0xfe6d8e([_0x56dfda(0x0,_0x3363e0[_0x4e7149(0x8b)](_0x1202b0[_0x4e7149(0xcf)])),_0x56dfda(0x1,_0x3363e0['Inject'](_0x3c9c3d[_0x4e7149(0x78)])),_0x56dfda(0x2,_0x3363e0[_0x4e7149(0x8b)](_0x3363e0[_0x4e7149(0x83)])),_0x56dfda(0x3,_0x3363e0['Inject'](_0x3363e0['Injector']))],_0x50b6c4);const _0x98f3e2=_0x4e7149(0xc3),_0x1dec57={};var _0x348dc1=Object[_0x4e7149(0x7a)],_0x45bc84=Object[_0x4e7149(0xa9)],_0x47d8b7=(_0x350bbd,_0x51caed,_0x1f5c57,_0x4b4f2e)=>{const _0x24f59d=_0x4e7149;for(var _0x3d264f=_0x4b4f2e>0x1?void 0x0:_0x4b4f2e?_0x45bc84(_0x51caed,_0x1f5c57):_0x51caed,_0x261c4b=_0x350bbd[_0x24f59d(0xe2)]-0x1,_0x3ebf43;_0x261c4b>=0x0;_0x261c4b--)(_0x3ebf43=_0x350bbd[_0x261c4b])&&(_0x3d264f=(_0x4b4f2e?_0x3ebf43(_0x51caed,_0x1f5c57,_0x3d264f):_0x3ebf43(_0x3d264f))||_0x3d264f);return _0x4b4f2e&&_0x3d264f&&_0x348dc1(_0x51caed,_0x1f5c57,_0x3d264f),_0x3d264f;},_0x944bf6=(_0x3af492,_0x4f6d26)=>(_0x309247,_0x4214b6)=>_0x4f6d26(_0x309247,_0x4214b6,_0x3af492);function _0x52021a(_0x19fdec,_0x3ad294){const _0x2fe4a9=_0x4e7149,_0x705876=_0x19fdec[_0x2fe4a9(0x93)][0x0];return{..._0x3ad294,'id':_0x705876[_0x2fe4a9(0xd9)],'resolved':_0x19fdec[_0x2fe4a9(0xa7)]===0x1,'dT':_0x466a5e(_0x705876[_0x2fe4a9(0xd4)]),'personId':_0x705876[_0x2fe4a9(0x8d)],'threadId':_0x705876[_0x2fe4a9(0x71)]};}function _0x446a4d(_0x503c5b,_0x5c8d04,_0x4ed96f){const _0x3c8307=_0x4e7149;var _0x271034,_0xe0fb38;if(((_0xe0fb38=(_0x271034=_0x503c5b==null?void 0x0:_0x503c5b[_0x3c8307(0x93)])==null?void 0x0:_0x271034['length'])!=null?_0xe0fb38:0x0)>0x0){const _0x42fd73=(_0x2a2993,_0x389507)=>({'id':_0x2a2993[_0x3c8307(0xd9)],'threadId':_0x2a2993['threadId'],'dT':_0x466a5e(_0x2a2993['createTimestamp']),'personId':_0x2a2993[_0x3c8307(0x8d)],'resolved':_0x503c5b[_0x3c8307(0xa7)]===_0x599247[_0x3c8307(0xc6)],'unitId':_0x5c8d04,'subUnitId':_0x4ed96f,'text':JSON['parse'](_0x2a2993[_0x3c8307(0xf0)]),'parentId':_0x389507}),_0x3d1b56=_0x42fd73(_0x503c5b['replies'][0x0]);return{..._0x3d1b56,'children':_0x503c5b[_0x3c8307(0x93)][_0x3c8307(0xdf)](0x1)[_0x3c8307(0xe8)](_0x2b8c7a=>_0x42fd73(_0x2b8c7a,_0x3d1b56['id']))};}return null;}let _0x3e1d45=class{constructor(_0x5775e9,_0x51e769,_0x516a74,_0x5238ee){const _0x2c046c=_0x4e7149;this['_httpService']=_0x5775e9,this[_0x2c046c(0xf6)]=_0x51e769,this[_0x2c046c(0xf7)]=_0x516a74,this[_0x2c046c(0xf2)]=_0x5238ee;}async[_0x4e7149(0x72)](_0x16c277){const _0x463303=_0x4e7149;var _0x1a5ed0,_0x21dfca;const {parentId:_0x411f2f,unitId:_0x12f337,text:_0x328e7a,threadId:_0x11eb62}=_0x16c277,_0xb98e86=(_0x21dfca=(_0x1a5ed0=_0x328e7a[_0x463303(0x8c)])==null?void 0x0:_0x1a5ed0[_0x463303(0xce)](_0x4819c4=>_0x4819c4[_0x463303(0x91)]===_0x3363e0[_0x463303(0xa1)]['COMMENT'])[_0x463303(0xe8)](_0x4631dc=>_0x4631dc['rangeId']))!=null?_0x21dfca:[],_0x34b2bd=JSON['stringify'](_0x328e7a),_0x26e4bc=(await this['_sessionService'][_0x463303(0x9c)](_0x12f337))['getMemberID']();if(_0x411f2f){const _0xc04984={'memberId':_0x26e4bc,'unitId':_0x12f337,'content':_0x34b2bd,'mention':_0xb98e86,'threadId':_0x11eb62},_0x3d04b4=(await this['_httpService'][_0x463303(0xab)](_0x463303(0x8a)+_0x12f337+'/reply',{'body':_0xc04984}))['body'][_0x463303(0xb9)];return{..._0x16c277,'id':_0x3d04b4[_0x463303(0xd9)],'dT':_0x3363e0[_0x463303(0xa4)](+_0x3d04b4[_0x463303(0xd4)])[_0x463303(0xf1)](_0x463303(0x9b)),'personId':_0x3d04b4[_0x463303(0x8d)]};}else{const _0x12dbec={'memberId':_0x26e4bc,'unitId':_0x12f337,'content':_0x34b2bd,'mention':_0xb98e86},_0x56e251=await this[_0x463303(0x90)]['post'](_0x463303(0x8a)+_0x12f337+_0x463303(0x97),{'body':_0x12dbec});return _0x52021a(_0x56e251[_0x463303(0xdb)]['comment'],_0x16c277);}}async[_0x4e7149(0x82)](_0x1ff25c){const _0x40b611=_0x4e7149;var _0x51eff6,_0x2d33ec;const {text:_0x4edba3,unitId:_0x432e56}=_0x1ff25c,_0x55bfaf=(_0x2d33ec=(_0x51eff6=_0x4edba3['customRanges'])==null?void 0x0:_0x51eff6[_0x40b611(0xce)](_0x32ea85=>_0x32ea85['rangeType']===_0x3363e0[_0x40b611(0xa1)]['COMMENT'])['map'](_0x2c11e4=>_0x2c11e4[_0x40b611(0xa3)]))!=null?_0x2d33ec:[],_0x37d7be=JSON[_0x40b611(0x74)](_0x4edba3),_0x2e9949=_0x1ff25c[_0x40b611(0x71)],_0x5f59f6=_0x1ff25c['id'],_0x467739={'memberId':(await this[_0x40b611(0xf7)][_0x40b611(0x9c)](_0x432e56))[_0x40b611(0xb8)](),'unitId':_0x432e56,'threadId':_0x2e9949,'mention':_0x55bfaf,'content':_0x37d7be,'replyId':_0x5f59f6},_0x2f7a29=await this[_0x40b611(0x90)][_0x40b611(0xab)]('/universer-api/comment/unit/'+_0x432e56+_0x40b611(0x7c),{'body':_0x467739});return!_0x2f7a29[_0x40b611(0xdb)]['error']||_0x2f7a29[_0x40b611(0xdb)][_0x40b611(0xc8)][_0x40b611(0x9e)]===0x1;}async[_0x4e7149(0xba)](_0x55d43a){const _0x3920fd=_0x4e7149,{unitId:_0xb64024}=_0x55d43a,_0x5b9eb0=_0x55d43a[_0x3920fd(0x71)],_0xd722cc={'memberId':this[_0x3920fd(0xf6)]['getCurrentUser']()[_0x3920fd(0xaf)],'unitId':_0xb64024,'threadId':_0x5b9eb0,'solved':_0x55d43a[_0x3920fd(0xb5)]?_0x599247[_0x3920fd(0xc6)]:_0x599247['OpenOrReOpen']},_0xbe909c=await this[_0x3920fd(0x90)][_0x3920fd(0xab)](_0x3920fd(0x8a)+_0xb64024+'/solved',{'body':_0xd722cc});return!_0xbe909c[_0x3920fd(0xdb)]['error']||_0xbe909c[_0x3920fd(0xdb)][_0x3920fd(0xc8)][_0x3920fd(0x9e)]===0x1;}async[_0x4e7149(0xd5)](_0x3aa07f,_0x147caa,_0x429acc,_0x8cf7ae){const _0x3e1f43=_0x4e7149,_0x93f5b0={'memberId':(await this[_0x3e1f43(0xf7)][_0x3e1f43(0x9c)](_0x3aa07f))['getMemberID'](),'threadId':_0x429acc,'replyId':_0x8cf7ae,'unitId':_0x3aa07f},_0x3f3c7b=await this['_httpService'][_0x3e1f43(0xab)]('/universer-api/comment/unit/'+_0x3aa07f+'/delete',{'body':_0x93f5b0});return!_0x3f3c7b[_0x3e1f43(0xdb)]['error']||_0x3f3c7b['body'][_0x3e1f43(0xc8)][_0x3e1f43(0x9e)]===0x1;}async[_0x4e7149(0xcb)](_0x1f9581,_0x1273ae,_0x5d92de){const _0x22a0a9=_0x4e7149,_0x2b6dac={'unitId':_0x1f9581,'threadId':_0x5d92de},_0x1f7d4e=await this[_0x22a0a9(0x90)][_0x22a0a9(0xab)](_0x22a0a9(0x8a)+_0x1f9581+_0x22a0a9(0x96),{'body':_0x2b6dac}),_0x297fa5=_0x5d92de[_0x22a0a9(0xe8)](_0x346dc1=>_0x446a4d(_0x1f7d4e[_0x22a0a9(0xdb)]['comments'][_0x346dc1],_0x1f9581,_0x1273ae))[_0x22a0a9(0xce)](Boolean);return Object[_0x22a0a9(0x89)](_0x1f7d4e['body'][_0x22a0a9(0xbd)])[_0x22a0a9(0xb3)](_0x4c5c32=>{const _0x408b95=_0x22a0a9;this[_0x408b95(0xf6)][_0x408b95(0xa2)](_0x4c5c32);}),_0x297fa5;}['saveCommentToSnapshot'](_0x58dd14){const _0x45bd3d=_0x4e7149;return{'id':_0x58dd14['id'],'threadId':_0x58dd14[_0x45bd3d(0x71)],'ref':_0x58dd14[_0x45bd3d(0x9a)]};}};_0x3e1d45=_0x47d8b7([_0x944bf6(0x0,_0x3363e0['Inject'](_0x105fba[_0x4e7149(0xbe)])),_0x944bf6(0x1,_0x3363e0[_0x4e7149(0x8b)](_0x3363e0[_0x4e7149(0x83)])),_0x944bf6(0x2,_0x3363e0['Inject'](_0x1202b0['CollaborationSessionService'])),_0x944bf6(0x3,_0x3363e0[_0x4e7149(0x8b)](_0x3363e0['Injector']))],_0x3e1d45);var _0x1c1754=Object[_0x4e7149(0x7a)],_0x264766=Object['getOwnPropertyDescriptor'],_0x318fe1=(_0x197883,_0x3ca6cd,_0x1a5dd3,_0x447690)=>{const _0x98e7ca=_0x4e7149;for(var _0x337a0d=_0x447690>0x1?void 0x0:_0x447690?_0x264766(_0x3ca6cd,_0x1a5dd3):_0x3ca6cd,_0x506523=_0x197883[_0x98e7ca(0xe2)]-0x1,_0x6a904;_0x506523>=0x0;_0x506523--)(_0x6a904=_0x197883[_0x506523])&&(_0x337a0d=(_0x447690?_0x6a904(_0x3ca6cd,_0x1a5dd3,_0x337a0d):_0x6a904(_0x337a0d))||_0x337a0d);return _0x447690&&_0x337a0d&&_0x1c1754(_0x3ca6cd,_0x1a5dd3,_0x337a0d),_0x337a0d;},_0x2657f4=(_0x34bd90,_0x7e0cfa)=>(_0x38049d,_0x2d9ec3)=>_0x7e0cfa(_0x38049d,_0x2d9ec3,_0x34bd90);let _0x428556=class extends _0x3363e0[_0x4e7149(0x87)]{constructor(_0x2f528f,_0x125a27){const _0x48ead5=_0x4e7149;super(),this[_0x48ead5(0xe9)]=_0x2f528f,this['_threadCommentDataSource']=_0x125a27,this['_initDataSource']();}[_0x4e7149(0xe3)](){const _0x401c8b=_0x4e7149;this[_0x401c8b(0xe9)][_0x401c8b(0xd0)]=this[_0x401c8b(0xaa)],this['_threadCommentDataSourceService'][_0x401c8b(0x85)]=!0x1;}};_0x428556=_0x318fe1([_0x2657f4(0x0,_0x3c9c3d['IThreadCommentDataSourceService']),_0x2657f4(0x1,_0x3363e0['Inject'](_0x3e1d45))],_0x428556);var _0x2c13b2=Object[_0x4e7149(0x7a)],_0xc30170=Object[_0x4e7149(0xa9)],_0x5af70a=(_0x44971,_0x3ccf6e,_0x4b437b)=>_0x3ccf6e in _0x44971?_0x2c13b2(_0x44971,_0x3ccf6e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b437b}):_0x44971[_0x3ccf6e]=_0x4b437b,_0x47a739=(_0x45c2af,_0x185169,_0x43b11c,_0x1dcc8b)=>{for(var _0x525c02=_0x1dcc8b>0x1?void 0x0:_0x1dcc8b?_0xc30170(_0x185169,_0x43b11c):_0x185169,_0x41a0d2=_0x45c2af['length']-0x1,_0x3bf336;_0x41a0d2>=0x0;_0x41a0d2--)(_0x3bf336=_0x45c2af[_0x41a0d2])&&(_0x525c02=(_0x1dcc8b?_0x3bf336(_0x185169,_0x43b11c,_0x525c02):_0x3bf336(_0x525c02))||_0x525c02);return _0x1dcc8b&&_0x525c02&&_0x2c13b2(_0x185169,_0x43b11c,_0x525c02),_0x525c02;},_0x43087d=(_0x54695d,_0x4146dd)=>(_0x3cd0d8,_0x178579)=>_0x4146dd(_0x3cd0d8,_0x178579,_0x54695d),_0x1c1b36=(_0x4256d0,_0x325071,_0x29fcc3)=>_0x5af70a(_0x4256d0,typeof _0x325071!=_0x4e7149(0xcd)?_0x325071+'':_0x325071,_0x29fcc3);_0x906bb0[_0x4e7149(0x7d)]=class extends _0x3363e0[_0x4e7149(0xc5)]{constructor(_0x48625d=_0x1dec57,_0x4df3af,_0x5cbb7b){const _0x18dc40=_0x4e7149;super(),this[_0x18dc40(0x7b)]=_0x48625d,this['_injector']=_0x4df3af,this[_0x18dc40(0x94)]=_0x5cbb7b;const {..._0x1f170a}=_0x3363e0[_0x18dc40(0x92)]({},_0x1dec57,this[_0x18dc40(0x7b)]);this['_configService'][_0x18dc40(0x77)](_0x98f3e2,_0x1f170a);}[_0x4e7149(0xa5)](){const _0x273ef3=_0x4e7149;[[_0x3e1d45],[_0x428556],[_0x50b6c4]][_0x273ef3(0xb3)](_0x3d5b8f=>{const _0x2ec2e9=_0x273ef3;this[_0x2ec2e9(0xf2)][_0x2ec2e9(0xe7)](_0x3d5b8f);});}[_0x4e7149(0xd3)](){const _0x4d9a10=_0x4e7149;this[_0x4d9a10(0xf2)][_0x4d9a10(0xed)](_0x428556),this[_0x4d9a10(0xf2)][_0x4d9a10(0xed)](_0x50b6c4);}},_0x1c1b36(_0x906bb0[_0x4e7149(0x7d)],'pluginName',_0x21bea2),_0x1c1b36(_0x906bb0[_0x4e7149(0x7d)],_0x4e7149(0xc1),_0x3363e0[_0x4e7149(0x8e)][_0x4e7149(0x86)]),_0x906bb0['UniverThreadCommentDataSourcePlugin']=_0x47a739([_0x3363e0[_0x4e7149(0x75)](_0x568744[_0x4e7149(0xf5)],_0x1202b0[_0x4e7149(0xea)],_0x476a94[_0x4e7149(0xae)]),_0x43087d(0x1,_0x3363e0[_0x4e7149(0x8b)](_0x3363e0[_0x4e7149(0xb7)])),_0x43087d(0x2,_0x3363e0[_0x4e7149(0xb4)])],_0x906bb0[_0x4e7149(0x7d)]),Object['defineProperty'](_0x906bb0,Symbol[_0x4e7149(0x70)],{'value':_0x4e7149(0xb1)});}));function _0x213f(_0x4fcc9e,_0x8c1a73){const _0x161754=_0x1617();return _0x213f=function(_0x213f07,_0x4d3c7d){_0x213f07=_0x213f07-0x6f;let _0x2745de=_0x161754[_0x213f07];return _0x2745de;},_0x213f(_0x4fcc9e,_0x8c1a73);}function _0x1617(){const _0x1526ed=['size','CustomRangeType','addUser','rangeId','dayjs','onStarting','Add','solved','UniverCore','getOwnPropertyDescriptor','_threadCommentDataSource','post','getUser','_init','UniverLicensePlugin','userID','function','Module','@univerjs-pro/license','forEach','IConfigService','resolved','111560VKvXDm','Injector','getMemberID','reply','resolveComment','getComment','Solve','users','HTTPService','8015724bGHTwK','2625676CAnLvM','type','pipe','thread-comment-data-source.config','user','Plugin','Solved','unitId','error','object','@univerjs/thread-comment-ui','listComments','Delete','symbol','filter','CommentService','dataSource','OpenOrReOpen','Unknown','onReady','createTimestamp','deleteComment','find','commentUpdate$','parse','replyId','9WFjsla','body','subscribe','@univerjs/thread-comment','_threadCommentModel','slice','@univerjs-pro/collaboration-client','66sAyWUM','length','_initDataSource','amd','403170PkUvOy','root','add','map','_threadCommentDataSourceService','UniverCollaborationClientPlugin','rxjs','/universer-api/user/list','get','7xUcDfH','13828640MxYoWu','content','format','_injector','personId','Reply','UniverThreadCommentUIPlugin','_userService','_sessionService','UniverNetwork','toStringTag','threadId','addComment','@univerjs/core','stringify','DependentOn','419009cZODQe','setConfig','ThreadCommentModel','UniverThreadCommentUi','defineProperty','_config','/edit','UniverThreadCommentDataSourcePlugin','UniverProLicense','_initUserSync','disposeWithMe','getUnit','updateComment','UserManagerService','8295188khyMga','syncUpdateMutationToColla','UNIVER_UNKNOWN','Disposable','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','values','/universer-api/comment/unit/','Inject','customRanges','userId','UniverInstanceType','@univerjs/network','_httpService','rangeType','merge','replies','_configService','Edit','/list','/add','_commentService','bufferTime','ref','YYYY/MM/DD\x20HH:mm','requireSession','10JsuXgM','code','UNRECOGNIZED'];_0x1617=function(){return _0x1526ed;};return _0x1617();}
1
+ function _0x1d3a(){const _0x4f681e=['filter','user','requireSession','toStringTag','UniverCollaborationClientPlugin','find','Reply','779322iVUlXZ','486990PYVgPt','/delete','Module','addUser','_initDataSource','type','Injector','783630NiVlwj','syncUpdateMutationToColla','code','Disposable','/universer-api/user/list','_httpService','resolved','_injector','add','_initUserSync','get','parse','144NfIONx','getOwnPropertyDescriptor','/solved','@univerjs-pro/collaboration-client','@univerjs/thread-comment-ui','dayjs','_sessionService','object','thread-comment-data-source.config','UniverProCollaborationClient','saveCommentToSnapshot','forEach','body','users','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solved','replies','slice','updateComment','UniverThreadCommentUIPlugin','getComment','69251elJTqD','pluginName','commentUpdate$','CustomRangeType','pipe','merge','HTTPService','UniverThreadComment','123RjOlrD','amd','@univerjs/core','addComment','Edit','_configService','_threadCommentModel','comments','symbol','subscribe','Delete','UniverThreadCommentDataSourcePlugin','ThreadCommentModel','UniverCore','_threadCommentDataSource','getUnit','length','error','resolveComment','createTimestamp','UniverLicensePlugin','post','IConfigService','Plugin','defineProperty','function','getMemberID','disposeWithMe','exports','replyId','OpenOrReOpen','customRanges','rxjs','Unknown','deleteComment','userID','UniverProThreadCommentDatasource','comment','values','CommentService','reply','252941cEwitz','Add','ref','rangeId','@univerjs/thread-comment','threadId','content','dataSource','/universer-api/comment/unit/','solved','unitId','UniverInstanceType','format','setConfig','listComments','userId','UserManagerService','_init','map','@univerjs/network','@univerjs-pro/license','/edit','_userService','DependentOn','UNRECOGNIZED','Solve','5788GAGHxi','size','payload','_commentService','454620soZKTM','stringify','Inject','YYYY/MM/DD\x20HH:mm','bufferTime','CollaborationSessionService','root'];_0x1d3a=function(){return _0x4f681e;};return _0x1d3a();}function _0x8600(_0x2b9a04,_0x110be3){const _0x1d3ae3=_0x1d3a();return _0x8600=function(_0x86000b,_0x5d92db){_0x86000b=_0x86000b-0x105;let _0x3159b4=_0x1d3ae3[_0x86000b];return _0x3159b4;},_0x8600(_0x2b9a04,_0x110be3);}(function(_0xc51fb8,_0x5bee9f){const _0x5c9aa7=_0x8600,_0xc3e610=_0xc51fb8();while(!![]){try{const _0x261d11=parseInt(_0x5c9aa7(0x128))/0x1+parseInt(_0x5c9aa7(0x146))/0x2+parseInt(_0x5c9aa7(0x185))/0x3*(parseInt(_0x5c9aa7(0x142))/0x4)+-parseInt(_0x5c9aa7(0x15c))/0x5+-parseInt(_0x5c9aa7(0x154))/0x6+parseInt(_0x5c9aa7(0x17d))/0x7*(-parseInt(_0x5c9aa7(0x168))/0x8)+parseInt(_0x5c9aa7(0x155))/0x9;if(_0x261d11===_0x5bee9f)break;else _0xc3e610['push'](_0xc3e610['shift']());}catch(_0x323b45){_0xc3e610['push'](_0xc3e610['shift']());}}}(_0x1d3a,0x1f7e9),function(_0x301ead,_0x2ad4c4){const _0x2f95ca=_0x8600;typeof exports==_0x2f95ca(0x16f)&&typeof module<'u'?_0x2ad4c4(exports,require('@univerjs-pro/collaboration-client'),require(_0x2f95ca(0x13c)),require(_0x2f95ca(0x187)),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0x2f95ca(0x11f)),require('@univerjs/network')):typeof define==_0x2f95ca(0x118)&&define[_0x2f95ca(0x186)]?define([_0x2f95ca(0x11b),_0x2f95ca(0x16b),'@univerjs-pro/license',_0x2f95ca(0x187),_0x2f95ca(0x16c),_0x2f95ca(0x12c),_0x2f95ca(0x11f),_0x2f95ca(0x13b)],_0x2ad4c4):(_0x301ead=typeof globalThis<'u'?globalThis:_0x301ead||self,_0x2ad4c4(_0x301ead[_0x2f95ca(0x123)]={},_0x301ead[_0x2f95ca(0x171)],_0x301ead['UniverProLicense'],_0x301ead[_0x2f95ca(0x10c)],_0x301ead['UniverThreadCommentUi'],_0x301ead[_0x2f95ca(0x184)],_0x301ead[_0x2f95ca(0x11f)],_0x301ead['UniverNetwork']));}(this,function(_0x535146,_0x30dd61,_0x3f0c42,_0x1f5180,_0x257271,_0x356d18,_0x39924b,_0x3e7d79){'use strict';const _0x46075c=_0x8600;const _0xda75df=_0x46075c(0x176);var _0x3a9f0e=(_0x42c738=>(_0x42c738[_0x42c738[_0x46075c(0x11d)]=0x0]=_0x46075c(0x11d),_0x42c738[_0x42c738[_0x46075c(0x177)]=0x1]=_0x46075c(0x177),_0x42c738[_0x42c738[_0x46075c(0x140)]=-0x1]=_0x46075c(0x140),_0x42c738))(_0x3a9f0e||{}),_0x3c1fb9=(_0x1bc50d=>(_0x1bc50d[_0x1bc50d['Unknown']=0x0]=_0x46075c(0x120),_0x1bc50d[_0x1bc50d['Add']=0x1]=_0x46075c(0x129),_0x1bc50d[_0x1bc50d['Reply']=0x2]=_0x46075c(0x153),_0x1bc50d[_0x1bc50d[_0x46075c(0x189)]=0x3]=_0x46075c(0x189),_0x1bc50d[_0x1bc50d[_0x46075c(0x109)]=0x4]='Delete',_0x1bc50d[_0x1bc50d['Solve']=0x5]=_0x46075c(0x141),_0x1bc50d[_0x1bc50d[_0x46075c(0x140)]=-0x1]=_0x46075c(0x140),_0x1bc50d))(_0x3c1fb9||{});const _0x5ccc19=_0x1fdb19=>_0x1f5180['dayjs'](new Date(+_0x1fdb19))['format'](_0x46075c(0x149)),_0x24b08d=async(_0x3bc669,_0x43a472)=>{const _0x32af28=_0x46075c,_0x264865=_0x3bc669['get'](_0x1f5180[_0x32af28(0x138)]),_0x2b311b=_0x3bc669[_0x32af28(0x166)](_0x3e7d79[_0x32af28(0x183)]);_0x43a472['forEach'](_0x2bd333=>{_0x264865['getUser'](_0x2bd333)&&_0x43a472['delete'](_0x2bd333);}),_0x43a472[_0x32af28(0x143)]&&(await _0x2b311b[_0x32af28(0x166)](_0x32af28(0x160),{'params':{'userIDs':[..._0x43a472]}}))[_0x32af28(0x174)][_0x32af28(0x175)]['forEach'](_0x421b48=>{const _0x4a2f4b=_0x32af28;_0x421b48&&_0x264865[_0x4a2f4b(0x158)](_0x421b48);});};var _0x528c88=Object[_0x46075c(0x117)],_0x4b9014=Object[_0x46075c(0x169)],_0x460c51=(_0x20af9e,_0x2b5236,_0x1a6f62,_0x4156aa)=>{const _0x2fe10c=_0x46075c;for(var _0x365886=_0x4156aa>0x1?void 0x0:_0x4156aa?_0x4b9014(_0x2b5236,_0x1a6f62):_0x2b5236,_0x1443f4=_0x20af9e[_0x2fe10c(0x10f)]-0x1,_0x1a2d35;_0x1443f4>=0x0;_0x1443f4--)(_0x1a2d35=_0x20af9e[_0x1443f4])&&(_0x365886=(_0x4156aa?_0x1a2d35(_0x2b5236,_0x1a6f62,_0x365886):_0x1a2d35(_0x365886))||_0x365886);return _0x4156aa&&_0x365886&&_0x528c88(_0x2b5236,_0x1a6f62,_0x365886),_0x365886;},_0x4e1644=(_0xf0e5ba,_0x332c79)=>(_0x71435e,_0x221e52)=>_0x332c79(_0x71435e,_0x221e52,_0xf0e5ba);let _0x21b789=class extends _0x1f5180[_0x46075c(0x15f)]{constructor(_0x3ea294,_0x51dcb0,_0x1f1960,_0xec914){const _0x2daa3b=_0x46075c;super(),this[_0x2daa3b(0x145)]=_0x3ea294,this['_threadCommentModel']=_0x51dcb0,this[_0x2daa3b(0x13e)]=_0x1f1960,this[_0x2daa3b(0x163)]=_0xec914,this[_0x2daa3b(0x139)](),this[_0x2daa3b(0x165)]();}[_0x46075c(0x165)](){const _0x5e9ef4=_0x46075c;this[_0x5e9ef4(0x11a)](this[_0x5e9ef4(0x105)][_0x5e9ef4(0x17f)][_0x5e9ef4(0x181)](_0x39924b[_0x5e9ef4(0x14a)](0x10))[_0x5e9ef4(0x108)](_0x41a1a5=>{const _0x56e1cb=_0x5e9ef4,_0x3e2f12=new Set();_0x41a1a5[_0x56e1cb(0x173)](_0x384d9e=>{const _0x28bdf7=_0x56e1cb;switch(_0x384d9e[_0x28bdf7(0x15a)]){case _0x28bdf7(0x164):{const _0xbc4b11=_0x384d9e[_0x28bdf7(0x144)]['personId'];_0x3e2f12['add'](_0xbc4b11);break;}}}),_0x24b08d(this[_0x56e1cb(0x163)],_0x3e2f12);}));}[_0x46075c(0x139)](){const _0x4d02e1=_0x46075c;this['disposeWithMe'](this[_0x4d02e1(0x145)]['commentUpdate$'][_0x4d02e1(0x108)](async _0x262af9=>{const _0x474744=_0x4d02e1;var _0x41d3a5,_0x3ef745,_0x3cef46,_0x418d65;const _0x3c5d74=(_0x41d3a5=this['_threadCommentModel'][_0x474744(0x10e)](_0x262af9[_0x474744(0x132)])[_0x474744(0x152)](_0x51687a=>_0x51687a[_0x474744(0x12d)]===_0x262af9[_0x474744(0x12d)]))==null?void 0x0:_0x41d3a5[_0x474744(0x14c)];if(!_0x3c5d74)return;const {unitId:_0xc7d8c,subUnitId:_0x56e932}=_0x3c5d74;switch(_0x262af9[_0x474744(0x14e)]&&this[_0x474744(0x13e)][_0x474744(0x158)](_0x262af9['user']),_0x262af9[_0x474744(0x15a)]){case _0x3c1fb9[_0x474744(0x129)]:break;case _0x3c1fb9[_0x474744(0x153)]:{this[_0x474744(0x105)][_0x474744(0x188)](_0xc7d8c,_0x56e932,{'unitId':_0xc7d8c,'subUnitId':_0x56e932,'ref':'','id':_0x262af9[_0x474744(0x11c)],'dT':_0x5ccc19(+_0x262af9[_0x474744(0x112)]),'threadId':_0x262af9[_0x474744(0x12d)],'personId':(_0x3cef46=(_0x3ef745=_0x262af9[_0x474744(0x14e)])==null?void 0x0:_0x3ef745[_0x474744(0x122)])!=null?_0x3cef46:_0x262af9['userId'],'text':JSON[_0x474744(0x167)](_0x262af9[_0x474744(0x12e)]),'parentId':_0x3c5d74['id']});break;}case _0x3c1fb9[_0x474744(0x109)]:{const _0x3dc56d=this[_0x474744(0x105)][_0x474744(0x17c)](_0xc7d8c,_0x56e932,_0x262af9[_0x474744(0x11c)]);_0x3dc56d&&_0x3dc56d['parentId']&&this[_0x474744(0x105)][_0x474744(0x121)](_0xc7d8c,_0x56e932,_0x262af9[_0x474744(0x11c)]);break;}case _0x3c1fb9[_0x474744(0x189)]:{this[_0x474744(0x105)][_0x474744(0x17a)](_0xc7d8c,_0x56e932,{'commentId':_0x262af9['replyId'],'text':JSON[_0x474744(0x167)](_0x262af9[_0x474744(0x12e)])});break;}case _0x3c1fb9[_0x474744(0x141)]:{const _0x57b2c2=(_0x418d65=this[_0x474744(0x105)][_0x474744(0x10e)](_0x262af9[_0x474744(0x132)])[_0x474744(0x152)](_0x4d75fa=>_0x4d75fa[_0x474744(0x12d)]===_0x262af9[_0x474744(0x12d)]))==null?void 0x0:_0x418d65[_0x474744(0x14c)];_0x57b2c2&&this['_threadCommentModel'][_0x474744(0x111)](_0xc7d8c,_0x56e932,_0x57b2c2['id'],_0x262af9[_0x474744(0x131)]===_0x3a9f0e['Solved']);break;}}}));}};_0x21b789=_0x460c51([_0x4e1644(0x0,_0x1f5180['Inject'](_0x30dd61[_0x46075c(0x126)])),_0x4e1644(0x1,_0x1f5180[_0x46075c(0x148)](_0x356d18[_0x46075c(0x10b)])),_0x4e1644(0x2,_0x1f5180[_0x46075c(0x148)](_0x1f5180['UserManagerService'])),_0x4e1644(0x3,_0x1f5180['Inject'](_0x1f5180['Injector']))],_0x21b789);const _0x52da2c=_0x46075c(0x170),_0x33249a={};var _0x49c18d=Object[_0x46075c(0x117)],_0x193907=Object[_0x46075c(0x169)],_0x4551c8=(_0x163ce4,_0x39a428,_0x470d39,_0x2dba30)=>{const _0x3463ff=_0x46075c;for(var _0x365165=_0x2dba30>0x1?void 0x0:_0x2dba30?_0x193907(_0x39a428,_0x470d39):_0x39a428,_0x5ad1a5=_0x163ce4[_0x3463ff(0x10f)]-0x1,_0x3df120;_0x5ad1a5>=0x0;_0x5ad1a5--)(_0x3df120=_0x163ce4[_0x5ad1a5])&&(_0x365165=(_0x2dba30?_0x3df120(_0x39a428,_0x470d39,_0x365165):_0x3df120(_0x365165))||_0x365165);return _0x2dba30&&_0x365165&&_0x49c18d(_0x39a428,_0x470d39,_0x365165),_0x365165;},_0x2ef8c6=(_0x3615b8,_0x3fc3dd)=>(_0x232ef2,_0x5af7ee)=>_0x3fc3dd(_0x232ef2,_0x5af7ee,_0x3615b8);function _0xcdf302(_0x5b2942,_0xd8b1bb){const _0x4aaff8=_0x46075c,_0x23278f=_0x5b2942[_0x4aaff8(0x178)][0x0];return{..._0xd8b1bb,'id':_0x23278f[_0x4aaff8(0x11c)],'resolved':_0x5b2942[_0x4aaff8(0x131)]===0x1,'dT':_0x5ccc19(_0x23278f['createTimestamp']),'personId':_0x23278f[_0x4aaff8(0x137)],'threadId':_0x23278f[_0x4aaff8(0x12d)]};}function _0x27f86f(_0x6c68ab,_0xf33e60,_0x610d3c){const _0x209bd2=_0x46075c;var _0xad6db3,_0x31c3b9;if(((_0x31c3b9=(_0xad6db3=_0x6c68ab==null?void 0x0:_0x6c68ab[_0x209bd2(0x178)])==null?void 0x0:_0xad6db3['length'])!=null?_0x31c3b9:0x0)>0x0){const _0x4b45c3=(_0x69faa1,_0x2d181c)=>({'id':_0x69faa1[_0x209bd2(0x11c)],'threadId':_0x69faa1[_0x209bd2(0x12d)],'dT':_0x5ccc19(_0x69faa1[_0x209bd2(0x112)]),'personId':_0x69faa1['userId'],'resolved':_0x6c68ab['solved']===_0x3a9f0e['Solved'],'unitId':_0xf33e60,'subUnitId':_0x610d3c,'text':JSON[_0x209bd2(0x167)](_0x69faa1[_0x209bd2(0x12e)]),'parentId':_0x2d181c}),_0x486ac2=_0x4b45c3(_0x6c68ab['replies'][0x0]);return{..._0x486ac2,'children':_0x6c68ab[_0x209bd2(0x178)][_0x209bd2(0x179)](0x1)[_0x209bd2(0x13a)](_0x24d6e2=>_0x4b45c3(_0x24d6e2,_0x486ac2['id']))};}return null;}let _0x104f81=class{constructor(_0x3396d4,_0x14d9d4,_0x565134,_0x5ba09d){const _0x39c89f=_0x46075c;this[_0x39c89f(0x161)]=_0x3396d4,this['_userService']=_0x14d9d4,this[_0x39c89f(0x16e)]=_0x565134,this['_injector']=_0x5ba09d;}async[_0x46075c(0x188)](_0x300e06){const _0x3a039f=_0x46075c;var _0x112fd0,_0x52d743;const {parentId:_0x89ef49,unitId:_0x432151,text:_0x2d6bf3,threadId:_0x43e3b0}=_0x300e06,_0x39ea28=(_0x52d743=(_0x112fd0=_0x2d6bf3[_0x3a039f(0x11e)])==null?void 0x0:_0x112fd0['filter'](_0x2fb888=>_0x2fb888['rangeType']===_0x1f5180[_0x3a039f(0x180)]['COMMENT'])[_0x3a039f(0x13a)](_0x4d1d74=>_0x4d1d74[_0x3a039f(0x12b)]))!=null?_0x52d743:[],_0x4d2d71=JSON[_0x3a039f(0x147)](_0x2d6bf3),_0x3cf494=(await this[_0x3a039f(0x16e)][_0x3a039f(0x14f)](_0x432151))[_0x3a039f(0x119)]();if(_0x89ef49){const _0x17efff={'memberId':_0x3cf494,'unitId':_0x432151,'content':_0x4d2d71,'mention':_0x39ea28,'threadId':_0x43e3b0},_0x5a1fc=(await this[_0x3a039f(0x161)][_0x3a039f(0x114)](_0x3a039f(0x130)+_0x432151+'/reply',{'body':_0x17efff}))['body'][_0x3a039f(0x127)];return{..._0x300e06,'id':_0x5a1fc[_0x3a039f(0x11c)],'dT':_0x1f5180[_0x3a039f(0x16d)](+_0x5a1fc['createTimestamp'])[_0x3a039f(0x134)](_0x3a039f(0x149)),'personId':_0x5a1fc['userId']};}else{const _0x2bb32a={'memberId':_0x3cf494,'unitId':_0x432151,'content':_0x4d2d71,'mention':_0x39ea28},_0xd97d63=await this[_0x3a039f(0x161)]['post']('/universer-api/comment/unit/'+_0x432151+'/add',{'body':_0x2bb32a});return _0xcdf302(_0xd97d63[_0x3a039f(0x174)][_0x3a039f(0x124)],_0x300e06);}}async['updateComment'](_0x3033ef){const _0x3dbb08=_0x46075c;var _0x5e1240,_0x289ba6;const {text:_0x456672,unitId:_0x4f52ec}=_0x3033ef,_0x394e22=(_0x289ba6=(_0x5e1240=_0x456672[_0x3dbb08(0x11e)])==null?void 0x0:_0x5e1240[_0x3dbb08(0x14d)](_0x5ad5f8=>_0x5ad5f8['rangeType']===_0x1f5180[_0x3dbb08(0x180)]['COMMENT'])[_0x3dbb08(0x13a)](_0x3d3a61=>_0x3d3a61[_0x3dbb08(0x12b)]))!=null?_0x289ba6:[],_0x1ecd53=JSON[_0x3dbb08(0x147)](_0x456672),_0x30e1a3=_0x3033ef['threadId'],_0x84b6e0=_0x3033ef['id'],_0x42a1eb={'memberId':(await this[_0x3dbb08(0x16e)][_0x3dbb08(0x14f)](_0x4f52ec))[_0x3dbb08(0x119)](),'unitId':_0x4f52ec,'threadId':_0x30e1a3,'mention':_0x394e22,'content':_0x1ecd53,'replyId':_0x84b6e0},_0x2ae461=await this[_0x3dbb08(0x161)][_0x3dbb08(0x114)]('/universer-api/comment/unit/'+_0x4f52ec+_0x3dbb08(0x13d),{'body':_0x42a1eb});return!_0x2ae461[_0x3dbb08(0x174)][_0x3dbb08(0x110)]||_0x2ae461[_0x3dbb08(0x174)]['error']['code']===0x1;}async[_0x46075c(0x111)](_0x36520c){const _0x541d85=_0x46075c,{unitId:_0x21da37}=_0x36520c,_0x139335=_0x36520c[_0x541d85(0x12d)],_0x2160f7={'memberId':this['_userService']['getCurrentUser']()[_0x541d85(0x122)],'unitId':_0x21da37,'threadId':_0x139335,'solved':_0x36520c[_0x541d85(0x162)]?_0x3a9f0e[_0x541d85(0x177)]:_0x3a9f0e[_0x541d85(0x11d)]},_0x3d2fd8=await this[_0x541d85(0x161)][_0x541d85(0x114)](_0x541d85(0x130)+_0x21da37+_0x541d85(0x16a),{'body':_0x2160f7});return!_0x3d2fd8[_0x541d85(0x174)][_0x541d85(0x110)]||_0x3d2fd8['body'][_0x541d85(0x110)][_0x541d85(0x15e)]===0x1;}async[_0x46075c(0x121)](_0x2c0f79,_0x3c407f,_0x424852,_0x1ae953){const _0x193e07=_0x46075c,_0x4dc8d0={'memberId':(await this[_0x193e07(0x16e)]['requireSession'](_0x2c0f79))[_0x193e07(0x119)](),'threadId':_0x424852,'replyId':_0x1ae953,'unitId':_0x2c0f79},_0x6191d3=await this[_0x193e07(0x161)][_0x193e07(0x114)](_0x193e07(0x130)+_0x2c0f79+_0x193e07(0x156),{'body':_0x4dc8d0});return!_0x6191d3['body'][_0x193e07(0x110)]||_0x6191d3[_0x193e07(0x174)][_0x193e07(0x110)][_0x193e07(0x15e)]===0x1;}async[_0x46075c(0x136)](_0x4b0297,_0x42470d,_0x16a89b){const _0x409cf8=_0x46075c,_0x2f3512={'unitId':_0x4b0297,'threadId':_0x16a89b},_0x301e54=await this[_0x409cf8(0x161)][_0x409cf8(0x114)](_0x409cf8(0x130)+_0x4b0297+'/list',{'body':_0x2f3512}),_0x3a788e=_0x16a89b['map'](_0x315537=>_0x27f86f(_0x301e54[_0x409cf8(0x174)][_0x409cf8(0x106)][_0x315537],_0x4b0297,_0x42470d))[_0x409cf8(0x14d)](Boolean);return Object[_0x409cf8(0x125)](_0x301e54[_0x409cf8(0x174)][_0x409cf8(0x175)])[_0x409cf8(0x173)](_0x5d2aef=>{const _0x20e077=_0x409cf8;this['_userService'][_0x20e077(0x158)](_0x5d2aef);}),_0x3a788e;}[_0x46075c(0x172)](_0x24baac){const _0x2a27bf=_0x46075c;return{'id':_0x24baac['id'],'threadId':_0x24baac['threadId'],'ref':_0x24baac[_0x2a27bf(0x12a)]};}};_0x104f81=_0x4551c8([_0x2ef8c6(0x0,_0x1f5180[_0x46075c(0x148)](_0x3e7d79[_0x46075c(0x183)])),_0x2ef8c6(0x1,_0x1f5180[_0x46075c(0x148)](_0x1f5180[_0x46075c(0x138)])),_0x2ef8c6(0x2,_0x1f5180['Inject'](_0x30dd61[_0x46075c(0x14b)])),_0x2ef8c6(0x3,_0x1f5180[_0x46075c(0x148)](_0x1f5180[_0x46075c(0x15b)]))],_0x104f81);var _0x222cc3=Object[_0x46075c(0x117)],_0x332393=Object['getOwnPropertyDescriptor'],_0x11fade=(_0x5574d0,_0x45a83a,_0xbcf74d,_0x47e2b6)=>{const _0x271c6b=_0x46075c;for(var _0x40a92c=_0x47e2b6>0x1?void 0x0:_0x47e2b6?_0x332393(_0x45a83a,_0xbcf74d):_0x45a83a,_0x346256=_0x5574d0[_0x271c6b(0x10f)]-0x1,_0xbc6f55;_0x346256>=0x0;_0x346256--)(_0xbc6f55=_0x5574d0[_0x346256])&&(_0x40a92c=(_0x47e2b6?_0xbc6f55(_0x45a83a,_0xbcf74d,_0x40a92c):_0xbc6f55(_0x40a92c))||_0x40a92c);return _0x47e2b6&&_0x40a92c&&_0x222cc3(_0x45a83a,_0xbcf74d,_0x40a92c),_0x40a92c;},_0x19d702=(_0x456900,_0x19aee0)=>(_0x1a2ad8,_0x317ca2)=>_0x19aee0(_0x1a2ad8,_0x317ca2,_0x456900);let _0xe5d54f=class extends _0x1f5180[_0x46075c(0x15f)]{constructor(_0x527b06,_0x348942){const _0x310b31=_0x46075c;super(),this['_threadCommentDataSourceService']=_0x527b06,this[_0x310b31(0x10d)]=_0x348942,this[_0x310b31(0x159)]();}[_0x46075c(0x159)](){const _0x70c8f7=_0x46075c;this['_threadCommentDataSourceService'][_0x70c8f7(0x12f)]=this[_0x70c8f7(0x10d)],this['_threadCommentDataSourceService'][_0x70c8f7(0x15d)]=!0x1;}};_0xe5d54f=_0x11fade([_0x19d702(0x0,_0x356d18['IThreadCommentDataSourceService']),_0x19d702(0x1,_0x1f5180[_0x46075c(0x148)](_0x104f81))],_0xe5d54f);var _0x5f09d3=Object[_0x46075c(0x117)],_0x45d578=Object[_0x46075c(0x169)],_0x104799=(_0x2b813f,_0x439e5c,_0x56cd6c)=>_0x439e5c in _0x2b813f?_0x5f09d3(_0x2b813f,_0x439e5c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56cd6c}):_0x2b813f[_0x439e5c]=_0x56cd6c,_0x4c8800=(_0x505730,_0x5254ea,_0x3045f1,_0x55cd0b)=>{for(var _0x9c218d=_0x55cd0b>0x1?void 0x0:_0x55cd0b?_0x45d578(_0x5254ea,_0x3045f1):_0x5254ea,_0x5dd03b=_0x505730['length']-0x1,_0x44dbd2;_0x5dd03b>=0x0;_0x5dd03b--)(_0x44dbd2=_0x505730[_0x5dd03b])&&(_0x9c218d=(_0x55cd0b?_0x44dbd2(_0x5254ea,_0x3045f1,_0x9c218d):_0x44dbd2(_0x9c218d))||_0x9c218d);return _0x55cd0b&&_0x9c218d&&_0x5f09d3(_0x5254ea,_0x3045f1,_0x9c218d),_0x9c218d;},_0x154fd2=(_0x194096,_0x31c21a)=>(_0x27a01d,_0x5b3d38)=>_0x31c21a(_0x27a01d,_0x5b3d38,_0x194096),_0x50da18=(_0x573eb0,_0xb343ad,_0x3718ac)=>_0x104799(_0x573eb0,typeof _0xb343ad!=_0x46075c(0x107)?_0xb343ad+'':_0xb343ad,_0x3718ac);_0x535146[_0x46075c(0x10a)]=class extends _0x1f5180[_0x46075c(0x116)]{constructor(_0x5b4448=_0x33249a,_0x584280,_0x382ca3){const _0x46440f=_0x46075c;super(),this['_config']=_0x5b4448,this[_0x46440f(0x163)]=_0x584280,this[_0x46440f(0x18a)]=_0x382ca3;const {..._0x1df52c}=_0x1f5180[_0x46440f(0x182)]({},_0x33249a,this['_config']);this[_0x46440f(0x18a)][_0x46440f(0x135)](_0x52da2c,_0x1df52c);}['onStarting'](){const _0x1fa4b3=_0x46075c;[[_0x104f81],[_0xe5d54f],[_0x21b789]][_0x1fa4b3(0x173)](_0x55a127=>{const _0x6fcedc=_0x1fa4b3;this[_0x6fcedc(0x163)]['add'](_0x55a127);});}['onReady'](){const _0x1dac3c=_0x46075c;this['_injector']['get'](_0xe5d54f),this[_0x1dac3c(0x163)][_0x1dac3c(0x166)](_0x21b789);}},_0x50da18(_0x535146[_0x46075c(0x10a)],_0x46075c(0x17e),_0xda75df),_0x50da18(_0x535146[_0x46075c(0x10a)],_0x46075c(0x15a),_0x1f5180[_0x46075c(0x133)]['UNIVER_UNKNOWN']),_0x535146['UniverThreadCommentDataSourcePlugin']=_0x4c8800([_0x1f5180[_0x46075c(0x13f)](_0x257271[_0x46075c(0x17b)],_0x30dd61[_0x46075c(0x151)],_0x3f0c42[_0x46075c(0x113)]),_0x154fd2(0x1,_0x1f5180['Inject'](_0x1f5180['Injector'])),_0x154fd2(0x2,_0x1f5180[_0x46075c(0x115)])],_0x535146[_0x46075c(0x10a)]),Object[_0x46075c(0x117)](_0x535146,Symbol[_0x46075c(0x150)],{'value':_0x46075c(0x157)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.5.3",
3
+ "version": "0.5.4-nightly.202501131606",
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.5.3",
49
- "@univerjs-pro/license": "0.5.3",
50
- "@univerjs/protocol": "0.1.40-alpha.10",
51
- "@univerjs/core": "0.5.3",
52
- "@univerjs/network": "0.5.3",
53
- "@univerjs/thread-comment-ui": "0.5.3",
54
- "@univerjs/thread-comment": "0.5.3"
48
+ "@univerjs-pro/collaboration-client": "0.5.4-nightly.202501131606",
49
+ "@univerjs-pro/license": "0.5.4-nightly.202501131606",
50
+ "@univerjs/core": "0.5.4-nightly.202501131606",
51
+ "@univerjs/network": "0.5.4-nightly.202501131606",
52
+ "@univerjs/thread-comment-ui": "0.5.4-nightly.202501131606",
53
+ "@univerjs/thread-comment": "0.5.4-nightly.202501131606",
54
+ "@univerjs/protocol": "0.1.40-alpha.10"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.7.2",
59
- "vite": "^6.0.6",
59
+ "vite": "^6.0.7",
60
60
  "vitest": "^2.1.8",
61
- "@univerjs-infra/shared": "0.5.3"
61
+ "@univerjs-infra/shared": "0.5.4"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",