@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506141606 → 0.8.1-nightly.202506161607

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 _0x34c9d3=_0x1012;(function(_0x42e8ea,_0x2f22a7){const _0xf7b0d=_0x1012,_0x300649=_0x42e8ea();while(!![]){try{const _0x38d2bb=parseInt(_0xf7b0d(0x225))/0x1+parseInt(_0xf7b0d(0x1de))/0x2*(parseInt(_0xf7b0d(0x1ea))/0x3)+-parseInt(_0xf7b0d(0x1da))/0x4*(parseInt(_0xf7b0d(0x20f))/0x5)+-parseInt(_0xf7b0d(0x208))/0x6*(-parseInt(_0xf7b0d(0x1fc))/0x7)+-parseInt(_0xf7b0d(0x214))/0x8+-parseInt(_0xf7b0d(0x1e1))/0x9*(parseInt(_0xf7b0d(0x1ec))/0xa)+parseInt(_0xf7b0d(0x1c1))/0xb;if(_0x38d2bb===_0x2f22a7)break;else _0x300649['push'](_0x300649['shift']());}catch(_0x51d758){_0x300649['push'](_0x300649['shift']());}}}(_0x289e,0xe45c8));Object[_0x34c9d3(0x1dc)](exports,Symbol['toStringTag'],{'value':_0x34c9d3(0x1b7)});const b=require(_0x34c9d3(0x228)),T=require(_0x34c9d3(0x1f4)),c=require('@univerjs/core'),j=require(_0x34c9d3(0x1bb)),M=require(_0x34c9d3(0x213)),w=require(_0x34c9d3(0x207)),P=require('@univerjs/network'),U=_0x34c9d3(0x1c8);function _0x1012(_0x1d639f,_0x3af2de){const _0x289e25=_0x289e();return _0x1012=function(_0x1012f8,_0x3da381){_0x1012f8=_0x1012f8-0x1b3;let _0x444c90=_0x289e25[_0x1012f8];return _0x444c90;},_0x1012(_0x1d639f,_0x3af2de);}var I=(_0x24083d=>(_0x24083d[_0x24083d[_0x34c9d3(0x1dd)]=0x0]=_0x34c9d3(0x1dd),_0x24083d[_0x24083d[_0x34c9d3(0x202)]=0x1]='Solved',_0x24083d[_0x24083d[_0x34c9d3(0x1f7)]=-0x1]=_0x34c9d3(0x1f7),_0x24083d))(I||{}),v=(_0x257672=>(_0x257672[_0x257672[_0x34c9d3(0x1c0)]=0x0]='Unknown',_0x257672[_0x257672[_0x34c9d3(0x20b)]=0x1]=_0x34c9d3(0x20b),_0x257672[_0x257672[_0x34c9d3(0x21a)]=0x2]=_0x34c9d3(0x21a),_0x257672[_0x257672[_0x34c9d3(0x1f9)]=0x3]=_0x34c9d3(0x1f9),_0x257672[_0x257672[_0x34c9d3(0x1ed)]=0x4]=_0x34c9d3(0x1ed),_0x257672[_0x257672[_0x34c9d3(0x1bf)]=0x5]='Solve',_0x257672[_0x257672[_0x34c9d3(0x1f7)]=-0x1]=_0x34c9d3(0x1f7),_0x257672))(v||{});const f=_0x252ac2=>c[_0x34c9d3(0x221)](new Date(+_0x252ac2))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x229240,_0x2181f6)=>{const _0x33a30b=_0x34c9d3,_0x206b83=_0x229240[_0x33a30b(0x1c7)](c[_0x33a30b(0x22c)]),_0x2100cb=_0x229240['get'](P[_0x33a30b(0x203)]);_0x2181f6[_0x33a30b(0x1ef)](_0x344aff=>{const _0x1c58e6=_0x33a30b;_0x206b83['getUser'](_0x344aff)&&_0x2181f6[_0x1c58e6(0x1c4)](_0x344aff);}),_0x2181f6['size']&&(await _0x2100cb[_0x33a30b(0x1c7)](_0x33a30b(0x1cc),{'params':{'userIDs':[..._0x2181f6]}}))[_0x33a30b(0x224)][_0x33a30b(0x1d1)][_0x33a30b(0x1ef)](_0x49dcec=>{const _0x5e1751=_0x33a30b;_0x49dcec&&_0x206b83[_0x5e1751(0x231)](_0x49dcec);});};var $=Object[_0x34c9d3(0x1c6)],E=(_0x4f253c,_0x3efce2,_0x13fd0c,_0x29d451)=>{const _0x5a2fae=_0x34c9d3;for(var _0xb88696=_0x29d451>0x1?void 0x0:_0x29d451?$(_0x3efce2,_0x13fd0c):_0x3efce2,_0xe82e3e=_0x4f253c[_0x5a2fae(0x212)]-0x1,_0x5a3bf4;_0xe82e3e>=0x0;_0xe82e3e--)(_0x5a3bf4=_0x4f253c[_0xe82e3e])&&(_0xb88696=_0x5a3bf4(_0xb88696)||_0xb88696);return _0xb88696;},S=(_0x3b80df,_0x4fa89f)=>(_0x4f93d,_0x3fa97c)=>_0x4fa89f(_0x4f93d,_0x3fa97c,_0x3b80df);let p=class extends c['Disposable']{constructor(_0x4d6931,_0x36f65e,_0xdffb34,_0x40ed09){const _0x661e9a=_0x34c9d3;super(),this[_0x661e9a(0x234)]=_0x4d6931,this['_threadCommentModel']=_0x36f65e,this[_0x661e9a(0x1f3)]=_0xdffb34,this[_0x661e9a(0x1b5)]=_0x40ed09,this['_init'](),this[_0x661e9a(0x1e3)]();}['_initUserSync'](){const _0x37a837=_0x34c9d3;this[_0x37a837(0x1e8)](this['_threadCommentModel'][_0x37a837(0x1ce)][_0x37a837(0x1d2)](w[_0x37a837(0x216)](0x10))[_0x37a837(0x22e)](_0x172899=>{const _0x44393b=_0x37a837,_0xf093f5=new Set();_0x172899['forEach'](_0x58d908=>{const _0x20cc59=_0x1012;switch(_0x58d908[_0x20cc59(0x1cf)]){case _0x20cc59(0x223):{const _0x3db0dc=_0x58d908['payload'][_0x20cc59(0x1d0)];_0xf093f5[_0x20cc59(0x223)](_0x3db0dc);break;}}}),R(this[_0x44393b(0x1b5)],_0xf093f5);}));}[_0x34c9d3(0x21f)](){const _0x58fba3=_0x34c9d3;this[_0x58fba3(0x1e8)](this[_0x58fba3(0x234)][_0x58fba3(0x1ce)][_0x58fba3(0x22e)](async _0x300010=>{const _0x115ed6=_0x58fba3;var _0x366762,_0x5f4cd2,_0x5e003e,_0x33685f;const _0x321e80=(_0x366762=this[_0x115ed6(0x1bc)]['getUnit'](_0x300010['unitId'])[_0x115ed6(0x21e)](_0x37d584=>_0x37d584[_0x115ed6(0x1fb)]===_0x300010['threadId']))==null?void 0x0:_0x366762[_0x115ed6(0x206)];if(!_0x321e80)return;const {unitId:_0x111fc5,subUnitId:_0x45849d}=_0x321e80;switch(_0x300010[_0x115ed6(0x1c2)]&&this['_userService'][_0x115ed6(0x231)](_0x300010[_0x115ed6(0x1c2)]),_0x300010[_0x115ed6(0x1cf)]){case v['Add']:break;case v[_0x115ed6(0x21a)]:{this[_0x115ed6(0x1bc)][_0x115ed6(0x210)](_0x111fc5,_0x45849d,{'unitId':_0x111fc5,'subUnitId':_0x45849d,'ref':'','id':_0x300010[_0x115ed6(0x205)],'dT':f(+_0x300010[_0x115ed6(0x1d7)]),'threadId':_0x300010[_0x115ed6(0x1fb)],'personId':(_0x5e003e=(_0x5f4cd2=_0x300010[_0x115ed6(0x1c2)])==null?void 0x0:_0x5f4cd2[_0x115ed6(0x20d)])!=null?_0x5e003e:_0x300010['userId'],'text':JSON[_0x115ed6(0x1e0)](_0x300010[_0x115ed6(0x1d5)]),'parentId':_0x321e80['id']});break;}case v[_0x115ed6(0x1ed)]:{const _0xcabfc3=this[_0x115ed6(0x1bc)][_0x115ed6(0x1b6)](_0x111fc5,_0x45849d,_0x300010[_0x115ed6(0x205)]);_0xcabfc3&&_0xcabfc3[_0x115ed6(0x1d6)]&&this['_threadCommentModel'][_0x115ed6(0x1eb)](_0x111fc5,_0x45849d,_0x300010[_0x115ed6(0x205)]);break;}case v[_0x115ed6(0x1f9)]:{this[_0x115ed6(0x1bc)]['updateComment'](_0x111fc5,_0x45849d,{'commentId':_0x300010[_0x115ed6(0x205)],'text':JSON['parse'](_0x300010[_0x115ed6(0x1d5)])});break;}case v[_0x115ed6(0x1bf)]:{const _0x175c6e=(_0x33685f=this[_0x115ed6(0x1bc)][_0x115ed6(0x1bd)](_0x300010[_0x115ed6(0x1db)])[_0x115ed6(0x21e)](_0x503e9f=>_0x503e9f[_0x115ed6(0x1fb)]===_0x300010[_0x115ed6(0x1fb)]))==null?void 0x0:_0x33685f[_0x115ed6(0x206)];_0x175c6e&&this[_0x115ed6(0x1bc)][_0x115ed6(0x1fe)](_0x111fc5,_0x45849d,_0x175c6e['id'],_0x300010['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x34c9d3(0x1e2)](b[_0x34c9d3(0x1d9)])),S(0x1,c[_0x34c9d3(0x1e2)](M[_0x34c9d3(0x1c3)])),S(0x2,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x22c)])),S(0x3,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)]))],p);const q=_0x34c9d3(0x22a),D={};var A=Object[_0x34c9d3(0x1c6)],x=(_0x379452,_0x4e4f0f,_0x56743d,_0x4310ef)=>{const _0x1d4c7e=_0x34c9d3;for(var _0x369920=_0x4310ef>0x1?void 0x0:_0x4310ef?A(_0x4e4f0f,_0x56743d):_0x4e4f0f,_0x2ea787=_0x379452[_0x1d4c7e(0x212)]-0x1,_0x16b3f3;_0x2ea787>=0x0;_0x2ea787--)(_0x16b3f3=_0x379452[_0x2ea787])&&(_0x369920=_0x16b3f3(_0x369920)||_0x369920);return _0x369920;},_=(_0x553b3d,_0x3fcdd6)=>(_0x5dec22,_0x940576)=>_0x3fcdd6(_0x5dec22,_0x940576,_0x553b3d);function Y(_0x4f884a,_0xd0bd13){const _0x1e3f18=_0x34c9d3,_0x251c8c=_0x4f884a[_0x1e3f18(0x1cd)][0x0];return{..._0xd0bd13,'id':_0x251c8c[_0x1e3f18(0x205)],'resolved':_0x4f884a[_0x1e3f18(0x1ca)]===0x1,'dT':f(_0x251c8c[_0x1e3f18(0x1d7)]),'personId':_0x251c8c[_0x1e3f18(0x21c)],'threadId':_0x251c8c[_0x1e3f18(0x1fb)]};}function _0x289e(){const _0x183ea7=['syncUpdateMutationToColla','resolveComment','COMMENT','IThreadCommentDataSourceService','CollaborationSessionService','Solved','HTTPService','UniverLicensePlugin','replyId','root','rxjs','3951978lCvTRJ','comments','_httpService','Add','onReady','userID','filter','7435jNLGXW','addComment','ref','length','@univerjs/thread-comment','12523584IKJKQW','dataSource','bufferTime','CustomRangeType','UNIVER_UNKNOWN','onStarting','Reply','resolved','userId','/reply','find','_init','map','dayjs','/edit','add','body','1572119KkzitM','slice','pluginName','@univerjs-pro/collaboration-client','DependentOn','thread-comment-data-source.config','UniverCollaborationClientPlugin','UserManagerService','/add','subscribe','symbol','/delete','addUser','_sessionService','getCurrentUser','_commentService','/universer-api/comment/unit/','comment','format','_injector','getComment','Module','updateComment','merge','stringify','@univerjs/thread-comment-ui','_threadCommentModel','getUnit','requireSession','Solve','Unknown','16882547WPbRVz','user','ThreadCommentModel','delete','_initDataSource','getOwnPropertyDescriptor','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','solved','_config','/universer-api/user/list','replies','commentUpdate$','type','personId','users','pipe','listComments','getMemberID','content','parentId','createTimestamp','values','CommentService','3876dVvrWn','unitId','defineProperty','OpenOrReOpen','6TNFTnj','Injector','parse','54GQoBSI','Inject','_initUserSync','customRanges','IConfigService','rangeType','reply','disposeWithMe','/list','1774314TSQCgY','deleteComment','2663590CBGFFh','Delete','_configService','forEach','Disposable','rangeId','code','_userService','@univerjs-pro/license','_threadCommentDataSource','error','UNRECOGNIZED','post','Edit','_threadCommentDataSourceService','threadId','7mxJIIT'];_0x289e=function(){return _0x183ea7;};return _0x289e();}function G(_0x4aec79,_0x36a157,_0x487d2f){const _0x452633=_0x34c9d3;var _0x47edbe,_0x5de2f3;if(((_0x5de2f3=(_0x47edbe=_0x4aec79==null?void 0x0:_0x4aec79[_0x452633(0x1cd)])==null?void 0x0:_0x47edbe[_0x452633(0x212)])!=null?_0x5de2f3:0x0)>0x0){const _0x2cbc4a=(_0x1c056b,_0x2ff5d0)=>({'id':_0x1c056b[_0x452633(0x205)],'threadId':_0x1c056b[_0x452633(0x1fb)],'dT':f(_0x1c056b['createTimestamp']),'personId':_0x1c056b[_0x452633(0x21c)],'resolved':_0x4aec79[_0x452633(0x1ca)]===I[_0x452633(0x202)],'unitId':_0x36a157,'subUnitId':_0x487d2f,'text':JSON[_0x452633(0x1e0)](_0x1c056b[_0x452633(0x1d5)]),'parentId':_0x2ff5d0}),_0x2a35ab=_0x2cbc4a(_0x4aec79[_0x452633(0x1cd)][0x0]);return{..._0x2a35ab,'children':_0x4aec79[_0x452633(0x1cd)][_0x452633(0x226)](0x1)['map'](_0x2e8d71=>_0x2cbc4a(_0x2e8d71,_0x2a35ab['id']))};}return null;}let g=class{constructor(_0x367ebc,_0x1943da,_0x39cd4f,_0x39e7bf){const _0x171b70=_0x34c9d3;this['_httpService']=_0x367ebc,this[_0x171b70(0x1f3)]=_0x1943da,this[_0x171b70(0x232)]=_0x39cd4f,this['_injector']=_0x39e7bf;}async[_0x34c9d3(0x210)](_0x45915a){const _0x2fb839=_0x34c9d3;var _0x92bdc1,_0x535fb9;const {parentId:_0x34e78d,unitId:_0x77dbb1,text:_0x263a49,threadId:_0x47e800}=_0x45915a,_0x16ddb6=(_0x535fb9=(_0x92bdc1=_0x263a49[_0x2fb839(0x1e4)])==null?void 0x0:_0x92bdc1[_0x2fb839(0x20e)](_0x15e588=>_0x15e588[_0x2fb839(0x1e6)]===c[_0x2fb839(0x217)][_0x2fb839(0x1ff)])['map'](_0xf56af8=>_0xf56af8[_0x2fb839(0x1f1)]))!=null?_0x535fb9:[],_0xcf4396=JSON[_0x2fb839(0x1ba)](_0x263a49),_0x78f452=(await this[_0x2fb839(0x232)][_0x2fb839(0x1be)](_0x77dbb1))[_0x2fb839(0x1d4)]();if(_0x34e78d){const _0x3fbe93={'memberId':_0x78f452,'unitId':_0x77dbb1,'content':_0xcf4396,'mention':_0x16ddb6,'threadId':_0x47e800},_0x109fdb=(await this['_httpService'][_0x2fb839(0x1f8)](_0x2fb839(0x235)+_0x77dbb1+_0x2fb839(0x21d),{'body':_0x3fbe93}))[_0x2fb839(0x224)][_0x2fb839(0x1e7)];return{..._0x45915a,'id':_0x109fdb['replyId'],'dT':c['dayjs'](+_0x109fdb[_0x2fb839(0x1d7)])[_0x2fb839(0x1b4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x109fdb[_0x2fb839(0x21c)]};}else{const _0x41d972={'memberId':_0x78f452,'unitId':_0x77dbb1,'content':_0xcf4396,'mention':_0x16ddb6},_0x29b9df=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x77dbb1+_0x2fb839(0x22d),{'body':_0x41d972});return Y(_0x29b9df[_0x2fb839(0x224)][_0x2fb839(0x1b3)],_0x45915a);}}async[_0x34c9d3(0x1b8)](_0x45e56d){const _0xb1b234=_0x34c9d3;var _0x16040b,_0x3df359;const {text:_0x11e502,unitId:_0x3d7f3a}=_0x45e56d,_0x4e7da5=(_0x3df359=(_0x16040b=_0x11e502['customRanges'])==null?void 0x0:_0x16040b['filter'](_0x1f759e=>_0x1f759e[_0xb1b234(0x1e6)]===c[_0xb1b234(0x217)]['COMMENT'])[_0xb1b234(0x220)](_0x520d0c=>_0x520d0c[_0xb1b234(0x1f1)]))!=null?_0x3df359:[],_0x2d9e12=JSON['stringify'](_0x11e502),_0x53f67d=_0x45e56d[_0xb1b234(0x1fb)],_0xfbb47=_0x45e56d['id'],_0x121de6={'memberId':(await this['_sessionService'][_0xb1b234(0x1be)](_0x3d7f3a))[_0xb1b234(0x1d4)](),'unitId':_0x3d7f3a,'threadId':_0x53f67d,'mention':_0x4e7da5,'content':_0x2d9e12,'replyId':_0xfbb47},_0x40ab00=await this['_httpService'][_0xb1b234(0x1f8)](_0xb1b234(0x235)+_0x3d7f3a+_0xb1b234(0x222),{'body':_0x121de6});return!_0x40ab00[_0xb1b234(0x224)]['error']||_0x40ab00[_0xb1b234(0x224)][_0xb1b234(0x1f6)][_0xb1b234(0x1f2)]===0x1;}async[_0x34c9d3(0x1fe)](_0x660ed4){const _0x3dc4d7=_0x34c9d3,{unitId:_0x4432a0}=_0x660ed4,_0x12cd23=_0x660ed4['threadId'],_0x3761e7={'memberId':this[_0x3dc4d7(0x1f3)][_0x3dc4d7(0x233)]()[_0x3dc4d7(0x20d)],'unitId':_0x4432a0,'threadId':_0x12cd23,'solved':_0x660ed4[_0x3dc4d7(0x21b)]?I['Solved']:I['OpenOrReOpen']},_0x11350e=await this[_0x3dc4d7(0x20a)][_0x3dc4d7(0x1f8)](_0x3dc4d7(0x235)+_0x4432a0+'/solved',{'body':_0x3761e7});return!_0x11350e['body'][_0x3dc4d7(0x1f6)]||_0x11350e[_0x3dc4d7(0x224)]['error']['code']===0x1;}async[_0x34c9d3(0x1eb)](_0x20fd5a,_0x3616c2,_0x43ea44,_0x1351b1){const _0x319a03=_0x34c9d3,_0x1695c9={'memberId':(await this[_0x319a03(0x232)][_0x319a03(0x1be)](_0x20fd5a))[_0x319a03(0x1d4)](),'threadId':_0x43ea44,'replyId':_0x1351b1,'unitId':_0x20fd5a},_0x125bcc=await this[_0x319a03(0x20a)]['post'](_0x319a03(0x235)+_0x20fd5a+_0x319a03(0x230),{'body':_0x1695c9});return!_0x125bcc[_0x319a03(0x224)][_0x319a03(0x1f6)]||_0x125bcc[_0x319a03(0x224)]['error']['code']===0x1;}async[_0x34c9d3(0x1d3)](_0x3e1300,_0x162693,_0x11f347){const _0x4073c6=_0x34c9d3,_0x592dbd={'unitId':_0x3e1300,'threadId':_0x11f347},_0x49e150=await this[_0x4073c6(0x20a)]['post'](_0x4073c6(0x235)+_0x3e1300+_0x4073c6(0x1e9),{'body':_0x592dbd}),_0x72ef08=_0x11f347['map'](_0x410c5b=>G(_0x49e150[_0x4073c6(0x224)][_0x4073c6(0x209)][_0x410c5b],_0x3e1300,_0x162693))[_0x4073c6(0x20e)](Boolean);return Object[_0x4073c6(0x1d8)](_0x49e150['body']['users'])['forEach'](_0x58cbd8=>{const _0x39f56a=_0x4073c6;this[_0x39f56a(0x1f3)]['addUser'](_0x58cbd8);}),_0x72ef08;}['saveCommentToSnapshot'](_0x36823c){const _0x166abc=_0x34c9d3;return{'id':_0x36823c['id'],'threadId':_0x36823c[_0x166abc(0x1fb)],'ref':_0x36823c[_0x166abc(0x211)]};}};g=x([_(0x0,c['Inject'](P[_0x34c9d3(0x203)])),_(0x1,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x22c)])),_(0x2,c[_0x34c9d3(0x1e2)](b[_0x34c9d3(0x201)])),_(0x3,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)]))],g);var H=Object[_0x34c9d3(0x1c6)],J=(_0x14f027,_0x1e5ffa,_0x689dfc,_0x1dcdde)=>{const _0x3de6bd=_0x34c9d3;for(var _0x57b34d=_0x1dcdde>0x1?void 0x0:_0x1dcdde?H(_0x1e5ffa,_0x689dfc):_0x1e5ffa,_0x3b0168=_0x14f027[_0x3de6bd(0x212)]-0x1,_0x340d03;_0x3b0168>=0x0;_0x3b0168--)(_0x340d03=_0x14f027[_0x3b0168])&&(_0x57b34d=_0x340d03(_0x57b34d)||_0x57b34d);return _0x57b34d;},y=(_0x480305,_0x3dad4e)=>(_0x107c72,_0x6b88e0)=>_0x3dad4e(_0x107c72,_0x6b88e0,_0x480305);let C=class extends c[_0x34c9d3(0x1f0)]{constructor(_0x2b51d6,_0x2483fa){const _0x2ce469=_0x34c9d3;super(),this['_threadCommentDataSourceService']=_0x2b51d6,this[_0x2ce469(0x1f5)]=_0x2483fa,this[_0x2ce469(0x1c5)]();}[_0x34c9d3(0x1c5)](){const _0x1c7934=_0x34c9d3;this[_0x1c7934(0x1fa)][_0x1c7934(0x215)]=this[_0x1c7934(0x1f5)],this[_0x1c7934(0x1fa)][_0x1c7934(0x1fd)]=!0x1;}};C=J([y(0x0,M[_0x34c9d3(0x200)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x34c9d3(0x1dc)],L=Object[_0x34c9d3(0x1c6)],Z=(_0x196b8a,_0x4d0d8e,_0x1e1cfb)=>_0x4d0d8e in _0x196b8a?F(_0x196b8a,_0x4d0d8e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e1cfb}):_0x196b8a[_0x4d0d8e]=_0x1e1cfb,W=(_0x56b858,_0x3a0fd3,_0xbf323e,_0x2a3c07)=>{const _0x441eed=_0x34c9d3;for(var _0x6b97ff=_0x2a3c07>0x1?void 0x0:_0x2a3c07?L(_0x3a0fd3,_0xbf323e):_0x3a0fd3,_0x3f21b0=_0x56b858[_0x441eed(0x212)]-0x1,_0x3a6c63;_0x3f21b0>=0x0;_0x3f21b0--)(_0x3a6c63=_0x56b858[_0x3f21b0])&&(_0x6b97ff=_0x3a6c63(_0x6b97ff)||_0x6b97ff);return _0x6b97ff;},O=(_0x5c6b74,_0x2233ec)=>(_0x513270,_0x402655)=>_0x2233ec(_0x513270,_0x402655,_0x5c6b74),N=(_0x4c9118,_0x4d7b7d,_0x1c5dc6)=>Z(_0x4c9118,typeof _0x4d7b7d!=_0x34c9d3(0x22f)?_0x4d7b7d+'':_0x4d7b7d,_0x1c5dc6);exports[_0x34c9d3(0x1c9)]=class extends c['Plugin']{constructor(_0x562ae3=D,_0x513023,_0x365f54){const _0x3ade65=_0x34c9d3;super(),this[_0x3ade65(0x1cb)]=_0x562ae3,this[_0x3ade65(0x1b5)]=_0x513023,this[_0x3ade65(0x1ee)]=_0x365f54;const {..._0xbea690}=c[_0x3ade65(0x1b9)]({},D,this['_config']);this[_0x3ade65(0x1ee)]['setConfig'](q,_0xbea690);}[_0x34c9d3(0x219)](){[[g],[C],[p]]['forEach'](_0x3ef8ca=>{const _0x25ab1a=_0x1012;this[_0x25ab1a(0x1b5)]['add'](_0x3ef8ca);});}[_0x34c9d3(0x20c)](){const _0x1ee295=_0x34c9d3;this['_injector'][_0x1ee295(0x1c7)](C),this[_0x1ee295(0x1b5)][_0x1ee295(0x1c7)](p);}},N(exports[_0x34c9d3(0x1c9)],_0x34c9d3(0x227),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x34c9d3(0x1cf),c['UniverInstanceType'][_0x34c9d3(0x218)]),exports[_0x34c9d3(0x1c9)]=W([c[_0x34c9d3(0x229)](j['UniverThreadCommentUIPlugin'],b[_0x34c9d3(0x22b)],T[_0x34c9d3(0x204)]),O(0x1,c[_0x34c9d3(0x1e2)](c[_0x34c9d3(0x1df)])),O(0x2,c[_0x34c9d3(0x1e5)])],exports[_0x34c9d3(0x1c9)]);
1
+ 'use strict';const _0x5a7473=_0x5780;(function(_0x2afd33,_0x1cf00a){const _0x3875dc=_0x5780,_0x53334b=_0x2afd33();while(!![]){try{const _0x2915d8=-parseInt(_0x3875dc(0x197))/0x1*(parseInt(_0x3875dc(0x1b1))/0x2)+-parseInt(_0x3875dc(0x175))/0x3*(parseInt(_0x3875dc(0x1ae))/0x4)+-parseInt(_0x3875dc(0x1bc))/0x5+parseInt(_0x3875dc(0x172))/0x6*(-parseInt(_0x3875dc(0x187))/0x7)+parseInt(_0x3875dc(0x18c))/0x8+-parseInt(_0x3875dc(0x159))/0x9*(parseInt(_0x3875dc(0x1bf))/0xa)+parseInt(_0x3875dc(0x192))/0xb;if(_0x2915d8===_0x1cf00a)break;else _0x53334b['push'](_0x53334b['shift']());}catch(_0x2d864b){_0x53334b['push'](_0x53334b['shift']());}}}(_0x46f5,0x41f53));function _0x46f5(){const _0x3a6f17=['_injector','addUser','stringify','UniverCollaborationClientPlugin','comments','CustomRangeType','91TSUspa','type','_userService','@univerjs-pro/license','replies','3741544FVhogi','UNRECOGNIZED','users','OpenOrReOpen','UniverInstanceType','/universer-api/user/list','13349094UDJiZX','delete','merge','symbol','@univerjs/core','13qGUQMK','Solved','post','/delete','body','error','/universer-api/comment/unit/','Disposable','onStarting','payload','_initUserSync','_httpService','requireSession','UserManagerService','replyId','setConfig','pipe','/reply','_threadCommentModel','_config','get','personId','@univerjs/thread-comment','6484obhjnw','content','rangeId','81586sSbQmQ','_configService','@univerjs/thread-comment-ui','syncUpdateMutationToColla','HTTPService','_commentService','Solve','Module','bufferTime','/solved','UNIVER_UNKNOWN','288330japzTy','YYYY/MM/DD\x20HH:mm','unitId','5079490pLCpUZ','/add','size','/list','Plugin','ref','getUser','Injector','@univerjs/network','disposeWithMe','_initDataSource','filter','Inject','UniverLicensePlugin','pluginName','COMMENT','code','rxjs','map','_init','rangeType','customRanges','subscribe','solved','deleteComment','createTimestamp','defineProperty','find','userID','9WIUhPv','addComment','_sessionService','UniverThreadCommentDataSourcePlugin','updateComment','getMemberID','length','parse','threadId','parentId','/edit','resolveComment','root','values','_threadCommentDataSourceService','IConfigService','Add','onReady','DependentOn','getUnit','commentUpdate$','Delete','add','listComments','Edit','123762hjhTzi','dayjs','userId','87UUffLU','format','saveCommentToSnapshot','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','Reply','forEach','UniverThreadCommentUIPlugin','CommentService','comment','_threadCommentDataSource'];_0x46f5=function(){return _0x3a6f17;};return _0x46f5();}Object[_0x5a7473(0x156)](exports,Symbol['toStringTag'],{'value':_0x5a7473(0x1b8)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x5a7473(0x18a)),c=require(_0x5a7473(0x196)),j=require(_0x5a7473(0x1b3)),M=require(_0x5a7473(0x1ad)),w=require(_0x5a7473(0x14d)),P=require(_0x5a7473(0x1c7)),U=_0x5a7473(0x179);var I=(_0x4fe93a=>(_0x4fe93a[_0x4fe93a[_0x5a7473(0x18f)]=0x0]='OpenOrReOpen',_0x4fe93a[_0x4fe93a[_0x5a7473(0x198)]=0x1]=_0x5a7473(0x198),_0x4fe93a[_0x4fe93a[_0x5a7473(0x18d)]=-0x1]=_0x5a7473(0x18d),_0x4fe93a))(I||{}),v=(_0x592765=>(_0x592765[_0x592765['Unknown']=0x0]='Unknown',_0x592765[_0x592765[_0x5a7473(0x169)]=0x1]='Add',_0x592765[_0x592765[_0x5a7473(0x17b)]=0x2]=_0x5a7473(0x17b),_0x592765[_0x592765[_0x5a7473(0x171)]=0x3]='Edit',_0x592765[_0x592765[_0x5a7473(0x16e)]=0x4]=_0x5a7473(0x16e),_0x592765[_0x592765[_0x5a7473(0x1b7)]=0x5]=_0x5a7473(0x1b7),_0x592765[_0x592765[_0x5a7473(0x18d)]=-0x1]=_0x5a7473(0x18d),_0x592765))(v||{});const f=_0x30aae6=>c['dayjs'](new Date(+_0x30aae6))[_0x5a7473(0x176)](_0x5a7473(0x1bd)),R=async(_0x47cd8b,_0x2a508c)=>{const _0x1acf27=_0x5a7473,_0x5b38f1=_0x47cd8b[_0x1acf27(0x1ab)](c[_0x1acf27(0x1a4)]),_0xeab1c8=_0x47cd8b['get'](P[_0x1acf27(0x1b5)]);_0x2a508c[_0x1acf27(0x17c)](_0x315d9b=>{const _0x4aad08=_0x1acf27;_0x5b38f1[_0x4aad08(0x1c5)](_0x315d9b)&&_0x2a508c[_0x4aad08(0x193)](_0x315d9b);}),_0x2a508c[_0x1acf27(0x1c1)]&&(await _0xeab1c8[_0x1acf27(0x1ab)](_0x1acf27(0x191),{'params':{'userIDs':[..._0x2a508c]}}))['body'][_0x1acf27(0x18e)][_0x1acf27(0x17c)](_0x1179e6=>{_0x1179e6&&_0x5b38f1['addUser'](_0x1179e6);});};var $=Object[_0x5a7473(0x17a)],E=(_0x1be346,_0xc501f9,_0x1eae46,_0x42c049)=>{const _0x2bb034=_0x5a7473;for(var _0x259c94=_0x42c049>0x1?void 0x0:_0x42c049?$(_0xc501f9,_0x1eae46):_0xc501f9,_0x66fdf6=_0x1be346[_0x2bb034(0x15f)]-0x1,_0x320c27;_0x66fdf6>=0x0;_0x66fdf6--)(_0x320c27=_0x1be346[_0x66fdf6])&&(_0x259c94=_0x320c27(_0x259c94)||_0x259c94);return _0x259c94;},S=(_0x52d42c,_0xadaa7d)=>(_0x6cd097,_0x29cf7d)=>_0xadaa7d(_0x6cd097,_0x29cf7d,_0x52d42c);let p=class extends c[_0x5a7473(0x19e)]{constructor(_0xea76ee,_0x57e70d,_0x25275c,_0x10d749){const _0x1945d5=_0x5a7473;super(),this[_0x1945d5(0x1b6)]=_0xea76ee,this['_threadCommentModel']=_0x57e70d,this[_0x1945d5(0x189)]=_0x25275c,this[_0x1945d5(0x181)]=_0x10d749,this[_0x1945d5(0x14f)](),this[_0x1945d5(0x1a1)]();}[_0x5a7473(0x1a1)](){const _0x89d0e3=_0x5a7473;this['disposeWithMe'](this[_0x89d0e3(0x1a9)][_0x89d0e3(0x16d)][_0x89d0e3(0x1a7)](w[_0x89d0e3(0x1b9)](0x10))[_0x89d0e3(0x152)](_0x5ebfac=>{const _0x1d48ee=new Set();_0x5ebfac['forEach'](_0x39326f=>{const _0x593bd=_0x5780;switch(_0x39326f[_0x593bd(0x188)]){case'add':{const _0x540ec6=_0x39326f[_0x593bd(0x1a0)][_0x593bd(0x1ac)];_0x1d48ee['add'](_0x540ec6);break;}}}),R(this['_injector'],_0x1d48ee);}));}[_0x5a7473(0x14f)](){const _0x25366b=_0x5a7473;this[_0x25366b(0x1c8)](this[_0x25366b(0x1b6)][_0x25366b(0x16d)][_0x25366b(0x152)](async _0x4c61c2=>{const _0x366e3b=_0x25366b;var _0x2304d6,_0x32cb6d,_0x115194,_0xb21282;const _0xd2669a=(_0x2304d6=this[_0x366e3b(0x1a9)][_0x366e3b(0x16c)](_0x4c61c2[_0x366e3b(0x1be)])[_0x366e3b(0x157)](_0x224dd9=>_0x224dd9[_0x366e3b(0x161)]===_0x4c61c2[_0x366e3b(0x161)]))==null?void 0x0:_0x2304d6[_0x366e3b(0x165)];if(!_0xd2669a)return;const {unitId:_0x3fad69,subUnitId:_0x233258}=_0xd2669a;switch(_0x4c61c2['user']&&this[_0x366e3b(0x189)][_0x366e3b(0x182)](_0x4c61c2['user']),_0x4c61c2[_0x366e3b(0x188)]){case v[_0x366e3b(0x169)]:break;case v[_0x366e3b(0x17b)]:{this[_0x366e3b(0x1a9)]['addComment'](_0x3fad69,_0x233258,{'unitId':_0x3fad69,'subUnitId':_0x233258,'ref':'','id':_0x4c61c2['replyId'],'dT':f(+_0x4c61c2['createTimestamp']),'threadId':_0x4c61c2[_0x366e3b(0x161)],'personId':(_0x115194=(_0x32cb6d=_0x4c61c2['user'])==null?void 0x0:_0x32cb6d['userID'])!=null?_0x115194:_0x4c61c2[_0x366e3b(0x174)],'text':JSON[_0x366e3b(0x160)](_0x4c61c2['content']),'parentId':_0xd2669a['id']});break;}case v['Delete']:{const _0x56e54d=this['_threadCommentModel']['getComment'](_0x3fad69,_0x233258,_0x4c61c2[_0x366e3b(0x1a5)]);_0x56e54d&&_0x56e54d[_0x366e3b(0x162)]&&this[_0x366e3b(0x1a9)][_0x366e3b(0x154)](_0x3fad69,_0x233258,_0x4c61c2[_0x366e3b(0x1a5)]);break;}case v[_0x366e3b(0x171)]:{this[_0x366e3b(0x1a9)][_0x366e3b(0x15d)](_0x3fad69,_0x233258,{'commentId':_0x4c61c2[_0x366e3b(0x1a5)],'text':JSON[_0x366e3b(0x160)](_0x4c61c2[_0x366e3b(0x1af)])});break;}case v['Solve']:{const _0x3f3851=(_0xb21282=this[_0x366e3b(0x1a9)][_0x366e3b(0x16c)](_0x4c61c2['unitId'])['find'](_0x1bee86=>_0x1bee86[_0x366e3b(0x161)]===_0x4c61c2[_0x366e3b(0x161)]))==null?void 0x0:_0xb21282[_0x366e3b(0x165)];_0x3f3851&&this[_0x366e3b(0x1a9)]['resolveComment'](_0x3fad69,_0x233258,_0x3f3851['id'],_0x4c61c2['solved']===I[_0x366e3b(0x198)]);break;}}}));}};p=E([S(0x0,c[_0x5a7473(0x1cb)](b[_0x5a7473(0x17e)])),S(0x1,c[_0x5a7473(0x1cb)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x5a7473(0x1a4)])),S(0x3,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)]))],p);const q=_0x5a7473(0x178),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x127a76,_0x254249,_0x5c4d87,_0x17c975)=>{for(var _0x570008=_0x17c975>0x1?void 0x0:_0x17c975?A(_0x254249,_0x5c4d87):_0x254249,_0x5ca767=_0x127a76['length']-0x1,_0x346c03;_0x5ca767>=0x0;_0x5ca767--)(_0x346c03=_0x127a76[_0x5ca767])&&(_0x570008=_0x346c03(_0x570008)||_0x570008);return _0x570008;},_=(_0x20151f,_0x39145d)=>(_0x5b47e3,_0x327454)=>_0x39145d(_0x5b47e3,_0x327454,_0x20151f);function _0x5780(_0x59a013,_0x4391d8){const _0x46f5f8=_0x46f5();return _0x5780=function(_0x578019,_0x5d7ae9){_0x578019=_0x578019-0x149;let _0x302a70=_0x46f5f8[_0x578019];return _0x302a70;},_0x5780(_0x59a013,_0x4391d8);}function Y(_0x9b454f,_0x479504){const _0x5a32ee=_0x5a7473,_0x3e69f6=_0x9b454f[_0x5a32ee(0x18b)][0x0];return{..._0x479504,'id':_0x3e69f6[_0x5a32ee(0x1a5)],'resolved':_0x9b454f[_0x5a32ee(0x153)]===0x1,'dT':f(_0x3e69f6['createTimestamp']),'personId':_0x3e69f6[_0x5a32ee(0x174)],'threadId':_0x3e69f6[_0x5a32ee(0x161)]};}function G(_0x572a91,_0x11e351,_0x40ea76){const _0x319638=_0x5a7473;var _0x379fd2,_0x51bc03;if(((_0x51bc03=(_0x379fd2=_0x572a91==null?void 0x0:_0x572a91[_0x319638(0x18b)])==null?void 0x0:_0x379fd2[_0x319638(0x15f)])!=null?_0x51bc03:0x0)>0x0){const _0x47a41f=(_0x4e0dfd,_0x3ab2ca)=>({'id':_0x4e0dfd[_0x319638(0x1a5)],'threadId':_0x4e0dfd['threadId'],'dT':f(_0x4e0dfd[_0x319638(0x155)]),'personId':_0x4e0dfd[_0x319638(0x174)],'resolved':_0x572a91[_0x319638(0x153)]===I[_0x319638(0x198)],'unitId':_0x11e351,'subUnitId':_0x40ea76,'text':JSON['parse'](_0x4e0dfd['content']),'parentId':_0x3ab2ca}),_0x432f4e=_0x47a41f(_0x572a91[_0x319638(0x18b)][0x0]);return{..._0x432f4e,'children':_0x572a91['replies']['slice'](0x1)[_0x319638(0x14e)](_0x1e6dc6=>_0x47a41f(_0x1e6dc6,_0x432f4e['id']))};}return null;}let g=class{constructor(_0x155ec3,_0x3c08d2,_0x100087,_0x555db4){const _0x2c5e69=_0x5a7473;this['_httpService']=_0x155ec3,this[_0x2c5e69(0x189)]=_0x3c08d2,this[_0x2c5e69(0x15b)]=_0x100087,this['_injector']=_0x555db4;}async[_0x5a7473(0x15a)](_0x575a49){const _0x236c2e=_0x5a7473;var _0x1b13e0,_0x28912a;const {parentId:_0x492cc7,unitId:_0x2c0b64,text:_0x331432,threadId:_0x171957}=_0x575a49,_0x59801d=(_0x28912a=(_0x1b13e0=_0x331432['customRanges'])==null?void 0x0:_0x1b13e0[_0x236c2e(0x1ca)](_0x26b486=>_0x26b486[_0x236c2e(0x150)]===c[_0x236c2e(0x186)][_0x236c2e(0x14b)])[_0x236c2e(0x14e)](_0x322c36=>_0x322c36[_0x236c2e(0x1b0)]))!=null?_0x28912a:[],_0x4f0dc6=JSON['stringify'](_0x331432),_0x48da28=(await this[_0x236c2e(0x15b)][_0x236c2e(0x1a3)](_0x2c0b64))[_0x236c2e(0x15e)]();if(_0x492cc7){const _0x4368ee={'memberId':_0x48da28,'unitId':_0x2c0b64,'content':_0x4f0dc6,'mention':_0x59801d,'threadId':_0x171957},_0x3eb3f1=(await this['_httpService'][_0x236c2e(0x199)](_0x236c2e(0x19d)+_0x2c0b64+_0x236c2e(0x1a8),{'body':_0x4368ee}))[_0x236c2e(0x19b)]['reply'];return{..._0x575a49,'id':_0x3eb3f1['replyId'],'dT':c[_0x236c2e(0x173)](+_0x3eb3f1[_0x236c2e(0x155)])[_0x236c2e(0x176)](_0x236c2e(0x1bd)),'personId':_0x3eb3f1['userId']};}else{const _0x514090={'memberId':_0x48da28,'unitId':_0x2c0b64,'content':_0x4f0dc6,'mention':_0x59801d},_0x198edc=await this[_0x236c2e(0x1a2)][_0x236c2e(0x199)](_0x236c2e(0x19d)+_0x2c0b64+_0x236c2e(0x1c0),{'body':_0x514090});return Y(_0x198edc[_0x236c2e(0x19b)][_0x236c2e(0x17f)],_0x575a49);}}async[_0x5a7473(0x15d)](_0x310ffd){const _0x4cb5e4=_0x5a7473;var _0x509d8a,_0x3d089d;const {text:_0x3b811e,unitId:_0x5a1f17}=_0x310ffd,_0x4a5492=(_0x3d089d=(_0x509d8a=_0x3b811e[_0x4cb5e4(0x151)])==null?void 0x0:_0x509d8a['filter'](_0x44b2d5=>_0x44b2d5[_0x4cb5e4(0x150)]===c[_0x4cb5e4(0x186)][_0x4cb5e4(0x14b)])[_0x4cb5e4(0x14e)](_0x4d1f04=>_0x4d1f04[_0x4cb5e4(0x1b0)]))!=null?_0x3d089d:[],_0x381ccb=JSON[_0x4cb5e4(0x183)](_0x3b811e),_0x1c6951=_0x310ffd[_0x4cb5e4(0x161)],_0x55b0cb=_0x310ffd['id'],_0x2706c9={'memberId':(await this['_sessionService'][_0x4cb5e4(0x1a3)](_0x5a1f17))[_0x4cb5e4(0x15e)](),'unitId':_0x5a1f17,'threadId':_0x1c6951,'mention':_0x4a5492,'content':_0x381ccb,'replyId':_0x55b0cb},_0x6ba42a=await this[_0x4cb5e4(0x1a2)][_0x4cb5e4(0x199)](_0x4cb5e4(0x19d)+_0x5a1f17+_0x4cb5e4(0x163),{'body':_0x2706c9});return!_0x6ba42a[_0x4cb5e4(0x19b)][_0x4cb5e4(0x19c)]||_0x6ba42a[_0x4cb5e4(0x19b)][_0x4cb5e4(0x19c)][_0x4cb5e4(0x14c)]===0x1;}async[_0x5a7473(0x164)](_0x210abf){const _0x4ffef9=_0x5a7473,{unitId:_0x2276f}=_0x210abf,_0x3c4f2a=_0x210abf[_0x4ffef9(0x161)],_0x3864a4={'memberId':this[_0x4ffef9(0x189)]['getCurrentUser']()[_0x4ffef9(0x158)],'unitId':_0x2276f,'threadId':_0x3c4f2a,'solved':_0x210abf['resolved']?I[_0x4ffef9(0x198)]:I[_0x4ffef9(0x18f)]},_0x5055f8=await this['_httpService'][_0x4ffef9(0x199)](_0x4ffef9(0x19d)+_0x2276f+_0x4ffef9(0x1ba),{'body':_0x3864a4});return!_0x5055f8[_0x4ffef9(0x19b)][_0x4ffef9(0x19c)]||_0x5055f8[_0x4ffef9(0x19b)][_0x4ffef9(0x19c)][_0x4ffef9(0x14c)]===0x1;}async[_0x5a7473(0x154)](_0x2ca6d5,_0x58fff6,_0x3465fb,_0x1ea876){const _0x21a73f=_0x5a7473,_0x1038a7={'memberId':(await this['_sessionService'][_0x21a73f(0x1a3)](_0x2ca6d5))[_0x21a73f(0x15e)](),'threadId':_0x3465fb,'replyId':_0x1ea876,'unitId':_0x2ca6d5},_0x435490=await this['_httpService'][_0x21a73f(0x199)](_0x21a73f(0x19d)+_0x2ca6d5+_0x21a73f(0x19a),{'body':_0x1038a7});return!_0x435490['body'][_0x21a73f(0x19c)]||_0x435490['body'][_0x21a73f(0x19c)][_0x21a73f(0x14c)]===0x1;}async[_0x5a7473(0x170)](_0x4d7d6a,_0x3ca8b1,_0x1cf9a8){const _0x339b66=_0x5a7473,_0x439d9b={'unitId':_0x4d7d6a,'threadId':_0x1cf9a8},_0x50fdf8=await this[_0x339b66(0x1a2)][_0x339b66(0x199)]('/universer-api/comment/unit/'+_0x4d7d6a+_0x339b66(0x1c2),{'body':_0x439d9b}),_0x355970=_0x1cf9a8[_0x339b66(0x14e)](_0x45e947=>G(_0x50fdf8[_0x339b66(0x19b)][_0x339b66(0x185)][_0x45e947],_0x4d7d6a,_0x3ca8b1))[_0x339b66(0x1ca)](Boolean);return Object[_0x339b66(0x166)](_0x50fdf8[_0x339b66(0x19b)][_0x339b66(0x18e)])['forEach'](_0x217443=>{const _0x3778e9=_0x339b66;this['_userService'][_0x3778e9(0x182)](_0x217443);}),_0x355970;}[_0x5a7473(0x177)](_0x8da89){const _0x1e0221=_0x5a7473;return{'id':_0x8da89['id'],'threadId':_0x8da89[_0x1e0221(0x161)],'ref':_0x8da89[_0x1e0221(0x1c4)]};}};g=x([_(0x0,c[_0x5a7473(0x1cb)](P[_0x5a7473(0x1b5)])),_(0x1,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1a4)])),_(0x2,c[_0x5a7473(0x1cb)](b['CollaborationSessionService'])),_(0x3,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x593df0,_0x24f3da,_0x18adb8,_0x2f55c6)=>{for(var _0x27c7e1=_0x2f55c6>0x1?void 0x0:_0x2f55c6?H(_0x24f3da,_0x18adb8):_0x24f3da,_0x29084c=_0x593df0['length']-0x1,_0x813ec3;_0x29084c>=0x0;_0x29084c--)(_0x813ec3=_0x593df0[_0x29084c])&&(_0x27c7e1=_0x813ec3(_0x27c7e1)||_0x27c7e1);return _0x27c7e1;},y=(_0x2b4503,_0x259ef1)=>(_0x735b89,_0x2860a4)=>_0x259ef1(_0x735b89,_0x2860a4,_0x2b4503);let C=class extends c['Disposable']{constructor(_0x4a9a88,_0x1c8b98){const _0x1533a9=_0x5a7473;super(),this[_0x1533a9(0x167)]=_0x4a9a88,this[_0x1533a9(0x180)]=_0x1c8b98,this[_0x1533a9(0x1c9)]();}['_initDataSource'](){const _0x1e4e99=_0x5a7473;this[_0x1e4e99(0x167)]['dataSource']=this['_threadCommentDataSource'],this[_0x1e4e99(0x167)][_0x1e4e99(0x1b4)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5a7473(0x1cb)](g))],C);var F=Object[_0x5a7473(0x156)],L=Object['getOwnPropertyDescriptor'],Z=(_0x582bad,_0x3265b1,_0x326366)=>_0x3265b1 in _0x582bad?F(_0x582bad,_0x3265b1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x326366}):_0x582bad[_0x3265b1]=_0x326366,W=(_0x3d980d,_0x4773bb,_0x4c0263,_0x274c71)=>{for(var _0x305f0b=_0x274c71>0x1?void 0x0:_0x274c71?L(_0x4773bb,_0x4c0263):_0x4773bb,_0x510002=_0x3d980d['length']-0x1,_0x4697a2;_0x510002>=0x0;_0x510002--)(_0x4697a2=_0x3d980d[_0x510002])&&(_0x305f0b=_0x4697a2(_0x305f0b)||_0x305f0b);return _0x305f0b;},O=(_0x1c423c,_0x4cd4d8)=>(_0x2aebdc,_0x293456)=>_0x4cd4d8(_0x2aebdc,_0x293456,_0x1c423c),N=(_0x6fea50,_0x795899,_0x338e0f)=>Z(_0x6fea50,typeof _0x795899!=_0x5a7473(0x195)?_0x795899+'':_0x795899,_0x338e0f);exports[_0x5a7473(0x15c)]=class extends c[_0x5a7473(0x1c3)]{constructor(_0x3c5e66=D,_0x12acdb,_0x5e821c){const _0x1c8d6b=_0x5a7473;super(),this[_0x1c8d6b(0x1aa)]=_0x3c5e66,this['_injector']=_0x12acdb,this[_0x1c8d6b(0x1b2)]=_0x5e821c;const {..._0x4b090e}=c[_0x1c8d6b(0x194)]({},D,this[_0x1c8d6b(0x1aa)]);this[_0x1c8d6b(0x1b2)][_0x1c8d6b(0x1a6)](q,_0x4b090e);}[_0x5a7473(0x19f)](){const _0x28e813=_0x5a7473;[[g],[C],[p]][_0x28e813(0x17c)](_0xca3914=>{const _0x40e09f=_0x28e813;this[_0x40e09f(0x181)][_0x40e09f(0x16f)](_0xca3914);});}[_0x5a7473(0x16a)](){const _0x29f794=_0x5a7473;this[_0x29f794(0x181)][_0x29f794(0x1ab)](C),this[_0x29f794(0x181)][_0x29f794(0x1ab)](p);}},N(exports[_0x5a7473(0x15c)],_0x5a7473(0x14a),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x5a7473(0x188),c[_0x5a7473(0x190)][_0x5a7473(0x1bb)]),exports[_0x5a7473(0x15c)]=W([c[_0x5a7473(0x16b)](j[_0x5a7473(0x17d)],b[_0x5a7473(0x184)],T[_0x5a7473(0x149)]),O(0x1,c[_0x5a7473(0x1cb)](c[_0x5a7473(0x1c6)])),O(0x2,c[_0x5a7473(0x168)])],exports[_0x5a7473(0x15c)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x9cf832=_0x5690;(function(_0x1ab0f5,_0x582785){const _0x14f229=_0x5690,_0x571315=_0x1ab0f5();while(!![]){try{const _0x4a90d3=-parseInt(_0x14f229(0x106))/0x1*(-parseInt(_0x14f229(0xa3))/0x2)+parseInt(_0x14f229(0xe9))/0x3*(parseInt(_0x14f229(0xe2))/0x4)+-parseInt(_0x14f229(0xf1))/0x5*(parseInt(_0x14f229(0xb1))/0x6)+-parseInt(_0x14f229(0x102))/0x7*(parseInt(_0x14f229(0xc5))/0x8)+-parseInt(_0x14f229(0xc9))/0x9+-parseInt(_0x14f229(0xcb))/0xa+-parseInt(_0x14f229(0xb3))/0xb*(-parseInt(_0x14f229(0xd2))/0xc);if(_0x4a90d3===_0x582785)break;else _0x571315['push'](_0x571315['shift']());}catch(_0x2b9612){_0x571315['push'](_0x571315['shift']());}}}(_0x51a8,0x5c1fb));import{CommentService as _0x1803a,CollaborationSessionService as _0x1c6622,UniverCollaborationClientPlugin as _0x5befe3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37b1f9}from'@univerjs-pro/license';import{dayjs as _0x33b739,UserManagerService as _0xe8fcb1,Inject as _0x2f174f,Injector as _0x27970a,Disposable as _0xd71482,CustomRangeType as _0xf31c67,UniverInstanceType as _0x2a1993,DependentOn as _0x215ab7,IConfigService as _0x1acffc,Plugin as _0x5527d6,merge as _0x42355d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f6f25}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23f12b,IThreadCommentDataSourceService as _0x412e5d}from'@univerjs/thread-comment';import{bufferTime as _0x5d7449}from'rxjs';import{HTTPService as _0x1a1c91}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5690(_0x35ec36,_0x3e9002){const _0x51a8f0=_0x51a8();return _0x5690=function(_0x569008,_0x5d4623){_0x569008=_0x569008-0x9f;let _0x40fe07=_0x51a8f0[_0x569008];return _0x40fe07;},_0x5690(_0x35ec36,_0x3e9002);}var I=(_0x53c897=>(_0x53c897[_0x53c897[_0x9cf832(0xf4)]=0x0]=_0x9cf832(0xf4),_0x53c897[_0x53c897[_0x9cf832(0xba)]=0x1]=_0x9cf832(0xba),_0x53c897[_0x53c897[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x53c897))(I||{}),v=(_0x292077=>(_0x292077[_0x292077[_0x9cf832(0xdd)]=0x0]=_0x9cf832(0xdd),_0x292077[_0x292077[_0x9cf832(0xfd)]=0x1]=_0x9cf832(0xfd),_0x292077[_0x292077[_0x9cf832(0xef)]=0x2]='Reply',_0x292077[_0x292077[_0x9cf832(0xc7)]=0x3]=_0x9cf832(0xc7),_0x292077[_0x292077['Delete']=0x4]=_0x9cf832(0xca),_0x292077[_0x292077[_0x9cf832(0xa0)]=0x5]=_0x9cf832(0xa0),_0x292077[_0x292077[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x292077))(v||{});const D=_0x16630a=>_0x33b739(new Date(+_0x16630a))[_0x9cf832(0xc3)](_0x9cf832(0xb6)),B=async(_0x3658d2,_0x5bff7d)=>{const _0xfc86d9=_0x9cf832,_0x533b58=_0x3658d2[_0xfc86d9(0xb9)](_0xe8fcb1),_0x5e7eb9=_0x3658d2['get'](_0x1a1c91);_0x5bff7d['forEach'](_0x4babe3=>{const _0x35c76d=_0xfc86d9;_0x533b58[_0x35c76d(0x100)](_0x4babe3)&&_0x5bff7d[_0x35c76d(0xae)](_0x4babe3);}),_0x5bff7d['size']&&(await _0x5e7eb9[_0xfc86d9(0xb9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5bff7d]}}))[_0xfc86d9(0xd5)][_0xfc86d9(0xc6)]['forEach'](_0xbb79bb=>{const _0x37fc30=_0xfc86d9;_0xbb79bb&&_0x533b58[_0x37fc30(0xa4)](_0xbb79bb);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x369613,_0x5b7093,_0x1abaf1,_0x5328cc)=>{const _0x42748e=_0x9cf832;for(var _0x2c4c14=_0x5328cc>0x1?void 0x0:_0x5328cc?K(_0x5b7093,_0x1abaf1):_0x5b7093,_0x112d1e=_0x369613[_0x42748e(0xd1)]-0x1,_0x2f86d3;_0x112d1e>=0x0;_0x112d1e--)(_0x2f86d3=_0x369613[_0x112d1e])&&(_0x2c4c14=_0x2f86d3(_0x2c4c14)||_0x2c4c14);return _0x2c4c14;},p=(_0x44e692,_0x476b91)=>(_0x2a1a2f,_0x500e43)=>_0x476b91(_0x2a1a2f,_0x500e43,_0x44e692);let S=class extends _0xd71482{constructor(_0x42dc89,_0x459ac4,_0x499a45,_0x17175d){const _0x2a2f0e=_0x9cf832;super(),this[_0x2a2f0e(0xe6)]=_0x42dc89,this[_0x2a2f0e(0xe1)]=_0x459ac4,this['_userService']=_0x499a45,this[_0x2a2f0e(0xf5)]=_0x17175d,this[_0x2a2f0e(0x103)](),this[_0x2a2f0e(0xcf)]();}['_initUserSync'](){const _0x4d21d4=_0x9cf832;this[_0x4d21d4(0xea)](this['_threadCommentModel']['commentUpdate$'][_0x4d21d4(0xb5)](_0x5d7449(0x10))[_0x4d21d4(0xbd)](_0x3baf25=>{const _0x1e9cac=_0x4d21d4,_0x3a8832=new Set();_0x3baf25[_0x1e9cac(0xf7)](_0x288485=>{const _0x487d9b=_0x1e9cac;switch(_0x288485[_0x487d9b(0xd6)]){case _0x487d9b(0xee):{const _0x1c5945=_0x288485['payload'][_0x487d9b(0xeb)];_0x3a8832['add'](_0x1c5945);break;}}}),B(this['_injector'],_0x3a8832);}));}[_0x9cf832(0x103)](){const _0x2120eb=_0x9cf832;this[_0x2120eb(0xea)](this[_0x2120eb(0xe6)][_0x2120eb(0xe4)][_0x2120eb(0xbd)](async _0x36a911=>{const _0x32e7aa=_0x2120eb;var _0xfe6098,_0x3dca27,_0x1791e1,_0x205790;const _0x365e16=(_0xfe6098=this[_0x32e7aa(0xe1)][_0x32e7aa(0xad)](_0x36a911[_0x32e7aa(0xf9)])['find'](_0x35025b=>_0x35025b['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0xfe6098[_0x32e7aa(0xd4)];if(!_0x365e16)return;const {unitId:_0x1b19d4,subUnitId:_0x358367}=_0x365e16;switch(_0x36a911[_0x32e7aa(0xed)]&&this[_0x32e7aa(0xb2)][_0x32e7aa(0xa4)](_0x36a911['user']),_0x36a911[_0x32e7aa(0xd6)]){case v[_0x32e7aa(0xfd)]:break;case v[_0x32e7aa(0xef)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf3)](_0x1b19d4,_0x358367,{'unitId':_0x1b19d4,'subUnitId':_0x358367,'ref':'','id':_0x36a911[_0x32e7aa(0xfb)],'dT':D(+_0x36a911[_0x32e7aa(0xdf)]),'threadId':_0x36a911[_0x32e7aa(0xda)],'personId':(_0x1791e1=(_0x3dca27=_0x36a911[_0x32e7aa(0xed)])==null?void 0x0:_0x3dca27[_0x32e7aa(0xa6)])!=null?_0x1791e1:_0x36a911[_0x32e7aa(0x9f)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911[_0x32e7aa(0xfc)]),'parentId':_0x365e16['id']});break;}case v[_0x32e7aa(0xca)]:{const _0x35fd2b=this[_0x32e7aa(0xe1)]['getComment'](_0x1b19d4,_0x358367,_0x36a911[_0x32e7aa(0xfb)]);_0x35fd2b&&_0x35fd2b[_0x32e7aa(0xd3)]&&this[_0x32e7aa(0xe1)]['deleteComment'](_0x1b19d4,_0x358367,_0x36a911['replyId']);break;}case v[_0x32e7aa(0xc7)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf0)](_0x1b19d4,_0x358367,{'commentId':_0x36a911[_0x32e7aa(0xfb)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911['content'])});break;}case v[_0x32e7aa(0xa0)]:{const _0x4e6bf9=(_0x205790=this[_0x32e7aa(0xe1)]['getUnit'](_0x36a911[_0x32e7aa(0xf9)])[_0x32e7aa(0xe7)](_0x43fe88=>_0x43fe88['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0x205790['root'];_0x4e6bf9&&this[_0x32e7aa(0xe1)]['resolveComment'](_0x1b19d4,_0x358367,_0x4e6bf9['id'],_0x36a911[_0x32e7aa(0xce)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2f174f(_0x1803a)),p(0x1,_0x2f174f(_0x23f12b)),p(0x2,_0x2f174f(_0xe8fcb1)),p(0x3,_0x2f174f(_0x27970a))],S);const z=_0x9cf832(0xbc),M={};var k=Object[_0x9cf832(0xa8)],Q=(_0x29fb58,_0x2df8e7,_0x19864c,_0x2eea02)=>{const _0x65470=_0x9cf832;for(var _0x390171=_0x2eea02>0x1?void 0x0:_0x2eea02?k(_0x2df8e7,_0x19864c):_0x2df8e7,_0x52fcbb=_0x29fb58[_0x65470(0xd1)]-0x1,_0x5c3641;_0x52fcbb>=0x0;_0x52fcbb--)(_0x5c3641=_0x29fb58[_0x52fcbb])&&(_0x390171=_0x5c3641(_0x390171)||_0x390171);return _0x390171;},_=(_0x14a6dd,_0x573134)=>(_0x1da04d,_0x502cb8)=>_0x573134(_0x1da04d,_0x502cb8,_0x14a6dd);function X(_0x5c6cbd,_0x2d4c44){const _0xd2abdb=_0x9cf832,_0x5a60e1=_0x5c6cbd[_0xd2abdb(0xbb)][0x0];return{..._0x2d4c44,'id':_0x5a60e1[_0xd2abdb(0xfb)],'resolved':_0x5c6cbd[_0xd2abdb(0xce)]===0x1,'dT':D(_0x5a60e1['createTimestamp']),'personId':_0x5a60e1['userId'],'threadId':_0x5a60e1[_0xd2abdb(0xda)]};}function ee(_0x57bf54,_0x17ef8e,_0x42ff45){const _0x2a3786=_0x9cf832;var _0x29f0e6,_0xbeaf73;if(((_0xbeaf73=(_0x29f0e6=_0x57bf54==null?void 0x0:_0x57bf54[_0x2a3786(0xbb)])==null?void 0x0:_0x29f0e6[_0x2a3786(0xd1)])!=null?_0xbeaf73:0x0)>0x0){const _0x456bb8=(_0x3e804f,_0x21a111)=>({'id':_0x3e804f[_0x2a3786(0xfb)],'threadId':_0x3e804f['threadId'],'dT':D(_0x3e804f[_0x2a3786(0xdf)]),'personId':_0x3e804f['userId'],'resolved':_0x57bf54['solved']===I['Solved'],'unitId':_0x17ef8e,'subUnitId':_0x42ff45,'text':JSON[_0x2a3786(0xd9)](_0x3e804f['content']),'parentId':_0x21a111}),_0x5e24d5=_0x456bb8(_0x57bf54['replies'][0x0]);return{..._0x5e24d5,'children':_0x57bf54[_0x2a3786(0xbb)]['slice'](0x1)[_0x2a3786(0xa7)](_0x5f395e=>_0x456bb8(_0x5f395e,_0x5e24d5['id']))};}return null;}let f=class{constructor(_0x17967e,_0x358e58,_0x53d44b,_0x427289){const _0x3da1d1=_0x9cf832;this[_0x3da1d1(0xb8)]=_0x17967e,this[_0x3da1d1(0xb2)]=_0x358e58,this[_0x3da1d1(0xd0)]=_0x53d44b,this[_0x3da1d1(0xf5)]=_0x427289;}async['addComment'](_0x2c1f76){const _0x26a539=_0x9cf832;var _0x1403b4,_0x105841;const {parentId:_0x69ee58,unitId:_0x48e4ec,text:_0x3b3c8e,threadId:_0x51104a}=_0x2c1f76,_0x216412=(_0x105841=(_0x1403b4=_0x3b3c8e['customRanges'])==null?void 0x0:_0x1403b4[_0x26a539(0xcc)](_0x1cb298=>_0x1cb298[_0x26a539(0xc1)]===_0xf31c67['COMMENT'])[_0x26a539(0xa7)](_0x2e69df=>_0x2e69df[_0x26a539(0xbf)]))!=null?_0x105841:[],_0x5b1ede=JSON['stringify'](_0x3b3c8e),_0x94f4d=(await this[_0x26a539(0xd0)][_0x26a539(0xcd)](_0x48e4ec))[_0x26a539(0xaf)]();if(_0x69ee58){const _0x37ca21={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412,'threadId':_0x51104a},_0x1bad8=(await this['_httpService'][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xfa),{'body':_0x37ca21}))['body'][_0x26a539(0xb7)];return{..._0x2c1f76,'id':_0x1bad8[_0x26a539(0xfb)],'dT':_0x33b739(+_0x1bad8[_0x26a539(0xdf)])['format'](_0x26a539(0xb6)),'personId':_0x1bad8['userId']};}else{const _0xa9085b={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412},_0x518383=await this[_0x26a539(0xb8)][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xbe),{'body':_0xa9085b});return X(_0x518383['body'][_0x26a539(0xdb)],_0x2c1f76);}}async['updateComment'](_0x1a2966){const _0x104744=_0x9cf832;var _0x82ebde,_0x16fa86;const {text:_0x2358d0,unitId:_0x2c9bbe}=_0x1a2966,_0x2bbcf7=(_0x16fa86=(_0x82ebde=_0x2358d0[_0x104744(0xa5)])==null?void 0x0:_0x82ebde['filter'](_0x57af91=>_0x57af91[_0x104744(0xc1)]===_0xf31c67[_0x104744(0xa1)])[_0x104744(0xa7)](_0x20f280=>_0x20f280[_0x104744(0xbf)]))!=null?_0x16fa86:[],_0x14bad6=JSON['stringify'](_0x2358d0),_0x34ec8e=_0x1a2966[_0x104744(0xda)],_0x25c00e=_0x1a2966['id'],_0xdd12bf={'memberId':(await this[_0x104744(0xd0)][_0x104744(0xcd)](_0x2c9bbe))[_0x104744(0xaf)](),'unitId':_0x2c9bbe,'threadId':_0x34ec8e,'mention':_0x2bbcf7,'content':_0x14bad6,'replyId':_0x25c00e},_0x2d1b1d=await this[_0x104744(0xb8)][_0x104744(0xac)](_0x104744(0x101)+_0x2c9bbe+_0x104744(0xdc),{'body':_0xdd12bf});return!_0x2d1b1d[_0x104744(0xd5)][_0x104744(0xa9)]||_0x2d1b1d[_0x104744(0xd5)]['error'][_0x104744(0xc8)]===0x1;}async[_0x9cf832(0xe8)](_0xee1eaa){const _0x18e094=_0x9cf832,{unitId:_0xd74435}=_0xee1eaa,_0x29742b=_0xee1eaa[_0x18e094(0xda)],_0x3af91c={'memberId':this['_userService'][_0x18e094(0xde)]()[_0x18e094(0xa6)],'unitId':_0xd74435,'threadId':_0x29742b,'solved':_0xee1eaa[_0x18e094(0xe5)]?I[_0x18e094(0xba)]:I[_0x18e094(0xf4)]},_0x29ae6b=await this[_0x18e094(0xb8)][_0x18e094(0xac)](_0x18e094(0x101)+_0xd74435+'/solved',{'body':_0x3af91c});return!_0x29ae6b[_0x18e094(0xd5)][_0x18e094(0xa9)]||_0x29ae6b['body'][_0x18e094(0xa9)][_0x18e094(0xc8)]===0x1;}async['deleteComment'](_0x5d1d4a,_0x1b598c,_0x2d84d4,_0x4bf9a7){const _0x4c53ff=_0x9cf832,_0x4e3af8={'memberId':(await this[_0x4c53ff(0xd0)][_0x4c53ff(0xcd)](_0x5d1d4a))['getMemberID'](),'threadId':_0x2d84d4,'replyId':_0x4bf9a7,'unitId':_0x5d1d4a},_0x1f13b9=await this[_0x4c53ff(0xb8)]['post'](_0x4c53ff(0x101)+_0x5d1d4a+_0x4c53ff(0xb4),{'body':_0x4e3af8});return!_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)]||_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)][_0x4c53ff(0xc8)]===0x1;}async['listComments'](_0x19d652,_0x5a6e43,_0x463926){const _0x171732=_0x9cf832,_0x209ef8={'unitId':_0x19d652,'threadId':_0x463926},_0x3a4225=await this[_0x171732(0xb8)][_0x171732(0xac)]('/universer-api/comment/unit/'+_0x19d652+_0x171732(0xe3),{'body':_0x209ef8}),_0x1efe12=_0x463926[_0x171732(0xa7)](_0x324576=>ee(_0x3a4225[_0x171732(0xd5)][_0x171732(0xb0)][_0x324576],_0x19d652,_0x5a6e43))[_0x171732(0xcc)](Boolean);return Object[_0x171732(0xc0)](_0x3a4225[_0x171732(0xd5)]['users'])[_0x171732(0xf7)](_0xaf8059=>{const _0x399552=_0x171732;this[_0x399552(0xb2)][_0x399552(0xa4)](_0xaf8059);}),_0x1efe12;}[_0x9cf832(0xf6)](_0x5b8d2b){const _0x312c0a=_0x9cf832;return{'id':_0x5b8d2b['id'],'threadId':_0x5b8d2b[_0x312c0a(0xda)],'ref':_0x5b8d2b[_0x312c0a(0x105)]};}};f=Q([_(0x0,_0x2f174f(_0x1a1c91)),_(0x1,_0x2f174f(_0xe8fcb1)),_(0x2,_0x2f174f(_0x1c6622)),_(0x3,_0x2f174f(_0x27970a))],f);var re=Object[_0x9cf832(0xa8)],te=(_0xf8ff33,_0x56c733,_0x79fe51,_0x13f505)=>{for(var _0x5b5691=_0x13f505>0x1?void 0x0:_0x13f505?re(_0x56c733,_0x79fe51):_0x56c733,_0x4ff544=_0xf8ff33['length']-0x1,_0x1cc6d4;_0x4ff544>=0x0;_0x4ff544--)(_0x1cc6d4=_0xf8ff33[_0x4ff544])&&(_0x5b5691=_0x1cc6d4(_0x5b5691)||_0x5b5691);return _0x5b5691;},N=(_0x353cc4,_0xc74858)=>(_0x42f8e1,_0x495577)=>_0xc74858(_0x42f8e1,_0x495577,_0x353cc4);let g=class extends _0xd71482{constructor(_0x552596,_0x20fb93){const _0x5b3343=_0x9cf832;super(),this['_threadCommentDataSourceService']=_0x552596,this[_0x5b3343(0xc2)]=_0x20fb93,this[_0x5b3343(0xf2)]();}['_initDataSource'](){const _0x1c2436=_0x9cf832;this[_0x1c2436(0xfe)][_0x1c2436(0xe0)]=this[_0x1c2436(0xc2)],this[_0x1c2436(0xfe)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x412e5d),N(0x1,_0x2f174f(f))],g);var se=Object[_0x9cf832(0xec)],oe=Object[_0x9cf832(0xa8)],ne=(_0x2246e4,_0x20db14,_0x94feec)=>_0x20db14 in _0x2246e4?se(_0x2246e4,_0x20db14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x94feec}):_0x2246e4[_0x20db14]=_0x94feec,ie=(_0x46194e,_0x2fe6c9,_0x169a73,_0xee9fa5)=>{for(var _0x30d07a=_0xee9fa5>0x1?void 0x0:_0xee9fa5?oe(_0x2fe6c9,_0x169a73):_0x2fe6c9,_0x4c9e3a=_0x46194e['length']-0x1,_0x4dd80e;_0x4c9e3a>=0x0;_0x4c9e3a--)(_0x4dd80e=_0x46194e[_0x4c9e3a])&&(_0x30d07a=_0x4dd80e(_0x30d07a)||_0x30d07a);return _0x30d07a;},w=(_0x1e0a4d,_0x40efec)=>(_0x1506ef,_0x4755c0)=>_0x40efec(_0x1506ef,_0x4755c0,_0x1e0a4d),$=(_0x3ff6db,_0x3da789,_0x26215b)=>ne(_0x3ff6db,typeof _0x3da789!=_0x9cf832(0xd7)?_0x3da789+'':_0x3da789,_0x26215b);let b=class extends _0x5527d6{constructor(_0x5000b5=M,_0x23d008,_0x54bb8b){const _0x4d33e8=_0x9cf832;super(),this[_0x4d33e8(0xf8)]=_0x5000b5,this[_0x4d33e8(0xf5)]=_0x23d008,this[_0x4d33e8(0xd8)]=_0x54bb8b;const {..._0x43ad84}=_0x42355d({},M,this[_0x4d33e8(0xf8)]);this[_0x4d33e8(0xd8)][_0x4d33e8(0xc4)](z,_0x43ad84);}[_0x9cf832(0xab)](){const _0x3cd1a2=_0x9cf832;[[f],[g],[S]][_0x3cd1a2(0xf7)](_0xbc4b2a=>{const _0xb4cedd=_0x3cd1a2;this[_0xb4cedd(0xf5)][_0xb4cedd(0xee)](_0xbc4b2a);});}[_0x9cf832(0xa2)](){const _0xd54bb6=_0x9cf832;this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](g),this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](S);}};$(b,_0x9cf832(0xaa),W),$(b,_0x9cf832(0xd6),_0x2a1993[_0x9cf832(0x104)]),b=ie([_0x215ab7(_0x1f6f25,_0x5befe3,_0x37b1f9),w(0x1,_0x2f174f(_0x27970a)),w(0x2,_0x1acffc)],b);function _0x51a8(){const _0x1ae353=['code','4697037rcVAuM','Delete','7369950IYEWOv','filter','requireSession','solved','_initUserSync','_sessionService','length','1110084bLQrge','parentId','root','body','type','symbol','_configService','parse','threadId','comment','/edit','Unknown','getCurrentUser','createTimestamp','dataSource','_threadCommentModel','172jgjqPa','/list','commentUpdate$','resolved','_commentService','find','resolveComment','46923HLrEsy','disposeWithMe','personId','defineProperty','user','add','Reply','updateComment','582445vfuzjI','_initDataSource','addComment','OpenOrReOpen','_injector','saveCommentToSnapshot','forEach','_config','unitId','/reply','replyId','content','Add','_threadCommentDataSourceService','UNRECOGNIZED','getUser','/universer-api/comment/unit/','2681ihyEeK','_init','UNIVER_UNKNOWN','ref','2692hqiMlW','userId','Solve','COMMENT','onReady','136bGfjmw','addUser','customRanges','userID','map','getOwnPropertyDescriptor','error','pluginName','onStarting','post','getUnit','delete','getMemberID','comments','18PnThkn','_userService','198BKCTRC','/delete','pipe','YYYY/MM/DD\x20HH:mm','reply','_httpService','get','Solved','replies','thread-comment-data-source.config','subscribe','/add','rangeId','values','rangeType','_threadCommentDataSource','format','setConfig','11176XIWmaD','users','Edit'];_0x51a8=function(){return _0x1ae353;};return _0x51a8();}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x12b56c=_0x10d6;function _0x10d6(_0x3ec3a3,_0x389d62){const _0xce34ea=_0xce34();return _0x10d6=function(_0x10d6db,_0x593616){_0x10d6db=_0x10d6db-0x198;let _0x481542=_0xce34ea[_0x10d6db];return _0x481542;},_0x10d6(_0x3ec3a3,_0x389d62);}(function(_0x215dac,_0x3e3d42){const _0x100892=_0x10d6,_0x359c04=_0x215dac();while(!![]){try{const _0x3b64df=-parseInt(_0x100892(0x1e4))/0x1*(parseInt(_0x100892(0x1dd))/0x2)+-parseInt(_0x100892(0x1ba))/0x3+-parseInt(_0x100892(0x1a4))/0x4+parseInt(_0x100892(0x1f0))/0x5+parseInt(_0x100892(0x1d0))/0x6*(-parseInt(_0x100892(0x1f2))/0x7)+-parseInt(_0x100892(0x1b7))/0x8*(parseInt(_0x100892(0x1c0))/0x9)+-parseInt(_0x100892(0x1d7))/0xa*(-parseInt(_0x100892(0x1c1))/0xb);if(_0x3b64df===_0x3e3d42)break;else _0x359c04['push'](_0x359c04['shift']());}catch(_0x507c53){_0x359c04['push'](_0x359c04['shift']());}}}(_0xce34,0x2fda4));import{CommentService as _0x4961eb,CollaborationSessionService as _0x29ed8b,UniverCollaborationClientPlugin as _0x34c6e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x109dd0}from'@univerjs-pro/license';import{dayjs as _0x471f42,UserManagerService as _0x49fe3b,Inject as _0x39b796,Injector as _0x424bef,Disposable as _0x2461f3,CustomRangeType as _0x3f7c3c,UniverInstanceType as _0x823561,DependentOn as _0x21a168,IConfigService as _0x560613,Plugin as _0x3a42a6,merge as _0x720492}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3dd3a8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd98492,IThreadCommentDataSourceService as _0x91912c}from'@univerjs/thread-comment';import{bufferTime as _0x212897}from'rxjs';import{HTTPService as _0x397a0a}from'@univerjs/network';const W=_0x12b56c(0x1c9);var I=(_0x1d96a6=>(_0x1d96a6[_0x1d96a6['OpenOrReOpen']=0x0]=_0x12b56c(0x1e9),_0x1d96a6[_0x1d96a6[_0x12b56c(0x1a8)]=0x1]=_0x12b56c(0x1a8),_0x1d96a6[_0x1d96a6['UNRECOGNIZED']=-0x1]=_0x12b56c(0x1c6),_0x1d96a6))(I||{}),v=(_0x2eb9eb=>(_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x19c)]=0x0]=_0x12b56c(0x19c),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c5)]=0x1]=_0x12b56c(0x1c5),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1e6)]=0x2]=_0x12b56c(0x1e6),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c7)]=0x3]=_0x12b56c(0x1c7),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1dc)]=0x4]=_0x12b56c(0x1dc),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1d8)]=0x5]=_0x12b56c(0x1d8),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c6)]=-0x1]=_0x12b56c(0x1c6),_0x2eb9eb))(v||{});const D=_0x59c67d=>_0x471f42(new Date(+_0x59c67d))[_0x12b56c(0x1b9)](_0x12b56c(0x1ea)),B=async(_0x28c461,_0x2fda40)=>{const _0x4426f8=_0x12b56c,_0x95603c=_0x28c461['get'](_0x49fe3b),_0x36971b=_0x28c461[_0x4426f8(0x1b3)](_0x397a0a);_0x2fda40['forEach'](_0x134d6b=>{const _0x4b5b00=_0x4426f8;_0x95603c[_0x4b5b00(0x1af)](_0x134d6b)&&_0x2fda40[_0x4b5b00(0x1d5)](_0x134d6b);}),_0x2fda40[_0x4426f8(0x1f6)]&&(await _0x36971b[_0x4426f8(0x1b3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fda40]}}))[_0x4426f8(0x1b8)][_0x4426f8(0x1aa)][_0x4426f8(0x1d1)](_0x242a8d=>{const _0x39c586=_0x4426f8;_0x242a8d&&_0x95603c[_0x39c586(0x1e8)](_0x242a8d);});};var K=Object[_0x12b56c(0x1e1)],V=(_0x49dddd,_0x2f2948,_0x1f4f6d,_0x4d5bbc)=>{const _0x397ab9=_0x12b56c;for(var _0x1de8a2=_0x4d5bbc>0x1?void 0x0:_0x4d5bbc?K(_0x2f2948,_0x1f4f6d):_0x2f2948,_0x15a2d9=_0x49dddd[_0x397ab9(0x1f5)]-0x1,_0x145d0a;_0x15a2d9>=0x0;_0x15a2d9--)(_0x145d0a=_0x49dddd[_0x15a2d9])&&(_0x1de8a2=_0x145d0a(_0x1de8a2)||_0x1de8a2);return _0x1de8a2;},p=(_0x1c2670,_0x51ff8a)=>(_0x16d015,_0x31b19e)=>_0x51ff8a(_0x16d015,_0x31b19e,_0x1c2670);let S=class extends _0x2461f3{constructor(_0x37664f,_0x3415c1,_0x35fd08,_0x3135cd){const _0x57ca06=_0x12b56c;super(),this['_commentService']=_0x37664f,this[_0x57ca06(0x1e3)]=_0x3415c1,this[_0x57ca06(0x1ee)]=_0x35fd08,this[_0x57ca06(0x1ed)]=_0x3135cd,this[_0x57ca06(0x1c2)](),this['_initUserSync']();}['_initUserSync'](){const _0xd74971=_0x12b56c;this[_0xd74971(0x1f3)](this[_0xd74971(0x1e3)][_0xd74971(0x1f1)][_0xd74971(0x19f)](_0x212897(0x10))[_0xd74971(0x1c8)](_0x299557=>{const _0x539ecf=_0xd74971,_0x56e015=new Set();_0x299557[_0x539ecf(0x1d1)](_0x5509a8=>{const _0x37ad16=_0x539ecf;switch(_0x5509a8['type']){case _0x37ad16(0x1cf):{const _0x458f6c=_0x5509a8['payload'][_0x37ad16(0x1bd)];_0x56e015[_0x37ad16(0x1cf)](_0x458f6c);break;}}}),B(this[_0x539ecf(0x1ed)],_0x56e015);}));}[_0x12b56c(0x1c2)](){const _0xb948cb=_0x12b56c;this[_0xb948cb(0x1f3)](this['_commentService'][_0xb948cb(0x1f1)][_0xb948cb(0x1c8)](async _0x5338d9=>{const _0x2b6797=_0xb948cb;var _0x3102cd,_0x591ee7,_0x2ed96c,_0x189afb;const _0x37ba69=(_0x3102cd=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x44decd=>_0x44decd[_0x2b6797(0x19a)]===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x3102cd[_0x2b6797(0x1a0)];if(!_0x37ba69)return;const {unitId:_0x474aba,subUnitId:_0x58e080}=_0x37ba69;switch(_0x5338d9[_0x2b6797(0x1f9)]&&this['_userService'][_0x2b6797(0x1e8)](_0x5338d9[_0x2b6797(0x1f9)]),_0x5338d9[_0x2b6797(0x19e)]){case v[_0x2b6797(0x1c5)]:break;case v[_0x2b6797(0x1e6)]:{this[_0x2b6797(0x1e3)][_0x2b6797(0x1f7)](_0x474aba,_0x58e080,{'unitId':_0x474aba,'subUnitId':_0x58e080,'ref':'','id':_0x5338d9[_0x2b6797(0x1da)],'dT':D(+_0x5338d9[_0x2b6797(0x1ec)]),'threadId':_0x5338d9[_0x2b6797(0x19a)],'personId':(_0x2ed96c=(_0x591ee7=_0x5338d9[_0x2b6797(0x1f9)])==null?void 0x0:_0x591ee7[_0x2b6797(0x1b5)])!=null?_0x2ed96c:_0x5338d9[_0x2b6797(0x1ce)],'text':JSON['parse'](_0x5338d9['content']),'parentId':_0x37ba69['id']});break;}case v['Delete']:{const _0x3cb262=this[_0x2b6797(0x1e3)][_0x2b6797(0x1df)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);_0x3cb262&&_0x3cb262[_0x2b6797(0x1e5)]&&this['_threadCommentModel'][_0x2b6797(0x1a1)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);break;}case v[_0x2b6797(0x1c7)]:{this['_threadCommentModel'][_0x2b6797(0x1b1)](_0x474aba,_0x58e080,{'commentId':_0x5338d9['replyId'],'text':JSON[_0x2b6797(0x1ab)](_0x5338d9[_0x2b6797(0x1de)])});break;}case v[_0x2b6797(0x1d8)]:{const _0x16464f=(_0x189afb=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x361be3=>_0x361be3['threadId']===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x189afb[_0x2b6797(0x1a0)];_0x16464f&&this[_0x2b6797(0x1e3)][_0x2b6797(0x1e7)](_0x474aba,_0x58e080,_0x16464f['id'],_0x5338d9['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x39b796(_0x4961eb)),p(0x1,_0x39b796(_0xd98492)),p(0x2,_0x39b796(_0x49fe3b)),p(0x3,_0x39b796(_0x424bef))],S);const z=_0x12b56c(0x1ef),M={};var k=Object[_0x12b56c(0x1e1)],Q=(_0x5d2e38,_0x2770b6,_0x4ed512,_0x4829a2)=>{const _0x5765dc=_0x12b56c;for(var _0x3f8544=_0x4829a2>0x1?void 0x0:_0x4829a2?k(_0x2770b6,_0x4ed512):_0x2770b6,_0x58b16a=_0x5d2e38[_0x5765dc(0x1f5)]-0x1,_0x449da5;_0x58b16a>=0x0;_0x58b16a--)(_0x449da5=_0x5d2e38[_0x58b16a])&&(_0x3f8544=_0x449da5(_0x3f8544)||_0x3f8544);return _0x3f8544;},_=(_0x499741,_0x242072)=>(_0x1250f3,_0x4e5125)=>_0x242072(_0x1250f3,_0x4e5125,_0x499741);function X(_0xcb7f20,_0x2c6057){const _0x397d31=_0x12b56c,_0x5b0c32=_0xcb7f20['replies'][0x0];return{..._0x2c6057,'id':_0x5b0c32['replyId'],'resolved':_0xcb7f20[_0x397d31(0x1bc)]===0x1,'dT':D(_0x5b0c32[_0x397d31(0x1ec)]),'personId':_0x5b0c32[_0x397d31(0x1ce)],'threadId':_0x5b0c32[_0x397d31(0x19a)]};}function ee(_0x494b40,_0x57abb2,_0x404687){const _0x42a50e=_0x12b56c;var _0x206ca9,_0x238f14;if(((_0x238f14=(_0x206ca9=_0x494b40==null?void 0x0:_0x494b40[_0x42a50e(0x199)])==null?void 0x0:_0x206ca9['length'])!=null?_0x238f14:0x0)>0x0){const _0x5d06ff=(_0x4b9736,_0x580b0b)=>({'id':_0x4b9736[_0x42a50e(0x1da)],'threadId':_0x4b9736[_0x42a50e(0x19a)],'dT':D(_0x4b9736['createTimestamp']),'personId':_0x4b9736[_0x42a50e(0x1ce)],'resolved':_0x494b40[_0x42a50e(0x1bc)]===I[_0x42a50e(0x1a8)],'unitId':_0x57abb2,'subUnitId':_0x404687,'text':JSON[_0x42a50e(0x1ab)](_0x4b9736[_0x42a50e(0x1de)]),'parentId':_0x580b0b}),_0x214db7=_0x5d06ff(_0x494b40[_0x42a50e(0x199)][0x0]);return{..._0x214db7,'children':_0x494b40[_0x42a50e(0x199)]['slice'](0x1)[_0x42a50e(0x1ae)](_0x5ad52e=>_0x5d06ff(_0x5ad52e,_0x214db7['id']))};}return null;}let f=class{constructor(_0x5274cf,_0x30f7e5,_0x20a447,_0x406063){const _0x2a4dc7=_0x12b56c;this[_0x2a4dc7(0x1f8)]=_0x5274cf,this['_userService']=_0x30f7e5,this[_0x2a4dc7(0x1f4)]=_0x20a447,this[_0x2a4dc7(0x1ed)]=_0x406063;}async['addComment'](_0x1c0eac){const _0x4f63a9=_0x12b56c;var _0x26aeb3,_0x2c362f;const {parentId:_0x2c5e69,unitId:_0x5c1e49,text:_0x36ec8e,threadId:_0x5bd0aa}=_0x1c0eac,_0x110a9c=(_0x2c362f=(_0x26aeb3=_0x36ec8e[_0x4f63a9(0x19b)])==null?void 0x0:_0x26aeb3[_0x4f63a9(0x1b2)](_0x2fd52c=>_0x2fd52c[_0x4f63a9(0x1e2)]===_0x3f7c3c['COMMENT'])['map'](_0xad4890=>_0xad4890[_0x4f63a9(0x1db)]))!=null?_0x2c362f:[],_0x52b941=JSON[_0x4f63a9(0x1c4)](_0x36ec8e),_0x1a8f8b=(await this[_0x4f63a9(0x1f4)]['requireSession'](_0x5c1e49))[_0x4f63a9(0x1eb)]();if(_0x2c5e69){const _0x419575={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c,'threadId':_0x5bd0aa},_0x5a1d8f=(await this[_0x4f63a9(0x1f8)][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+'/reply',{'body':_0x419575}))[_0x4f63a9(0x1b8)][_0x4f63a9(0x1b4)];return{..._0x1c0eac,'id':_0x5a1d8f[_0x4f63a9(0x1da)],'dT':_0x471f42(+_0x5a1d8f[_0x4f63a9(0x1ec)])[_0x4f63a9(0x1b9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a1d8f[_0x4f63a9(0x1ce)]};}else{const _0xc58149={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c},_0x357b2c=await this['_httpService'][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+_0x4f63a9(0x1d6),{'body':_0xc58149});return X(_0x357b2c[_0x4f63a9(0x1b8)][_0x4f63a9(0x1a3)],_0x1c0eac);}}async['updateComment'](_0x1dc244){const _0x13dac0=_0x12b56c;var _0xf84e6a,_0x46404c;const {text:_0x2c6bea,unitId:_0x273e79}=_0x1dc244,_0x52252f=(_0x46404c=(_0xf84e6a=_0x2c6bea[_0x13dac0(0x19b)])==null?void 0x0:_0xf84e6a[_0x13dac0(0x1b2)](_0x485391=>_0x485391[_0x13dac0(0x1e2)]===_0x3f7c3c['COMMENT'])[_0x13dac0(0x1ae)](_0x36e49f=>_0x36e49f[_0x13dac0(0x1db)]))!=null?_0x46404c:[],_0x4ef4be=JSON[_0x13dac0(0x1c4)](_0x2c6bea),_0x57cd05=_0x1dc244[_0x13dac0(0x19a)],_0x3a1684=_0x1dc244['id'],_0x36cb59={'memberId':(await this[_0x13dac0(0x1f4)][_0x13dac0(0x1d3)](_0x273e79))[_0x13dac0(0x1eb)](),'unitId':_0x273e79,'threadId':_0x57cd05,'mention':_0x52252f,'content':_0x4ef4be,'replyId':_0x3a1684},_0x562e3c=await this[_0x13dac0(0x1f8)][_0x13dac0(0x1bb)](_0x13dac0(0x1d4)+_0x273e79+'/edit',{'body':_0x36cb59});return!_0x562e3c[_0x13dac0(0x1b8)][_0x13dac0(0x1bf)]||_0x562e3c[_0x13dac0(0x1b8)]['error'][_0x13dac0(0x1c3)]===0x1;}async[_0x12b56c(0x1e7)](_0x400644){const _0x3d0046=_0x12b56c,{unitId:_0x2e15c8}=_0x400644,_0x4be0ef=_0x400644['threadId'],_0x51070c={'memberId':this[_0x3d0046(0x1ee)][_0x3d0046(0x1d2)]()['userID'],'unitId':_0x2e15c8,'threadId':_0x4be0ef,'solved':_0x400644['resolved']?I[_0x3d0046(0x1a8)]:I[_0x3d0046(0x1e9)]},_0x1cabff=await this['_httpService'][_0x3d0046(0x1bb)]('/universer-api/comment/unit/'+_0x2e15c8+'/solved',{'body':_0x51070c});return!_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)]||_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)][_0x3d0046(0x1c3)]===0x1;}async['deleteComment'](_0x33f749,_0x4a8dd0,_0x3dc8d8,_0x7080){const _0x1edd4e=_0x12b56c,_0x35b9af={'memberId':(await this[_0x1edd4e(0x1f4)][_0x1edd4e(0x1d3)](_0x33f749))['getMemberID'](),'threadId':_0x3dc8d8,'replyId':_0x7080,'unitId':_0x33f749},_0x13a547=await this[_0x1edd4e(0x1f8)][_0x1edd4e(0x1bb)](_0x1edd4e(0x1d4)+_0x33f749+_0x1edd4e(0x1be),{'body':_0x35b9af});return!_0x13a547[_0x1edd4e(0x1b8)]['error']||_0x13a547[_0x1edd4e(0x1b8)]['error'][_0x1edd4e(0x1c3)]===0x1;}async[_0x12b56c(0x1cd)](_0x30a587,_0x2a0dd9,_0x29e4b1){const _0x345ca0=_0x12b56c,_0x14e0fb={'unitId':_0x30a587,'threadId':_0x29e4b1},_0x2edb5c=await this['_httpService'][_0x345ca0(0x1bb)](_0x345ca0(0x1d4)+_0x30a587+'/list',{'body':_0x14e0fb}),_0x9970c=_0x29e4b1[_0x345ca0(0x1ae)](_0x55961a=>ee(_0x2edb5c[_0x345ca0(0x1b8)]['comments'][_0x55961a],_0x30a587,_0x2a0dd9))['filter'](Boolean);return Object['values'](_0x2edb5c[_0x345ca0(0x1b8)][_0x345ca0(0x1aa)])['forEach'](_0x1d9cbf=>{const _0x32aa6c=_0x345ca0;this[_0x32aa6c(0x1ee)][_0x32aa6c(0x1e8)](_0x1d9cbf);}),_0x9970c;}[_0x12b56c(0x1cc)](_0x31306f){const _0x3f49c8=_0x12b56c;return{'id':_0x31306f['id'],'threadId':_0x31306f[_0x3f49c8(0x19a)],'ref':_0x31306f[_0x3f49c8(0x1ad)]};}};f=Q([_(0x0,_0x39b796(_0x397a0a)),_(0x1,_0x39b796(_0x49fe3b)),_(0x2,_0x39b796(_0x29ed8b)),_(0x3,_0x39b796(_0x424bef))],f);var re=Object[_0x12b56c(0x1e1)],te=(_0x195d00,_0x3804a4,_0x32fccf,_0x11799b)=>{const _0x1f94d9=_0x12b56c;for(var _0x247dde=_0x11799b>0x1?void 0x0:_0x11799b?re(_0x3804a4,_0x32fccf):_0x3804a4,_0xdaeddd=_0x195d00[_0x1f94d9(0x1f5)]-0x1,_0x5f3674;_0xdaeddd>=0x0;_0xdaeddd--)(_0x5f3674=_0x195d00[_0xdaeddd])&&(_0x247dde=_0x5f3674(_0x247dde)||_0x247dde);return _0x247dde;},N=(_0x14a4e0,_0x366d79)=>(_0x56242a,_0x57b7b4)=>_0x366d79(_0x56242a,_0x57b7b4,_0x14a4e0);function _0xce34(){const _0x4ad063=['parentId','Reply','resolveComment','addUser','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','getMemberID','createTimestamp','_injector','_userService','thread-comment-data-source.config','450885yUTaLy','commentUpdate$','175BvaMsD','disposeWithMe','_sessionService','length','size','addComment','_httpService','user','getUnit','replies','threadId','customRanges','Unknown','UNIVER_UNKNOWN','type','pipe','root','deleteComment','dataSource','comment','731232bYBsLZ','unitId','defineProperty','_config','Solved','symbol','users','parse','_threadCommentDataSource','ref','map','getUser','pluginName','updateComment','filter','get','reply','userID','_threadCommentDataSourceService','538904vtzFOm','body','format','1118307pxPZje','post','solved','personId','/delete','error','36zrKTBX','11hAPOoA','_init','code','stringify','Add','UNRECOGNIZED','Edit','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','find','saveCommentToSnapshot','listComments','userId','add','26454HqJiae','forEach','getCurrentUser','requireSession','/universer-api/comment/unit/','delete','/add','11385430nAKAIF','Solve','setConfig','replyId','rangeId','Delete','2HdmDbf','content','getComment','_configService','getOwnPropertyDescriptor','rangeType','_threadCommentModel','97462rCBWoe'];_0xce34=function(){return _0x4ad063;};return _0xce34();}let g=class extends _0x2461f3{constructor(_0x3c357d,_0x166fdb){const _0x5c8294=_0x12b56c;super(),this[_0x5c8294(0x1b6)]=_0x3c357d,this[_0x5c8294(0x1ac)]=_0x166fdb,this[_0x5c8294(0x1ca)]();}[_0x12b56c(0x1ca)](){const _0x50baa6=_0x12b56c;this[_0x50baa6(0x1b6)][_0x50baa6(0x1a2)]=this[_0x50baa6(0x1ac)],this[_0x50baa6(0x1b6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x91912c),N(0x1,_0x39b796(f))],g);var se=Object[_0x12b56c(0x1a6)],oe=Object[_0x12b56c(0x1e1)],ne=(_0x37a0d9,_0xb50cc6,_0x7beabe)=>_0xb50cc6 in _0x37a0d9?se(_0x37a0d9,_0xb50cc6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7beabe}):_0x37a0d9[_0xb50cc6]=_0x7beabe,ie=(_0x40b3a8,_0xc0a831,_0xace0f5,_0x73095e)=>{const _0x4fb9ce=_0x12b56c;for(var _0x16d76e=_0x73095e>0x1?void 0x0:_0x73095e?oe(_0xc0a831,_0xace0f5):_0xc0a831,_0x52c5a3=_0x40b3a8[_0x4fb9ce(0x1f5)]-0x1,_0x39d5d6;_0x52c5a3>=0x0;_0x52c5a3--)(_0x39d5d6=_0x40b3a8[_0x52c5a3])&&(_0x16d76e=_0x39d5d6(_0x16d76e)||_0x16d76e);return _0x16d76e;},w=(_0x369b6d,_0x4a6cb7)=>(_0x55b64e,_0x11fe55)=>_0x4a6cb7(_0x55b64e,_0x11fe55,_0x369b6d),$=(_0x5d71be,_0x93677f,_0x3dd09e)=>ne(_0x5d71be,typeof _0x93677f!=_0x12b56c(0x1a9)?_0x93677f+'':_0x93677f,_0x3dd09e);let b=class extends _0x3a42a6{constructor(_0x14eaa1=M,_0x57a787,_0x4237b3){const _0x3d2193=_0x12b56c;super(),this[_0x3d2193(0x1a7)]=_0x14eaa1,this[_0x3d2193(0x1ed)]=_0x57a787,this[_0x3d2193(0x1e0)]=_0x4237b3;const {..._0x2f5890}=_0x720492({},M,this[_0x3d2193(0x1a7)]);this['_configService'][_0x3d2193(0x1d9)](z,_0x2f5890);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x51bc9d=>{const _0x7b6389=_0x10d6;this[_0x7b6389(0x1ed)]['add'](_0x51bc9d);});}['onReady'](){const _0x456ea9=_0x12b56c;this[_0x456ea9(0x1ed)][_0x456ea9(0x1b3)](g),this[_0x456ea9(0x1ed)]['get'](S);}};$(b,_0x12b56c(0x1b0),W),$(b,'type',_0x823561[_0x12b56c(0x19d)]),b=ie([_0x21a168(_0x3dd3a8,_0x34c6e6,_0x109dd0),w(0x1,_0x39b796(_0x424bef)),w(0x2,_0x560613)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x9cf832=_0x5690;(function(_0x1ab0f5,_0x582785){const _0x14f229=_0x5690,_0x571315=_0x1ab0f5();while(!![]){try{const _0x4a90d3=-parseInt(_0x14f229(0x106))/0x1*(-parseInt(_0x14f229(0xa3))/0x2)+parseInt(_0x14f229(0xe9))/0x3*(parseInt(_0x14f229(0xe2))/0x4)+-parseInt(_0x14f229(0xf1))/0x5*(parseInt(_0x14f229(0xb1))/0x6)+-parseInt(_0x14f229(0x102))/0x7*(parseInt(_0x14f229(0xc5))/0x8)+-parseInt(_0x14f229(0xc9))/0x9+-parseInt(_0x14f229(0xcb))/0xa+-parseInt(_0x14f229(0xb3))/0xb*(-parseInt(_0x14f229(0xd2))/0xc);if(_0x4a90d3===_0x582785)break;else _0x571315['push'](_0x571315['shift']());}catch(_0x2b9612){_0x571315['push'](_0x571315['shift']());}}}(_0x51a8,0x5c1fb));import{CommentService as _0x1803a,CollaborationSessionService as _0x1c6622,UniverCollaborationClientPlugin as _0x5befe3}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x37b1f9}from'@univerjs-pro/license';import{dayjs as _0x33b739,UserManagerService as _0xe8fcb1,Inject as _0x2f174f,Injector as _0x27970a,Disposable as _0xd71482,CustomRangeType as _0xf31c67,UniverInstanceType as _0x2a1993,DependentOn as _0x215ab7,IConfigService as _0x1acffc,Plugin as _0x5527d6,merge as _0x42355d}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1f6f25}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23f12b,IThreadCommentDataSourceService as _0x412e5d}from'@univerjs/thread-comment';import{bufferTime as _0x5d7449}from'rxjs';import{HTTPService as _0x1a1c91}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0x5690(_0x35ec36,_0x3e9002){const _0x51a8f0=_0x51a8();return _0x5690=function(_0x569008,_0x5d4623){_0x569008=_0x569008-0x9f;let _0x40fe07=_0x51a8f0[_0x569008];return _0x40fe07;},_0x5690(_0x35ec36,_0x3e9002);}var I=(_0x53c897=>(_0x53c897[_0x53c897[_0x9cf832(0xf4)]=0x0]=_0x9cf832(0xf4),_0x53c897[_0x53c897[_0x9cf832(0xba)]=0x1]=_0x9cf832(0xba),_0x53c897[_0x53c897[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x53c897))(I||{}),v=(_0x292077=>(_0x292077[_0x292077[_0x9cf832(0xdd)]=0x0]=_0x9cf832(0xdd),_0x292077[_0x292077[_0x9cf832(0xfd)]=0x1]=_0x9cf832(0xfd),_0x292077[_0x292077[_0x9cf832(0xef)]=0x2]='Reply',_0x292077[_0x292077[_0x9cf832(0xc7)]=0x3]=_0x9cf832(0xc7),_0x292077[_0x292077['Delete']=0x4]=_0x9cf832(0xca),_0x292077[_0x292077[_0x9cf832(0xa0)]=0x5]=_0x9cf832(0xa0),_0x292077[_0x292077[_0x9cf832(0xff)]=-0x1]='UNRECOGNIZED',_0x292077))(v||{});const D=_0x16630a=>_0x33b739(new Date(+_0x16630a))[_0x9cf832(0xc3)](_0x9cf832(0xb6)),B=async(_0x3658d2,_0x5bff7d)=>{const _0xfc86d9=_0x9cf832,_0x533b58=_0x3658d2[_0xfc86d9(0xb9)](_0xe8fcb1),_0x5e7eb9=_0x3658d2['get'](_0x1a1c91);_0x5bff7d['forEach'](_0x4babe3=>{const _0x35c76d=_0xfc86d9;_0x533b58[_0x35c76d(0x100)](_0x4babe3)&&_0x5bff7d[_0x35c76d(0xae)](_0x4babe3);}),_0x5bff7d['size']&&(await _0x5e7eb9[_0xfc86d9(0xb9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x5bff7d]}}))[_0xfc86d9(0xd5)][_0xfc86d9(0xc6)]['forEach'](_0xbb79bb=>{const _0x37fc30=_0xfc86d9;_0xbb79bb&&_0x533b58[_0x37fc30(0xa4)](_0xbb79bb);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x369613,_0x5b7093,_0x1abaf1,_0x5328cc)=>{const _0x42748e=_0x9cf832;for(var _0x2c4c14=_0x5328cc>0x1?void 0x0:_0x5328cc?K(_0x5b7093,_0x1abaf1):_0x5b7093,_0x112d1e=_0x369613[_0x42748e(0xd1)]-0x1,_0x2f86d3;_0x112d1e>=0x0;_0x112d1e--)(_0x2f86d3=_0x369613[_0x112d1e])&&(_0x2c4c14=_0x2f86d3(_0x2c4c14)||_0x2c4c14);return _0x2c4c14;},p=(_0x44e692,_0x476b91)=>(_0x2a1a2f,_0x500e43)=>_0x476b91(_0x2a1a2f,_0x500e43,_0x44e692);let S=class extends _0xd71482{constructor(_0x42dc89,_0x459ac4,_0x499a45,_0x17175d){const _0x2a2f0e=_0x9cf832;super(),this[_0x2a2f0e(0xe6)]=_0x42dc89,this[_0x2a2f0e(0xe1)]=_0x459ac4,this['_userService']=_0x499a45,this[_0x2a2f0e(0xf5)]=_0x17175d,this[_0x2a2f0e(0x103)](),this[_0x2a2f0e(0xcf)]();}['_initUserSync'](){const _0x4d21d4=_0x9cf832;this[_0x4d21d4(0xea)](this['_threadCommentModel']['commentUpdate$'][_0x4d21d4(0xb5)](_0x5d7449(0x10))[_0x4d21d4(0xbd)](_0x3baf25=>{const _0x1e9cac=_0x4d21d4,_0x3a8832=new Set();_0x3baf25[_0x1e9cac(0xf7)](_0x288485=>{const _0x487d9b=_0x1e9cac;switch(_0x288485[_0x487d9b(0xd6)]){case _0x487d9b(0xee):{const _0x1c5945=_0x288485['payload'][_0x487d9b(0xeb)];_0x3a8832['add'](_0x1c5945);break;}}}),B(this['_injector'],_0x3a8832);}));}[_0x9cf832(0x103)](){const _0x2120eb=_0x9cf832;this[_0x2120eb(0xea)](this[_0x2120eb(0xe6)][_0x2120eb(0xe4)][_0x2120eb(0xbd)](async _0x36a911=>{const _0x32e7aa=_0x2120eb;var _0xfe6098,_0x3dca27,_0x1791e1,_0x205790;const _0x365e16=(_0xfe6098=this[_0x32e7aa(0xe1)][_0x32e7aa(0xad)](_0x36a911[_0x32e7aa(0xf9)])['find'](_0x35025b=>_0x35025b['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0xfe6098[_0x32e7aa(0xd4)];if(!_0x365e16)return;const {unitId:_0x1b19d4,subUnitId:_0x358367}=_0x365e16;switch(_0x36a911[_0x32e7aa(0xed)]&&this[_0x32e7aa(0xb2)][_0x32e7aa(0xa4)](_0x36a911['user']),_0x36a911[_0x32e7aa(0xd6)]){case v[_0x32e7aa(0xfd)]:break;case v[_0x32e7aa(0xef)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf3)](_0x1b19d4,_0x358367,{'unitId':_0x1b19d4,'subUnitId':_0x358367,'ref':'','id':_0x36a911[_0x32e7aa(0xfb)],'dT':D(+_0x36a911[_0x32e7aa(0xdf)]),'threadId':_0x36a911[_0x32e7aa(0xda)],'personId':(_0x1791e1=(_0x3dca27=_0x36a911[_0x32e7aa(0xed)])==null?void 0x0:_0x3dca27[_0x32e7aa(0xa6)])!=null?_0x1791e1:_0x36a911[_0x32e7aa(0x9f)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911[_0x32e7aa(0xfc)]),'parentId':_0x365e16['id']});break;}case v[_0x32e7aa(0xca)]:{const _0x35fd2b=this[_0x32e7aa(0xe1)]['getComment'](_0x1b19d4,_0x358367,_0x36a911[_0x32e7aa(0xfb)]);_0x35fd2b&&_0x35fd2b[_0x32e7aa(0xd3)]&&this[_0x32e7aa(0xe1)]['deleteComment'](_0x1b19d4,_0x358367,_0x36a911['replyId']);break;}case v[_0x32e7aa(0xc7)]:{this[_0x32e7aa(0xe1)][_0x32e7aa(0xf0)](_0x1b19d4,_0x358367,{'commentId':_0x36a911[_0x32e7aa(0xfb)],'text':JSON[_0x32e7aa(0xd9)](_0x36a911['content'])});break;}case v[_0x32e7aa(0xa0)]:{const _0x4e6bf9=(_0x205790=this[_0x32e7aa(0xe1)]['getUnit'](_0x36a911[_0x32e7aa(0xf9)])[_0x32e7aa(0xe7)](_0x43fe88=>_0x43fe88['threadId']===_0x36a911[_0x32e7aa(0xda)]))==null?void 0x0:_0x205790['root'];_0x4e6bf9&&this[_0x32e7aa(0xe1)]['resolveComment'](_0x1b19d4,_0x358367,_0x4e6bf9['id'],_0x36a911[_0x32e7aa(0xce)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2f174f(_0x1803a)),p(0x1,_0x2f174f(_0x23f12b)),p(0x2,_0x2f174f(_0xe8fcb1)),p(0x3,_0x2f174f(_0x27970a))],S);const z=_0x9cf832(0xbc),M={};var k=Object[_0x9cf832(0xa8)],Q=(_0x29fb58,_0x2df8e7,_0x19864c,_0x2eea02)=>{const _0x65470=_0x9cf832;for(var _0x390171=_0x2eea02>0x1?void 0x0:_0x2eea02?k(_0x2df8e7,_0x19864c):_0x2df8e7,_0x52fcbb=_0x29fb58[_0x65470(0xd1)]-0x1,_0x5c3641;_0x52fcbb>=0x0;_0x52fcbb--)(_0x5c3641=_0x29fb58[_0x52fcbb])&&(_0x390171=_0x5c3641(_0x390171)||_0x390171);return _0x390171;},_=(_0x14a6dd,_0x573134)=>(_0x1da04d,_0x502cb8)=>_0x573134(_0x1da04d,_0x502cb8,_0x14a6dd);function X(_0x5c6cbd,_0x2d4c44){const _0xd2abdb=_0x9cf832,_0x5a60e1=_0x5c6cbd[_0xd2abdb(0xbb)][0x0];return{..._0x2d4c44,'id':_0x5a60e1[_0xd2abdb(0xfb)],'resolved':_0x5c6cbd[_0xd2abdb(0xce)]===0x1,'dT':D(_0x5a60e1['createTimestamp']),'personId':_0x5a60e1['userId'],'threadId':_0x5a60e1[_0xd2abdb(0xda)]};}function ee(_0x57bf54,_0x17ef8e,_0x42ff45){const _0x2a3786=_0x9cf832;var _0x29f0e6,_0xbeaf73;if(((_0xbeaf73=(_0x29f0e6=_0x57bf54==null?void 0x0:_0x57bf54[_0x2a3786(0xbb)])==null?void 0x0:_0x29f0e6[_0x2a3786(0xd1)])!=null?_0xbeaf73:0x0)>0x0){const _0x456bb8=(_0x3e804f,_0x21a111)=>({'id':_0x3e804f[_0x2a3786(0xfb)],'threadId':_0x3e804f['threadId'],'dT':D(_0x3e804f[_0x2a3786(0xdf)]),'personId':_0x3e804f['userId'],'resolved':_0x57bf54['solved']===I['Solved'],'unitId':_0x17ef8e,'subUnitId':_0x42ff45,'text':JSON[_0x2a3786(0xd9)](_0x3e804f['content']),'parentId':_0x21a111}),_0x5e24d5=_0x456bb8(_0x57bf54['replies'][0x0]);return{..._0x5e24d5,'children':_0x57bf54[_0x2a3786(0xbb)]['slice'](0x1)[_0x2a3786(0xa7)](_0x5f395e=>_0x456bb8(_0x5f395e,_0x5e24d5['id']))};}return null;}let f=class{constructor(_0x17967e,_0x358e58,_0x53d44b,_0x427289){const _0x3da1d1=_0x9cf832;this[_0x3da1d1(0xb8)]=_0x17967e,this[_0x3da1d1(0xb2)]=_0x358e58,this[_0x3da1d1(0xd0)]=_0x53d44b,this[_0x3da1d1(0xf5)]=_0x427289;}async['addComment'](_0x2c1f76){const _0x26a539=_0x9cf832;var _0x1403b4,_0x105841;const {parentId:_0x69ee58,unitId:_0x48e4ec,text:_0x3b3c8e,threadId:_0x51104a}=_0x2c1f76,_0x216412=(_0x105841=(_0x1403b4=_0x3b3c8e['customRanges'])==null?void 0x0:_0x1403b4[_0x26a539(0xcc)](_0x1cb298=>_0x1cb298[_0x26a539(0xc1)]===_0xf31c67['COMMENT'])[_0x26a539(0xa7)](_0x2e69df=>_0x2e69df[_0x26a539(0xbf)]))!=null?_0x105841:[],_0x5b1ede=JSON['stringify'](_0x3b3c8e),_0x94f4d=(await this[_0x26a539(0xd0)][_0x26a539(0xcd)](_0x48e4ec))[_0x26a539(0xaf)]();if(_0x69ee58){const _0x37ca21={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412,'threadId':_0x51104a},_0x1bad8=(await this['_httpService'][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xfa),{'body':_0x37ca21}))['body'][_0x26a539(0xb7)];return{..._0x2c1f76,'id':_0x1bad8[_0x26a539(0xfb)],'dT':_0x33b739(+_0x1bad8[_0x26a539(0xdf)])['format'](_0x26a539(0xb6)),'personId':_0x1bad8['userId']};}else{const _0xa9085b={'memberId':_0x94f4d,'unitId':_0x48e4ec,'content':_0x5b1ede,'mention':_0x216412},_0x518383=await this[_0x26a539(0xb8)][_0x26a539(0xac)](_0x26a539(0x101)+_0x48e4ec+_0x26a539(0xbe),{'body':_0xa9085b});return X(_0x518383['body'][_0x26a539(0xdb)],_0x2c1f76);}}async['updateComment'](_0x1a2966){const _0x104744=_0x9cf832;var _0x82ebde,_0x16fa86;const {text:_0x2358d0,unitId:_0x2c9bbe}=_0x1a2966,_0x2bbcf7=(_0x16fa86=(_0x82ebde=_0x2358d0[_0x104744(0xa5)])==null?void 0x0:_0x82ebde['filter'](_0x57af91=>_0x57af91[_0x104744(0xc1)]===_0xf31c67[_0x104744(0xa1)])[_0x104744(0xa7)](_0x20f280=>_0x20f280[_0x104744(0xbf)]))!=null?_0x16fa86:[],_0x14bad6=JSON['stringify'](_0x2358d0),_0x34ec8e=_0x1a2966[_0x104744(0xda)],_0x25c00e=_0x1a2966['id'],_0xdd12bf={'memberId':(await this[_0x104744(0xd0)][_0x104744(0xcd)](_0x2c9bbe))[_0x104744(0xaf)](),'unitId':_0x2c9bbe,'threadId':_0x34ec8e,'mention':_0x2bbcf7,'content':_0x14bad6,'replyId':_0x25c00e},_0x2d1b1d=await this[_0x104744(0xb8)][_0x104744(0xac)](_0x104744(0x101)+_0x2c9bbe+_0x104744(0xdc),{'body':_0xdd12bf});return!_0x2d1b1d[_0x104744(0xd5)][_0x104744(0xa9)]||_0x2d1b1d[_0x104744(0xd5)]['error'][_0x104744(0xc8)]===0x1;}async[_0x9cf832(0xe8)](_0xee1eaa){const _0x18e094=_0x9cf832,{unitId:_0xd74435}=_0xee1eaa,_0x29742b=_0xee1eaa[_0x18e094(0xda)],_0x3af91c={'memberId':this['_userService'][_0x18e094(0xde)]()[_0x18e094(0xa6)],'unitId':_0xd74435,'threadId':_0x29742b,'solved':_0xee1eaa[_0x18e094(0xe5)]?I[_0x18e094(0xba)]:I[_0x18e094(0xf4)]},_0x29ae6b=await this[_0x18e094(0xb8)][_0x18e094(0xac)](_0x18e094(0x101)+_0xd74435+'/solved',{'body':_0x3af91c});return!_0x29ae6b[_0x18e094(0xd5)][_0x18e094(0xa9)]||_0x29ae6b['body'][_0x18e094(0xa9)][_0x18e094(0xc8)]===0x1;}async['deleteComment'](_0x5d1d4a,_0x1b598c,_0x2d84d4,_0x4bf9a7){const _0x4c53ff=_0x9cf832,_0x4e3af8={'memberId':(await this[_0x4c53ff(0xd0)][_0x4c53ff(0xcd)](_0x5d1d4a))['getMemberID'](),'threadId':_0x2d84d4,'replyId':_0x4bf9a7,'unitId':_0x5d1d4a},_0x1f13b9=await this[_0x4c53ff(0xb8)]['post'](_0x4c53ff(0x101)+_0x5d1d4a+_0x4c53ff(0xb4),{'body':_0x4e3af8});return!_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)]||_0x1f13b9[_0x4c53ff(0xd5)][_0x4c53ff(0xa9)][_0x4c53ff(0xc8)]===0x1;}async['listComments'](_0x19d652,_0x5a6e43,_0x463926){const _0x171732=_0x9cf832,_0x209ef8={'unitId':_0x19d652,'threadId':_0x463926},_0x3a4225=await this[_0x171732(0xb8)][_0x171732(0xac)]('/universer-api/comment/unit/'+_0x19d652+_0x171732(0xe3),{'body':_0x209ef8}),_0x1efe12=_0x463926[_0x171732(0xa7)](_0x324576=>ee(_0x3a4225[_0x171732(0xd5)][_0x171732(0xb0)][_0x324576],_0x19d652,_0x5a6e43))[_0x171732(0xcc)](Boolean);return Object[_0x171732(0xc0)](_0x3a4225[_0x171732(0xd5)]['users'])[_0x171732(0xf7)](_0xaf8059=>{const _0x399552=_0x171732;this[_0x399552(0xb2)][_0x399552(0xa4)](_0xaf8059);}),_0x1efe12;}[_0x9cf832(0xf6)](_0x5b8d2b){const _0x312c0a=_0x9cf832;return{'id':_0x5b8d2b['id'],'threadId':_0x5b8d2b[_0x312c0a(0xda)],'ref':_0x5b8d2b[_0x312c0a(0x105)]};}};f=Q([_(0x0,_0x2f174f(_0x1a1c91)),_(0x1,_0x2f174f(_0xe8fcb1)),_(0x2,_0x2f174f(_0x1c6622)),_(0x3,_0x2f174f(_0x27970a))],f);var re=Object[_0x9cf832(0xa8)],te=(_0xf8ff33,_0x56c733,_0x79fe51,_0x13f505)=>{for(var _0x5b5691=_0x13f505>0x1?void 0x0:_0x13f505?re(_0x56c733,_0x79fe51):_0x56c733,_0x4ff544=_0xf8ff33['length']-0x1,_0x1cc6d4;_0x4ff544>=0x0;_0x4ff544--)(_0x1cc6d4=_0xf8ff33[_0x4ff544])&&(_0x5b5691=_0x1cc6d4(_0x5b5691)||_0x5b5691);return _0x5b5691;},N=(_0x353cc4,_0xc74858)=>(_0x42f8e1,_0x495577)=>_0xc74858(_0x42f8e1,_0x495577,_0x353cc4);let g=class extends _0xd71482{constructor(_0x552596,_0x20fb93){const _0x5b3343=_0x9cf832;super(),this['_threadCommentDataSourceService']=_0x552596,this[_0x5b3343(0xc2)]=_0x20fb93,this[_0x5b3343(0xf2)]();}['_initDataSource'](){const _0x1c2436=_0x9cf832;this[_0x1c2436(0xfe)][_0x1c2436(0xe0)]=this[_0x1c2436(0xc2)],this[_0x1c2436(0xfe)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x412e5d),N(0x1,_0x2f174f(f))],g);var se=Object[_0x9cf832(0xec)],oe=Object[_0x9cf832(0xa8)],ne=(_0x2246e4,_0x20db14,_0x94feec)=>_0x20db14 in _0x2246e4?se(_0x2246e4,_0x20db14,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x94feec}):_0x2246e4[_0x20db14]=_0x94feec,ie=(_0x46194e,_0x2fe6c9,_0x169a73,_0xee9fa5)=>{for(var _0x30d07a=_0xee9fa5>0x1?void 0x0:_0xee9fa5?oe(_0x2fe6c9,_0x169a73):_0x2fe6c9,_0x4c9e3a=_0x46194e['length']-0x1,_0x4dd80e;_0x4c9e3a>=0x0;_0x4c9e3a--)(_0x4dd80e=_0x46194e[_0x4c9e3a])&&(_0x30d07a=_0x4dd80e(_0x30d07a)||_0x30d07a);return _0x30d07a;},w=(_0x1e0a4d,_0x40efec)=>(_0x1506ef,_0x4755c0)=>_0x40efec(_0x1506ef,_0x4755c0,_0x1e0a4d),$=(_0x3ff6db,_0x3da789,_0x26215b)=>ne(_0x3ff6db,typeof _0x3da789!=_0x9cf832(0xd7)?_0x3da789+'':_0x3da789,_0x26215b);let b=class extends _0x5527d6{constructor(_0x5000b5=M,_0x23d008,_0x54bb8b){const _0x4d33e8=_0x9cf832;super(),this[_0x4d33e8(0xf8)]=_0x5000b5,this[_0x4d33e8(0xf5)]=_0x23d008,this[_0x4d33e8(0xd8)]=_0x54bb8b;const {..._0x43ad84}=_0x42355d({},M,this[_0x4d33e8(0xf8)]);this[_0x4d33e8(0xd8)][_0x4d33e8(0xc4)](z,_0x43ad84);}[_0x9cf832(0xab)](){const _0x3cd1a2=_0x9cf832;[[f],[g],[S]][_0x3cd1a2(0xf7)](_0xbc4b2a=>{const _0xb4cedd=_0x3cd1a2;this[_0xb4cedd(0xf5)][_0xb4cedd(0xee)](_0xbc4b2a);});}[_0x9cf832(0xa2)](){const _0xd54bb6=_0x9cf832;this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](g),this[_0xd54bb6(0xf5)][_0xd54bb6(0xb9)](S);}};$(b,_0x9cf832(0xaa),W),$(b,_0x9cf832(0xd6),_0x2a1993[_0x9cf832(0x104)]),b=ie([_0x215ab7(_0x1f6f25,_0x5befe3,_0x37b1f9),w(0x1,_0x2f174f(_0x27970a)),w(0x2,_0x1acffc)],b);function _0x51a8(){const _0x1ae353=['code','4697037rcVAuM','Delete','7369950IYEWOv','filter','requireSession','solved','_initUserSync','_sessionService','length','1110084bLQrge','parentId','root','body','type','symbol','_configService','parse','threadId','comment','/edit','Unknown','getCurrentUser','createTimestamp','dataSource','_threadCommentModel','172jgjqPa','/list','commentUpdate$','resolved','_commentService','find','resolveComment','46923HLrEsy','disposeWithMe','personId','defineProperty','user','add','Reply','updateComment','582445vfuzjI','_initDataSource','addComment','OpenOrReOpen','_injector','saveCommentToSnapshot','forEach','_config','unitId','/reply','replyId','content','Add','_threadCommentDataSourceService','UNRECOGNIZED','getUser','/universer-api/comment/unit/','2681ihyEeK','_init','UNIVER_UNKNOWN','ref','2692hqiMlW','userId','Solve','COMMENT','onReady','136bGfjmw','addUser','customRanges','userID','map','getOwnPropertyDescriptor','error','pluginName','onStarting','post','getUnit','delete','getMemberID','comments','18PnThkn','_userService','198BKCTRC','/delete','pipe','YYYY/MM/DD\x20HH:mm','reply','_httpService','get','Solved','replies','thread-comment-data-source.config','subscribe','/add','rangeId','values','rangeType','_threadCommentDataSource','format','setConfig','11176XIWmaD','users','Edit'];_0x51a8=function(){return _0x1ae353;};return _0x51a8();}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x12b56c=_0x10d6;function _0x10d6(_0x3ec3a3,_0x389d62){const _0xce34ea=_0xce34();return _0x10d6=function(_0x10d6db,_0x593616){_0x10d6db=_0x10d6db-0x198;let _0x481542=_0xce34ea[_0x10d6db];return _0x481542;},_0x10d6(_0x3ec3a3,_0x389d62);}(function(_0x215dac,_0x3e3d42){const _0x100892=_0x10d6,_0x359c04=_0x215dac();while(!![]){try{const _0x3b64df=-parseInt(_0x100892(0x1e4))/0x1*(parseInt(_0x100892(0x1dd))/0x2)+-parseInt(_0x100892(0x1ba))/0x3+-parseInt(_0x100892(0x1a4))/0x4+parseInt(_0x100892(0x1f0))/0x5+parseInt(_0x100892(0x1d0))/0x6*(-parseInt(_0x100892(0x1f2))/0x7)+-parseInt(_0x100892(0x1b7))/0x8*(parseInt(_0x100892(0x1c0))/0x9)+-parseInt(_0x100892(0x1d7))/0xa*(-parseInt(_0x100892(0x1c1))/0xb);if(_0x3b64df===_0x3e3d42)break;else _0x359c04['push'](_0x359c04['shift']());}catch(_0x507c53){_0x359c04['push'](_0x359c04['shift']());}}}(_0xce34,0x2fda4));import{CommentService as _0x4961eb,CollaborationSessionService as _0x29ed8b,UniverCollaborationClientPlugin as _0x34c6e6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x109dd0}from'@univerjs-pro/license';import{dayjs as _0x471f42,UserManagerService as _0x49fe3b,Inject as _0x39b796,Injector as _0x424bef,Disposable as _0x2461f3,CustomRangeType as _0x3f7c3c,UniverInstanceType as _0x823561,DependentOn as _0x21a168,IConfigService as _0x560613,Plugin as _0x3a42a6,merge as _0x720492}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3dd3a8}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xd98492,IThreadCommentDataSourceService as _0x91912c}from'@univerjs/thread-comment';import{bufferTime as _0x212897}from'rxjs';import{HTTPService as _0x397a0a}from'@univerjs/network';const W=_0x12b56c(0x1c9);var I=(_0x1d96a6=>(_0x1d96a6[_0x1d96a6['OpenOrReOpen']=0x0]=_0x12b56c(0x1e9),_0x1d96a6[_0x1d96a6[_0x12b56c(0x1a8)]=0x1]=_0x12b56c(0x1a8),_0x1d96a6[_0x1d96a6['UNRECOGNIZED']=-0x1]=_0x12b56c(0x1c6),_0x1d96a6))(I||{}),v=(_0x2eb9eb=>(_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x19c)]=0x0]=_0x12b56c(0x19c),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c5)]=0x1]=_0x12b56c(0x1c5),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1e6)]=0x2]=_0x12b56c(0x1e6),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c7)]=0x3]=_0x12b56c(0x1c7),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1dc)]=0x4]=_0x12b56c(0x1dc),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1d8)]=0x5]=_0x12b56c(0x1d8),_0x2eb9eb[_0x2eb9eb[_0x12b56c(0x1c6)]=-0x1]=_0x12b56c(0x1c6),_0x2eb9eb))(v||{});const D=_0x59c67d=>_0x471f42(new Date(+_0x59c67d))[_0x12b56c(0x1b9)](_0x12b56c(0x1ea)),B=async(_0x28c461,_0x2fda40)=>{const _0x4426f8=_0x12b56c,_0x95603c=_0x28c461['get'](_0x49fe3b),_0x36971b=_0x28c461[_0x4426f8(0x1b3)](_0x397a0a);_0x2fda40['forEach'](_0x134d6b=>{const _0x4b5b00=_0x4426f8;_0x95603c[_0x4b5b00(0x1af)](_0x134d6b)&&_0x2fda40[_0x4b5b00(0x1d5)](_0x134d6b);}),_0x2fda40[_0x4426f8(0x1f6)]&&(await _0x36971b[_0x4426f8(0x1b3)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2fda40]}}))[_0x4426f8(0x1b8)][_0x4426f8(0x1aa)][_0x4426f8(0x1d1)](_0x242a8d=>{const _0x39c586=_0x4426f8;_0x242a8d&&_0x95603c[_0x39c586(0x1e8)](_0x242a8d);});};var K=Object[_0x12b56c(0x1e1)],V=(_0x49dddd,_0x2f2948,_0x1f4f6d,_0x4d5bbc)=>{const _0x397ab9=_0x12b56c;for(var _0x1de8a2=_0x4d5bbc>0x1?void 0x0:_0x4d5bbc?K(_0x2f2948,_0x1f4f6d):_0x2f2948,_0x15a2d9=_0x49dddd[_0x397ab9(0x1f5)]-0x1,_0x145d0a;_0x15a2d9>=0x0;_0x15a2d9--)(_0x145d0a=_0x49dddd[_0x15a2d9])&&(_0x1de8a2=_0x145d0a(_0x1de8a2)||_0x1de8a2);return _0x1de8a2;},p=(_0x1c2670,_0x51ff8a)=>(_0x16d015,_0x31b19e)=>_0x51ff8a(_0x16d015,_0x31b19e,_0x1c2670);let S=class extends _0x2461f3{constructor(_0x37664f,_0x3415c1,_0x35fd08,_0x3135cd){const _0x57ca06=_0x12b56c;super(),this['_commentService']=_0x37664f,this[_0x57ca06(0x1e3)]=_0x3415c1,this[_0x57ca06(0x1ee)]=_0x35fd08,this[_0x57ca06(0x1ed)]=_0x3135cd,this[_0x57ca06(0x1c2)](),this['_initUserSync']();}['_initUserSync'](){const _0xd74971=_0x12b56c;this[_0xd74971(0x1f3)](this[_0xd74971(0x1e3)][_0xd74971(0x1f1)][_0xd74971(0x19f)](_0x212897(0x10))[_0xd74971(0x1c8)](_0x299557=>{const _0x539ecf=_0xd74971,_0x56e015=new Set();_0x299557[_0x539ecf(0x1d1)](_0x5509a8=>{const _0x37ad16=_0x539ecf;switch(_0x5509a8['type']){case _0x37ad16(0x1cf):{const _0x458f6c=_0x5509a8['payload'][_0x37ad16(0x1bd)];_0x56e015[_0x37ad16(0x1cf)](_0x458f6c);break;}}}),B(this[_0x539ecf(0x1ed)],_0x56e015);}));}[_0x12b56c(0x1c2)](){const _0xb948cb=_0x12b56c;this[_0xb948cb(0x1f3)](this['_commentService'][_0xb948cb(0x1f1)][_0xb948cb(0x1c8)](async _0x5338d9=>{const _0x2b6797=_0xb948cb;var _0x3102cd,_0x591ee7,_0x2ed96c,_0x189afb;const _0x37ba69=(_0x3102cd=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x44decd=>_0x44decd[_0x2b6797(0x19a)]===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x3102cd[_0x2b6797(0x1a0)];if(!_0x37ba69)return;const {unitId:_0x474aba,subUnitId:_0x58e080}=_0x37ba69;switch(_0x5338d9[_0x2b6797(0x1f9)]&&this['_userService'][_0x2b6797(0x1e8)](_0x5338d9[_0x2b6797(0x1f9)]),_0x5338d9[_0x2b6797(0x19e)]){case v[_0x2b6797(0x1c5)]:break;case v[_0x2b6797(0x1e6)]:{this[_0x2b6797(0x1e3)][_0x2b6797(0x1f7)](_0x474aba,_0x58e080,{'unitId':_0x474aba,'subUnitId':_0x58e080,'ref':'','id':_0x5338d9[_0x2b6797(0x1da)],'dT':D(+_0x5338d9[_0x2b6797(0x1ec)]),'threadId':_0x5338d9[_0x2b6797(0x19a)],'personId':(_0x2ed96c=(_0x591ee7=_0x5338d9[_0x2b6797(0x1f9)])==null?void 0x0:_0x591ee7[_0x2b6797(0x1b5)])!=null?_0x2ed96c:_0x5338d9[_0x2b6797(0x1ce)],'text':JSON['parse'](_0x5338d9['content']),'parentId':_0x37ba69['id']});break;}case v['Delete']:{const _0x3cb262=this[_0x2b6797(0x1e3)][_0x2b6797(0x1df)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);_0x3cb262&&_0x3cb262[_0x2b6797(0x1e5)]&&this['_threadCommentModel'][_0x2b6797(0x1a1)](_0x474aba,_0x58e080,_0x5338d9[_0x2b6797(0x1da)]);break;}case v[_0x2b6797(0x1c7)]:{this['_threadCommentModel'][_0x2b6797(0x1b1)](_0x474aba,_0x58e080,{'commentId':_0x5338d9['replyId'],'text':JSON[_0x2b6797(0x1ab)](_0x5338d9[_0x2b6797(0x1de)])});break;}case v[_0x2b6797(0x1d8)]:{const _0x16464f=(_0x189afb=this[_0x2b6797(0x1e3)][_0x2b6797(0x198)](_0x5338d9[_0x2b6797(0x1a5)])[_0x2b6797(0x1cb)](_0x361be3=>_0x361be3['threadId']===_0x5338d9[_0x2b6797(0x19a)]))==null?void 0x0:_0x189afb[_0x2b6797(0x1a0)];_0x16464f&&this[_0x2b6797(0x1e3)][_0x2b6797(0x1e7)](_0x474aba,_0x58e080,_0x16464f['id'],_0x5338d9['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x39b796(_0x4961eb)),p(0x1,_0x39b796(_0xd98492)),p(0x2,_0x39b796(_0x49fe3b)),p(0x3,_0x39b796(_0x424bef))],S);const z=_0x12b56c(0x1ef),M={};var k=Object[_0x12b56c(0x1e1)],Q=(_0x5d2e38,_0x2770b6,_0x4ed512,_0x4829a2)=>{const _0x5765dc=_0x12b56c;for(var _0x3f8544=_0x4829a2>0x1?void 0x0:_0x4829a2?k(_0x2770b6,_0x4ed512):_0x2770b6,_0x58b16a=_0x5d2e38[_0x5765dc(0x1f5)]-0x1,_0x449da5;_0x58b16a>=0x0;_0x58b16a--)(_0x449da5=_0x5d2e38[_0x58b16a])&&(_0x3f8544=_0x449da5(_0x3f8544)||_0x3f8544);return _0x3f8544;},_=(_0x499741,_0x242072)=>(_0x1250f3,_0x4e5125)=>_0x242072(_0x1250f3,_0x4e5125,_0x499741);function X(_0xcb7f20,_0x2c6057){const _0x397d31=_0x12b56c,_0x5b0c32=_0xcb7f20['replies'][0x0];return{..._0x2c6057,'id':_0x5b0c32['replyId'],'resolved':_0xcb7f20[_0x397d31(0x1bc)]===0x1,'dT':D(_0x5b0c32[_0x397d31(0x1ec)]),'personId':_0x5b0c32[_0x397d31(0x1ce)],'threadId':_0x5b0c32[_0x397d31(0x19a)]};}function ee(_0x494b40,_0x57abb2,_0x404687){const _0x42a50e=_0x12b56c;var _0x206ca9,_0x238f14;if(((_0x238f14=(_0x206ca9=_0x494b40==null?void 0x0:_0x494b40[_0x42a50e(0x199)])==null?void 0x0:_0x206ca9['length'])!=null?_0x238f14:0x0)>0x0){const _0x5d06ff=(_0x4b9736,_0x580b0b)=>({'id':_0x4b9736[_0x42a50e(0x1da)],'threadId':_0x4b9736[_0x42a50e(0x19a)],'dT':D(_0x4b9736['createTimestamp']),'personId':_0x4b9736[_0x42a50e(0x1ce)],'resolved':_0x494b40[_0x42a50e(0x1bc)]===I[_0x42a50e(0x1a8)],'unitId':_0x57abb2,'subUnitId':_0x404687,'text':JSON[_0x42a50e(0x1ab)](_0x4b9736[_0x42a50e(0x1de)]),'parentId':_0x580b0b}),_0x214db7=_0x5d06ff(_0x494b40[_0x42a50e(0x199)][0x0]);return{..._0x214db7,'children':_0x494b40[_0x42a50e(0x199)]['slice'](0x1)[_0x42a50e(0x1ae)](_0x5ad52e=>_0x5d06ff(_0x5ad52e,_0x214db7['id']))};}return null;}let f=class{constructor(_0x5274cf,_0x30f7e5,_0x20a447,_0x406063){const _0x2a4dc7=_0x12b56c;this[_0x2a4dc7(0x1f8)]=_0x5274cf,this['_userService']=_0x30f7e5,this[_0x2a4dc7(0x1f4)]=_0x20a447,this[_0x2a4dc7(0x1ed)]=_0x406063;}async['addComment'](_0x1c0eac){const _0x4f63a9=_0x12b56c;var _0x26aeb3,_0x2c362f;const {parentId:_0x2c5e69,unitId:_0x5c1e49,text:_0x36ec8e,threadId:_0x5bd0aa}=_0x1c0eac,_0x110a9c=(_0x2c362f=(_0x26aeb3=_0x36ec8e[_0x4f63a9(0x19b)])==null?void 0x0:_0x26aeb3[_0x4f63a9(0x1b2)](_0x2fd52c=>_0x2fd52c[_0x4f63a9(0x1e2)]===_0x3f7c3c['COMMENT'])['map'](_0xad4890=>_0xad4890[_0x4f63a9(0x1db)]))!=null?_0x2c362f:[],_0x52b941=JSON[_0x4f63a9(0x1c4)](_0x36ec8e),_0x1a8f8b=(await this[_0x4f63a9(0x1f4)]['requireSession'](_0x5c1e49))[_0x4f63a9(0x1eb)]();if(_0x2c5e69){const _0x419575={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c,'threadId':_0x5bd0aa},_0x5a1d8f=(await this[_0x4f63a9(0x1f8)][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+'/reply',{'body':_0x419575}))[_0x4f63a9(0x1b8)][_0x4f63a9(0x1b4)];return{..._0x1c0eac,'id':_0x5a1d8f[_0x4f63a9(0x1da)],'dT':_0x471f42(+_0x5a1d8f[_0x4f63a9(0x1ec)])[_0x4f63a9(0x1b9)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a1d8f[_0x4f63a9(0x1ce)]};}else{const _0xc58149={'memberId':_0x1a8f8b,'unitId':_0x5c1e49,'content':_0x52b941,'mention':_0x110a9c},_0x357b2c=await this['_httpService'][_0x4f63a9(0x1bb)](_0x4f63a9(0x1d4)+_0x5c1e49+_0x4f63a9(0x1d6),{'body':_0xc58149});return X(_0x357b2c[_0x4f63a9(0x1b8)][_0x4f63a9(0x1a3)],_0x1c0eac);}}async['updateComment'](_0x1dc244){const _0x13dac0=_0x12b56c;var _0xf84e6a,_0x46404c;const {text:_0x2c6bea,unitId:_0x273e79}=_0x1dc244,_0x52252f=(_0x46404c=(_0xf84e6a=_0x2c6bea[_0x13dac0(0x19b)])==null?void 0x0:_0xf84e6a[_0x13dac0(0x1b2)](_0x485391=>_0x485391[_0x13dac0(0x1e2)]===_0x3f7c3c['COMMENT'])[_0x13dac0(0x1ae)](_0x36e49f=>_0x36e49f[_0x13dac0(0x1db)]))!=null?_0x46404c:[],_0x4ef4be=JSON[_0x13dac0(0x1c4)](_0x2c6bea),_0x57cd05=_0x1dc244[_0x13dac0(0x19a)],_0x3a1684=_0x1dc244['id'],_0x36cb59={'memberId':(await this[_0x13dac0(0x1f4)][_0x13dac0(0x1d3)](_0x273e79))[_0x13dac0(0x1eb)](),'unitId':_0x273e79,'threadId':_0x57cd05,'mention':_0x52252f,'content':_0x4ef4be,'replyId':_0x3a1684},_0x562e3c=await this[_0x13dac0(0x1f8)][_0x13dac0(0x1bb)](_0x13dac0(0x1d4)+_0x273e79+'/edit',{'body':_0x36cb59});return!_0x562e3c[_0x13dac0(0x1b8)][_0x13dac0(0x1bf)]||_0x562e3c[_0x13dac0(0x1b8)]['error'][_0x13dac0(0x1c3)]===0x1;}async[_0x12b56c(0x1e7)](_0x400644){const _0x3d0046=_0x12b56c,{unitId:_0x2e15c8}=_0x400644,_0x4be0ef=_0x400644['threadId'],_0x51070c={'memberId':this[_0x3d0046(0x1ee)][_0x3d0046(0x1d2)]()['userID'],'unitId':_0x2e15c8,'threadId':_0x4be0ef,'solved':_0x400644['resolved']?I[_0x3d0046(0x1a8)]:I[_0x3d0046(0x1e9)]},_0x1cabff=await this['_httpService'][_0x3d0046(0x1bb)]('/universer-api/comment/unit/'+_0x2e15c8+'/solved',{'body':_0x51070c});return!_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)]||_0x1cabff[_0x3d0046(0x1b8)][_0x3d0046(0x1bf)][_0x3d0046(0x1c3)]===0x1;}async['deleteComment'](_0x33f749,_0x4a8dd0,_0x3dc8d8,_0x7080){const _0x1edd4e=_0x12b56c,_0x35b9af={'memberId':(await this[_0x1edd4e(0x1f4)][_0x1edd4e(0x1d3)](_0x33f749))['getMemberID'](),'threadId':_0x3dc8d8,'replyId':_0x7080,'unitId':_0x33f749},_0x13a547=await this[_0x1edd4e(0x1f8)][_0x1edd4e(0x1bb)](_0x1edd4e(0x1d4)+_0x33f749+_0x1edd4e(0x1be),{'body':_0x35b9af});return!_0x13a547[_0x1edd4e(0x1b8)]['error']||_0x13a547[_0x1edd4e(0x1b8)]['error'][_0x1edd4e(0x1c3)]===0x1;}async[_0x12b56c(0x1cd)](_0x30a587,_0x2a0dd9,_0x29e4b1){const _0x345ca0=_0x12b56c,_0x14e0fb={'unitId':_0x30a587,'threadId':_0x29e4b1},_0x2edb5c=await this['_httpService'][_0x345ca0(0x1bb)](_0x345ca0(0x1d4)+_0x30a587+'/list',{'body':_0x14e0fb}),_0x9970c=_0x29e4b1[_0x345ca0(0x1ae)](_0x55961a=>ee(_0x2edb5c[_0x345ca0(0x1b8)]['comments'][_0x55961a],_0x30a587,_0x2a0dd9))['filter'](Boolean);return Object['values'](_0x2edb5c[_0x345ca0(0x1b8)][_0x345ca0(0x1aa)])['forEach'](_0x1d9cbf=>{const _0x32aa6c=_0x345ca0;this[_0x32aa6c(0x1ee)][_0x32aa6c(0x1e8)](_0x1d9cbf);}),_0x9970c;}[_0x12b56c(0x1cc)](_0x31306f){const _0x3f49c8=_0x12b56c;return{'id':_0x31306f['id'],'threadId':_0x31306f[_0x3f49c8(0x19a)],'ref':_0x31306f[_0x3f49c8(0x1ad)]};}};f=Q([_(0x0,_0x39b796(_0x397a0a)),_(0x1,_0x39b796(_0x49fe3b)),_(0x2,_0x39b796(_0x29ed8b)),_(0x3,_0x39b796(_0x424bef))],f);var re=Object[_0x12b56c(0x1e1)],te=(_0x195d00,_0x3804a4,_0x32fccf,_0x11799b)=>{const _0x1f94d9=_0x12b56c;for(var _0x247dde=_0x11799b>0x1?void 0x0:_0x11799b?re(_0x3804a4,_0x32fccf):_0x3804a4,_0xdaeddd=_0x195d00[_0x1f94d9(0x1f5)]-0x1,_0x5f3674;_0xdaeddd>=0x0;_0xdaeddd--)(_0x5f3674=_0x195d00[_0xdaeddd])&&(_0x247dde=_0x5f3674(_0x247dde)||_0x247dde);return _0x247dde;},N=(_0x14a4e0,_0x366d79)=>(_0x56242a,_0x57b7b4)=>_0x366d79(_0x56242a,_0x57b7b4,_0x14a4e0);function _0xce34(){const _0x4ad063=['parentId','Reply','resolveComment','addUser','OpenOrReOpen','YYYY/MM/DD\x20HH:mm','getMemberID','createTimestamp','_injector','_userService','thread-comment-data-source.config','450885yUTaLy','commentUpdate$','175BvaMsD','disposeWithMe','_sessionService','length','size','addComment','_httpService','user','getUnit','replies','threadId','customRanges','Unknown','UNIVER_UNKNOWN','type','pipe','root','deleteComment','dataSource','comment','731232bYBsLZ','unitId','defineProperty','_config','Solved','symbol','users','parse','_threadCommentDataSource','ref','map','getUser','pluginName','updateComment','filter','get','reply','userID','_threadCommentDataSourceService','538904vtzFOm','body','format','1118307pxPZje','post','solved','personId','/delete','error','36zrKTBX','11hAPOoA','_init','code','stringify','Add','UNRECOGNIZED','Edit','subscribe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_initDataSource','find','saveCommentToSnapshot','listComments','userId','add','26454HqJiae','forEach','getCurrentUser','requireSession','/universer-api/comment/unit/','delete','/add','11385430nAKAIF','Solve','setConfig','replyId','rangeId','Delete','2HdmDbf','content','getComment','_configService','getOwnPropertyDescriptor','rangeType','_threadCommentModel','97462rCBWoe'];_0xce34=function(){return _0x4ad063;};return _0xce34();}let g=class extends _0x2461f3{constructor(_0x3c357d,_0x166fdb){const _0x5c8294=_0x12b56c;super(),this[_0x5c8294(0x1b6)]=_0x3c357d,this[_0x5c8294(0x1ac)]=_0x166fdb,this[_0x5c8294(0x1ca)]();}[_0x12b56c(0x1ca)](){const _0x50baa6=_0x12b56c;this[_0x50baa6(0x1b6)][_0x50baa6(0x1a2)]=this[_0x50baa6(0x1ac)],this[_0x50baa6(0x1b6)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x91912c),N(0x1,_0x39b796(f))],g);var se=Object[_0x12b56c(0x1a6)],oe=Object[_0x12b56c(0x1e1)],ne=(_0x37a0d9,_0xb50cc6,_0x7beabe)=>_0xb50cc6 in _0x37a0d9?se(_0x37a0d9,_0xb50cc6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x7beabe}):_0x37a0d9[_0xb50cc6]=_0x7beabe,ie=(_0x40b3a8,_0xc0a831,_0xace0f5,_0x73095e)=>{const _0x4fb9ce=_0x12b56c;for(var _0x16d76e=_0x73095e>0x1?void 0x0:_0x73095e?oe(_0xc0a831,_0xace0f5):_0xc0a831,_0x52c5a3=_0x40b3a8[_0x4fb9ce(0x1f5)]-0x1,_0x39d5d6;_0x52c5a3>=0x0;_0x52c5a3--)(_0x39d5d6=_0x40b3a8[_0x52c5a3])&&(_0x16d76e=_0x39d5d6(_0x16d76e)||_0x16d76e);return _0x16d76e;},w=(_0x369b6d,_0x4a6cb7)=>(_0x55b64e,_0x11fe55)=>_0x4a6cb7(_0x55b64e,_0x11fe55,_0x369b6d),$=(_0x5d71be,_0x93677f,_0x3dd09e)=>ne(_0x5d71be,typeof _0x93677f!=_0x12b56c(0x1a9)?_0x93677f+'':_0x93677f,_0x3dd09e);let b=class extends _0x3a42a6{constructor(_0x14eaa1=M,_0x57a787,_0x4237b3){const _0x3d2193=_0x12b56c;super(),this[_0x3d2193(0x1a7)]=_0x14eaa1,this[_0x3d2193(0x1ed)]=_0x57a787,this[_0x3d2193(0x1e0)]=_0x4237b3;const {..._0x2f5890}=_0x720492({},M,this[_0x3d2193(0x1a7)]);this['_configService'][_0x3d2193(0x1d9)](z,_0x2f5890);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x51bc9d=>{const _0x7b6389=_0x10d6;this[_0x7b6389(0x1ed)]['add'](_0x51bc9d);});}['onReady'](){const _0x456ea9=_0x12b56c;this[_0x456ea9(0x1ed)][_0x456ea9(0x1b3)](g),this[_0x456ea9(0x1ed)]['get'](S);}};$(b,_0x12b56c(0x1b0),W),$(b,'type',_0x823561[_0x12b56c(0x19d)]),b=ie([_0x21a168(_0x3dd3a8,_0x34c6e6,_0x109dd0),w(0x1,_0x39b796(_0x424bef)),w(0x2,_0x560613)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x399842,_0x678b65){const _0x349275=_0x48db,_0xa9a1bb=_0x399842();while(!![]){try{const _0x39f9f7=-parseInt(_0x349275(0x16c))/0x1*(-parseInt(_0x349275(0x1b3))/0x2)+-parseInt(_0x349275(0x190))/0x3+-parseInt(_0x349275(0x19a))/0x4*(parseInt(_0x349275(0x1a9))/0x5)+parseInt(_0x349275(0x177))/0x6*(parseInt(_0x349275(0x15c))/0x7)+parseInt(_0x349275(0x18b))/0x8+parseInt(_0x349275(0x12d))/0x9+parseInt(_0x349275(0x141))/0xa*(-parseInt(_0x349275(0x1ad))/0xb);if(_0x39f9f7===_0x678b65)break;else _0xa9a1bb['push'](_0xa9a1bb['shift']());}catch(_0x3cf7b5){_0xa9a1bb['push'](_0xa9a1bb['shift']());}}}(_0x55dd,0x9bf2f),function(_0x54cc7a,_0x3ff013){const _0x552634=_0x48db;typeof exports==_0x552634(0x156)&&typeof module<'u'?_0x3ff013(exports,require(_0x552634(0x1a6)),require('@univerjs-pro/license'),require(_0x552634(0x185)),require(_0x552634(0x163)),require(_0x552634(0x133)),require(_0x552634(0x1ae)),require('@univerjs/network')):typeof define==_0x552634(0x158)&&define['amd']?define([_0x552634(0x1b9),_0x552634(0x1a6),_0x552634(0x140),'@univerjs/core','@univerjs/thread-comment-ui',_0x552634(0x133),_0x552634(0x1ae),_0x552634(0x169)],_0x3ff013):(_0x54cc7a=typeof globalThis<'u'?globalThis:_0x54cc7a||self,_0x3ff013(_0x54cc7a[_0x552634(0x155)]={},_0x54cc7a[_0x552634(0x18c)],_0x54cc7a[_0x552634(0x171)],_0x54cc7a[_0x552634(0x191)],_0x54cc7a[_0x552634(0x17e)],_0x54cc7a[_0x552634(0x166)],_0x54cc7a[_0x552634(0x1ae)],_0x54cc7a['UniverNetwork']));}(this,function(_0x2fd347,_0x23a190,_0x450f12,_0x31b5ed,_0x1cf185,_0x4be181,_0x5ea329,_0x1acb3){'use strict';const _0x3c1854=_0x48db;const _0x5f4667=_0x3c1854(0x152);var _0x58a685=(_0x2c42da=>(_0x2c42da[_0x2c42da[_0x3c1854(0x12b)]=0x0]=_0x3c1854(0x12b),_0x2c42da[_0x2c42da[_0x3c1854(0x170)]=0x1]=_0x3c1854(0x170),_0x2c42da[_0x2c42da[_0x3c1854(0x149)]=-0x1]=_0x3c1854(0x149),_0x2c42da))(_0x58a685||{}),_0x303ad1=(_0x125df2=>(_0x125df2[_0x125df2[_0x3c1854(0x159)]=0x0]='Unknown',_0x125df2[_0x125df2[_0x3c1854(0x1a7)]=0x1]='Add',_0x125df2[_0x125df2['Reply']=0x2]=_0x3c1854(0x1b7),_0x125df2[_0x125df2[_0x3c1854(0x178)]=0x3]=_0x3c1854(0x178),_0x125df2[_0x125df2[_0x3c1854(0x184)]=0x4]=_0x3c1854(0x184),_0x125df2[_0x125df2[_0x3c1854(0x196)]=0x5]=_0x3c1854(0x196),_0x125df2[_0x125df2[_0x3c1854(0x149)]=-0x1]=_0x3c1854(0x149),_0x125df2))(_0x303ad1||{});const _0x14753e=_0x1184d1=>_0x31b5ed[_0x3c1854(0x161)](new Date(+_0x1184d1))[_0x3c1854(0x18d)](_0x3c1854(0x13c)),_0x5472eb=async(_0x5db649,_0x303d49)=>{const _0x3a1594=_0x3c1854,_0x510118=_0x5db649[_0x3a1594(0x15a)](_0x31b5ed[_0x3a1594(0x135)]),_0x45836c=_0x5db649[_0x3a1594(0x15a)](_0x1acb3[_0x3a1594(0x15b)]);_0x303d49['forEach'](_0x569e18=>{const _0xa620f8=_0x3a1594;_0x510118[_0xa620f8(0x147)](_0x569e18)&&_0x303d49[_0xa620f8(0x19f)](_0x569e18);}),_0x303d49['size']&&(await _0x45836c[_0x3a1594(0x15a)](_0x3a1594(0x16b),{'params':{'userIDs':[..._0x303d49]}}))[_0x3a1594(0x197)][_0x3a1594(0x1b8)][_0x3a1594(0x16f)](_0x4d2760=>{_0x4d2760&&_0x510118['addUser'](_0x4d2760);});};var _0x343e00=Object[_0x3c1854(0x148)],_0x24381b=(_0x182179,_0x3d1fc8,_0x5b731f,_0x32286e)=>{const _0x36983b=_0x3c1854;for(var _0x9ba9b8=_0x32286e>0x1?void 0x0:_0x32286e?_0x343e00(_0x3d1fc8,_0x5b731f):_0x3d1fc8,_0x211770=_0x182179[_0x36983b(0x13a)]-0x1,_0x2a691c;_0x211770>=0x0;_0x211770--)(_0x2a691c=_0x182179[_0x211770])&&(_0x9ba9b8=_0x2a691c(_0x9ba9b8)||_0x9ba9b8);return _0x9ba9b8;},_0x2c86d3=(_0x2b85aa,_0x4e3fd2)=>(_0x424968,_0x337e1c)=>_0x4e3fd2(_0x424968,_0x337e1c,_0x2b85aa);let _0x39bcf5=class extends _0x31b5ed['Disposable']{constructor(_0x217376,_0x26996a,_0x46e95c,_0x8a353c){const _0x3510b0=_0x3c1854;super(),this[_0x3510b0(0x199)]=_0x217376,this[_0x3510b0(0x1b2)]=_0x26996a,this[_0x3510b0(0x168)]=_0x46e95c,this[_0x3510b0(0x189)]=_0x8a353c,this[_0x3510b0(0x130)](),this[_0x3510b0(0x145)]();}[_0x3c1854(0x145)](){const _0x425e60=_0x3c1854;this[_0x425e60(0x17d)](this[_0x425e60(0x1b2)][_0x425e60(0x176)][_0x425e60(0x18e)](_0x5ea329[_0x425e60(0x192)](0x10))[_0x425e60(0x1b1)](_0x3ef80a=>{const _0x42ab36=_0x425e60,_0x5eb31e=new Set();_0x3ef80a[_0x42ab36(0x16f)](_0x3b829e=>{const _0xdd7dd4=_0x42ab36;switch(_0x3b829e[_0xdd7dd4(0x134)]){case _0xdd7dd4(0x12e):{const _0x5f3ac8=_0x3b829e[_0xdd7dd4(0x17b)][_0xdd7dd4(0x14e)];_0x5eb31e[_0xdd7dd4(0x12e)](_0x5f3ac8);break;}}}),_0x5472eb(this[_0x42ab36(0x189)],_0x5eb31e);}));}[_0x3c1854(0x130)](){const _0x2e320a=_0x3c1854;this[_0x2e320a(0x17d)](this[_0x2e320a(0x199)][_0x2e320a(0x176)][_0x2e320a(0x1b1)](async _0x2fd2f7=>{const _0x4c60dd=_0x2e320a;var _0x2da656,_0x91ef1b,_0x247494,_0x5d2257;const _0x1608c6=(_0x2da656=this['_threadCommentModel'][_0x4c60dd(0x19d)](_0x2fd2f7[_0x4c60dd(0x17c)])['find'](_0x508dcf=>_0x508dcf['threadId']===_0x2fd2f7['threadId']))==null?void 0x0:_0x2da656[_0x4c60dd(0x146)];if(!_0x1608c6)return;const {unitId:_0xbe1311,subUnitId:_0x13b6c}=_0x1608c6;switch(_0x2fd2f7[_0x4c60dd(0x188)]&&this['_userService']['addUser'](_0x2fd2f7['user']),_0x2fd2f7[_0x4c60dd(0x134)]){case _0x303ad1[_0x4c60dd(0x1a7)]:break;case _0x303ad1[_0x4c60dd(0x1b7)]:{this[_0x4c60dd(0x1b2)][_0x4c60dd(0x16a)](_0xbe1311,_0x13b6c,{'unitId':_0xbe1311,'subUnitId':_0x13b6c,'ref':'','id':_0x2fd2f7[_0x4c60dd(0x162)],'dT':_0x14753e(+_0x2fd2f7[_0x4c60dd(0x19b)]),'threadId':_0x2fd2f7[_0x4c60dd(0x1a4)],'personId':(_0x247494=(_0x91ef1b=_0x2fd2f7['user'])==null?void 0x0:_0x91ef1b['userID'])!=null?_0x247494:_0x2fd2f7['userId'],'text':JSON[_0x4c60dd(0x15f)](_0x2fd2f7[_0x4c60dd(0x137)]),'parentId':_0x1608c6['id']});break;}case _0x303ad1[_0x4c60dd(0x184)]:{const _0x5530c9=this[_0x4c60dd(0x1b2)][_0x4c60dd(0x19c)](_0xbe1311,_0x13b6c,_0x2fd2f7['replyId']);_0x5530c9&&_0x5530c9[_0x4c60dd(0x160)]&&this[_0x4c60dd(0x1b2)][_0x4c60dd(0x1a0)](_0xbe1311,_0x13b6c,_0x2fd2f7[_0x4c60dd(0x162)]);break;}case _0x303ad1[_0x4c60dd(0x178)]:{this[_0x4c60dd(0x1b2)]['updateComment'](_0xbe1311,_0x13b6c,{'commentId':_0x2fd2f7[_0x4c60dd(0x162)],'text':JSON['parse'](_0x2fd2f7[_0x4c60dd(0x137)])});break;}case _0x303ad1[_0x4c60dd(0x196)]:{const _0x124bb7=(_0x5d2257=this[_0x4c60dd(0x1b2)][_0x4c60dd(0x19d)](_0x2fd2f7[_0x4c60dd(0x17c)])[_0x4c60dd(0x173)](_0x72b413=>_0x72b413['threadId']===_0x2fd2f7[_0x4c60dd(0x1a4)]))==null?void 0x0:_0x5d2257[_0x4c60dd(0x146)];_0x124bb7&&this[_0x4c60dd(0x1b2)]['resolveComment'](_0xbe1311,_0x13b6c,_0x124bb7['id'],_0x2fd2f7[_0x4c60dd(0x14b)]===_0x58a685[_0x4c60dd(0x170)]);break;}}}));}};_0x39bcf5=_0x24381b([_0x2c86d3(0x0,_0x31b5ed[_0x3c1854(0x12c)](_0x23a190[_0x3c1854(0x13f)])),_0x2c86d3(0x1,_0x31b5ed[_0x3c1854(0x12c)](_0x4be181[_0x3c1854(0x13b)])),_0x2c86d3(0x2,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed['UserManagerService'])),_0x2c86d3(0x3,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed['Injector']))],_0x39bcf5);const _0x4181c5=_0x3c1854(0x172),_0x1e063c={};var _0x4a23e3=Object[_0x3c1854(0x148)],_0x1d0e4b=(_0x81d9b5,_0x436413,_0x55ca19,_0x25fe95)=>{const _0x24bc8d=_0x3c1854;for(var _0x534a61=_0x25fe95>0x1?void 0x0:_0x25fe95?_0x4a23e3(_0x436413,_0x55ca19):_0x436413,_0x3a03a8=_0x81d9b5[_0x24bc8d(0x13a)]-0x1,_0x145c8a;_0x3a03a8>=0x0;_0x3a03a8--)(_0x145c8a=_0x81d9b5[_0x3a03a8])&&(_0x534a61=_0x145c8a(_0x534a61)||_0x534a61);return _0x534a61;},_0x26aded=(_0x2d7910,_0x5ae583)=>(_0x585d56,_0x5c12bc)=>_0x5ae583(_0x585d56,_0x5c12bc,_0x2d7910);function _0x438791(_0x59c7d3,_0x9897fc){const _0x2445f5=_0x3c1854,_0x3ef798=_0x59c7d3[_0x2445f5(0x139)][0x0];return{..._0x9897fc,'id':_0x3ef798[_0x2445f5(0x162)],'resolved':_0x59c7d3['solved']===0x1,'dT':_0x14753e(_0x3ef798[_0x2445f5(0x19b)]),'personId':_0x3ef798[_0x2445f5(0x186)],'threadId':_0x3ef798[_0x2445f5(0x1a4)]};}function _0x28440b(_0x4953c1,_0x5163f9,_0x3d8607){const _0x21476=_0x3c1854;var _0x1ac6e9,_0x4e6b60;if(((_0x4e6b60=(_0x1ac6e9=_0x4953c1==null?void 0x0:_0x4953c1['replies'])==null?void 0x0:_0x1ac6e9[_0x21476(0x13a)])!=null?_0x4e6b60:0x0)>0x0){const _0x50ad0b=(_0x4ea1ab,_0x474187)=>({'id':_0x4ea1ab[_0x21476(0x162)],'threadId':_0x4ea1ab['threadId'],'dT':_0x14753e(_0x4ea1ab[_0x21476(0x19b)]),'personId':_0x4ea1ab[_0x21476(0x186)],'resolved':_0x4953c1['solved']===_0x58a685[_0x21476(0x170)],'unitId':_0x5163f9,'subUnitId':_0x3d8607,'text':JSON[_0x21476(0x15f)](_0x4ea1ab[_0x21476(0x137)]),'parentId':_0x474187}),_0x5b06cd=_0x50ad0b(_0x4953c1[_0x21476(0x139)][0x0]);return{..._0x5b06cd,'children':_0x4953c1[_0x21476(0x139)][_0x21476(0x1a5)](0x1)[_0x21476(0x182)](_0x2bbb49=>_0x50ad0b(_0x2bbb49,_0x5b06cd['id']))};}return null;}let _0x35de67=class{constructor(_0x59b516,_0x499013,_0x4563ea,_0x25e3c9){const _0x47594e=_0x3c1854;this['_httpService']=_0x59b516,this[_0x47594e(0x168)]=_0x499013,this['_sessionService']=_0x4563ea,this[_0x47594e(0x189)]=_0x25e3c9;}async[_0x3c1854(0x16a)](_0x5c085e){const _0xa79f1a=_0x3c1854;var _0x2d64e8,_0x3f1da8;const {parentId:_0x1c2317,unitId:_0x2cdcdd,text:_0x5744b2,threadId:_0x149cab}=_0x5c085e,_0x3129f4=(_0x3f1da8=(_0x2d64e8=_0x5744b2[_0xa79f1a(0x175)])==null?void 0x0:_0x2d64e8[_0xa79f1a(0x15e)](_0x57aaaf=>_0x57aaaf['rangeType']===_0x31b5ed[_0xa79f1a(0x14f)]['COMMENT'])[_0xa79f1a(0x182)](_0x3f3b6d=>_0x3f3b6d[_0xa79f1a(0x19e)]))!=null?_0x3f1da8:[],_0x181d9c=JSON[_0xa79f1a(0x16e)](_0x5744b2),_0x27d9cf=(await this[_0xa79f1a(0x165)][_0xa79f1a(0x183)](_0x2cdcdd))[_0xa79f1a(0x142)]();if(_0x1c2317){const _0x453bc8={'memberId':_0x27d9cf,'unitId':_0x2cdcdd,'content':_0x181d9c,'mention':_0x3129f4,'threadId':_0x149cab},_0x3c5dc6=(await this['_httpService'][_0xa79f1a(0x14d)]('/universer-api/comment/unit/'+_0x2cdcdd+_0xa79f1a(0x14c),{'body':_0x453bc8}))[_0xa79f1a(0x197)][_0xa79f1a(0x1a2)];return{..._0x5c085e,'id':_0x3c5dc6[_0xa79f1a(0x162)],'dT':_0x31b5ed[_0xa79f1a(0x161)](+_0x3c5dc6[_0xa79f1a(0x19b)])[_0xa79f1a(0x18d)](_0xa79f1a(0x13c)),'personId':_0x3c5dc6[_0xa79f1a(0x186)]};}else{const _0x45a774={'memberId':_0x27d9cf,'unitId':_0x2cdcdd,'content':_0x181d9c,'mention':_0x3129f4},_0x229231=await this[_0xa79f1a(0x167)][_0xa79f1a(0x14d)](_0xa79f1a(0x154)+_0x2cdcdd+_0xa79f1a(0x1a3),{'body':_0x45a774});return _0x438791(_0x229231[_0xa79f1a(0x197)][_0xa79f1a(0x15d)],_0x5c085e);}}async['updateComment'](_0x48bd5b){const _0x3971bf=_0x3c1854;var _0x2d47a0,_0x182aa6;const {text:_0x3c6cbb,unitId:_0xfa845c}=_0x48bd5b,_0x416bc6=(_0x182aa6=(_0x2d47a0=_0x3c6cbb[_0x3971bf(0x175)])==null?void 0x0:_0x2d47a0['filter'](_0x8c26ca=>_0x8c26ca[_0x3971bf(0x198)]===_0x31b5ed[_0x3971bf(0x14f)][_0x3971bf(0x17a)])[_0x3971bf(0x182)](_0x198d9f=>_0x198d9f['rangeId']))!=null?_0x182aa6:[],_0x59d1b2=JSON[_0x3971bf(0x16e)](_0x3c6cbb),_0x283b84=_0x48bd5b['threadId'],_0x38e2a8=_0x48bd5b['id'],_0x2987b3={'memberId':(await this[_0x3971bf(0x165)][_0x3971bf(0x183)](_0xfa845c))[_0x3971bf(0x142)](),'unitId':_0xfa845c,'threadId':_0x283b84,'mention':_0x416bc6,'content':_0x59d1b2,'replyId':_0x38e2a8},_0x51bb2a=await this['_httpService']['post'](_0x3971bf(0x154)+_0xfa845c+_0x3971bf(0x1a1),{'body':_0x2987b3});return!_0x51bb2a[_0x3971bf(0x197)][_0x3971bf(0x13d)]||_0x51bb2a['body'][_0x3971bf(0x13d)][_0x3971bf(0x143)]===0x1;}async[_0x3c1854(0x138)](_0x3fd858){const _0x5c62ce=_0x3c1854,{unitId:_0x444221}=_0x3fd858,_0x1b51fd=_0x3fd858[_0x5c62ce(0x1a4)],_0x3a0f40={'memberId':this['_userService'][_0x5c62ce(0x151)]()[_0x5c62ce(0x1b5)],'unitId':_0x444221,'threadId':_0x1b51fd,'solved':_0x3fd858[_0x5c62ce(0x1af)]?_0x58a685[_0x5c62ce(0x170)]:_0x58a685[_0x5c62ce(0x12b)]},_0x5251bb=await this[_0x5c62ce(0x167)][_0x5c62ce(0x14d)](_0x5c62ce(0x154)+_0x444221+_0x5c62ce(0x136),{'body':_0x3a0f40});return!_0x5251bb[_0x5c62ce(0x197)][_0x5c62ce(0x13d)]||_0x5251bb[_0x5c62ce(0x197)][_0x5c62ce(0x13d)][_0x5c62ce(0x143)]===0x1;}async['deleteComment'](_0x187ca5,_0xd4397b,_0x427a5e,_0x2f2f44){const _0x1ae570=_0x3c1854,_0x47f304={'memberId':(await this[_0x1ae570(0x165)][_0x1ae570(0x183)](_0x187ca5))[_0x1ae570(0x142)](),'threadId':_0x427a5e,'replyId':_0x2f2f44,'unitId':_0x187ca5},_0x3320f6=await this[_0x1ae570(0x167)][_0x1ae570(0x14d)](_0x1ae570(0x154)+_0x187ca5+_0x1ae570(0x193),{'body':_0x47f304});return!_0x3320f6['body'][_0x1ae570(0x13d)]||_0x3320f6[_0x1ae570(0x197)][_0x1ae570(0x13d)][_0x1ae570(0x143)]===0x1;}async[_0x3c1854(0x194)](_0x544894,_0xa6d5b4,_0x174bdb){const _0x1d8e56=_0x3c1854,_0x1a45a0={'unitId':_0x544894,'threadId':_0x174bdb},_0x2fe925=await this[_0x1d8e56(0x167)][_0x1d8e56(0x14d)]('/universer-api/comment/unit/'+_0x544894+_0x1d8e56(0x180),{'body':_0x1a45a0}),_0x4aa752=_0x174bdb[_0x1d8e56(0x182)](_0x118adb=>_0x28440b(_0x2fe925['body'][_0x1d8e56(0x132)][_0x118adb],_0x544894,_0xa6d5b4))['filter'](Boolean);return Object[_0x1d8e56(0x150)](_0x2fe925['body'][_0x1d8e56(0x1b8)])['forEach'](_0x841bce=>{const _0x17d0ea=_0x1d8e56;this[_0x17d0ea(0x168)][_0x17d0ea(0x195)](_0x841bce);}),_0x4aa752;}[_0x3c1854(0x1ba)](_0xfacb39){const _0x21eee2=_0x3c1854;return{'id':_0xfacb39['id'],'threadId':_0xfacb39[_0x21eee2(0x1a4)],'ref':_0xfacb39[_0x21eee2(0x179)]};}};_0x35de67=_0x1d0e4b([_0x26aded(0x0,_0x31b5ed[_0x3c1854(0x12c)](_0x1acb3[_0x3c1854(0x15b)])),_0x26aded(0x1,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed[_0x3c1854(0x135)])),_0x26aded(0x2,_0x31b5ed[_0x3c1854(0x12c)](_0x23a190[_0x3c1854(0x1aa)])),_0x26aded(0x3,_0x31b5ed[_0x3c1854(0x12c)](_0x31b5ed[_0x3c1854(0x13e)]))],_0x35de67);var _0x204296=Object['getOwnPropertyDescriptor'],_0x5ad891=(_0x184abf,_0x288700,_0x222bb5,_0x3752c7)=>{const _0x4d11cb=_0x3c1854;for(var _0x4af454=_0x3752c7>0x1?void 0x0:_0x3752c7?_0x204296(_0x288700,_0x222bb5):_0x288700,_0x59d982=_0x184abf[_0x4d11cb(0x13a)]-0x1,_0x299281;_0x59d982>=0x0;_0x59d982--)(_0x299281=_0x184abf[_0x59d982])&&(_0x4af454=_0x299281(_0x4af454)||_0x4af454);return _0x4af454;},_0x313e1f=(_0x239ec1,_0x1884e2)=>(_0x11f0f3,_0x51bd37)=>_0x1884e2(_0x11f0f3,_0x51bd37,_0x239ec1);let _0x422b03=class extends _0x31b5ed[_0x3c1854(0x1ac)]{constructor(_0x7365fb,_0x8b25f0){const _0x1e2450=_0x3c1854;super(),this[_0x1e2450(0x1a8)]=_0x7365fb,this['_threadCommentDataSource']=_0x8b25f0,this['_initDataSource']();}[_0x3c1854(0x1ab)](){const _0x281760=_0x3c1854;this[_0x281760(0x1a8)]['dataSource']=this[_0x281760(0x131)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x422b03=_0x5ad891([_0x313e1f(0x0,_0x4be181[_0x3c1854(0x16d)]),_0x313e1f(0x1,_0x31b5ed['Inject'](_0x35de67))],_0x422b03);var _0x55ed3c=Object[_0x3c1854(0x164)],_0x29e6ed=Object[_0x3c1854(0x148)],_0x3028c0=(_0x303be0,_0x4a2aa2,_0x1d6fd8)=>_0x4a2aa2 in _0x303be0?_0x55ed3c(_0x303be0,_0x4a2aa2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1d6fd8}):_0x303be0[_0x4a2aa2]=_0x1d6fd8,_0x42f70c=(_0x104b6f,_0x52cc55,_0x1db5b4,_0x367080)=>{const _0x2de97e=_0x3c1854;for(var _0x23cbc4=_0x367080>0x1?void 0x0:_0x367080?_0x29e6ed(_0x52cc55,_0x1db5b4):_0x52cc55,_0x19db4e=_0x104b6f[_0x2de97e(0x13a)]-0x1,_0x43f490;_0x19db4e>=0x0;_0x19db4e--)(_0x43f490=_0x104b6f[_0x19db4e])&&(_0x23cbc4=_0x43f490(_0x23cbc4)||_0x23cbc4);return _0x23cbc4;},_0x3a4ad8=(_0x10949e,_0x515292)=>(_0x5ae607,_0x1b5c44)=>_0x515292(_0x5ae607,_0x1b5c44,_0x10949e),_0xc8db96=(_0x175bb8,_0x3ce3ea,_0xcaa187)=>_0x3028c0(_0x175bb8,typeof _0x3ce3ea!='symbol'?_0x3ce3ea+'':_0x3ce3ea,_0xcaa187);_0x2fd347['UniverThreadCommentDataSourcePlugin']=class extends _0x31b5ed[_0x3c1854(0x14a)]{constructor(_0x10800c=_0x1e063c,_0x5a1b6a,_0x470a96){const _0x1ad798=_0x3c1854;super(),this[_0x1ad798(0x187)]=_0x10800c,this[_0x1ad798(0x189)]=_0x5a1b6a,this[_0x1ad798(0x1b4)]=_0x470a96;const {..._0xc96025}=_0x31b5ed['merge']({},_0x1e063c,this['_config']);this[_0x1ad798(0x1b4)]['setConfig'](_0x4181c5,_0xc96025);}[_0x3c1854(0x157)](){const _0x4a7814=_0x3c1854;[[_0x35de67],[_0x422b03],[_0x39bcf5]][_0x4a7814(0x16f)](_0x191175=>{const _0x24afe1=_0x4a7814;this['_injector'][_0x24afe1(0x12e)](_0x191175);});}[_0x3c1854(0x17f)](){const _0x1c9351=_0x3c1854;this['_injector'][_0x1c9351(0x15a)](_0x422b03),this[_0x1c9351(0x189)][_0x1c9351(0x15a)](_0x39bcf5);}},_0xc8db96(_0x2fd347[_0x3c1854(0x153)],_0x3c1854(0x18a),_0x5f4667),_0xc8db96(_0x2fd347[_0x3c1854(0x153)],_0x3c1854(0x134),_0x31b5ed['UniverInstanceType'][_0x3c1854(0x12f)]),_0x2fd347[_0x3c1854(0x153)]=_0x42f70c([_0x31b5ed[_0x3c1854(0x18f)](_0x1cf185[_0x3c1854(0x1b0)],_0x23a190[_0x3c1854(0x1b6)],_0x450f12['UniverLicensePlugin']),_0x3a4ad8(0x1,_0x31b5ed['Inject'](_0x31b5ed['Injector'])),_0x3a4ad8(0x2,_0x31b5ed[_0x3c1854(0x144)])],_0x2fd347['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x2fd347,Symbol[_0x3c1854(0x174)],{'value':_0x3c1854(0x181)});}));function _0x48db(_0x17f3c3,_0x456988){const _0x55dd9e=_0x55dd();return _0x48db=function(_0x48dbab,_0x2d901a){_0x48dbab=_0x48dbab-0x12b;let _0xf0f8e=_0x55dd9e[_0x48dbab];return _0xf0f8e;},_0x48db(_0x17f3c3,_0x456988);}function _0x55dd(){const _0x46068c=['_initUserSync','root','getUser','getOwnPropertyDescriptor','UNRECOGNIZED','Plugin','solved','/reply','post','personId','CustomRangeType','values','getCurrentUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentDataSourcePlugin','/universer-api/comment/unit/','UniverProThreadCommentDatasource','object','onStarting','function','Unknown','get','HTTPService','98QmqpLQ','comment','filter','parse','parentId','dayjs','replyId','@univerjs/thread-comment-ui','defineProperty','_sessionService','UniverThreadComment','_httpService','_userService','@univerjs/network','addComment','/universer-api/user/list','245842BVoOqQ','IThreadCommentDataSourceService','stringify','forEach','Solved','UniverProLicense','thread-comment-data-source.config','find','toStringTag','customRanges','commentUpdate$','447654EBWXiv','Edit','ref','COMMENT','payload','unitId','disposeWithMe','UniverThreadCommentUi','onReady','/list','Module','map','requireSession','Delete','@univerjs/core','userId','_config','user','_injector','pluginName','8585328ONQEHG','UniverProCollaborationClient','format','pipe','DependentOn','2297919bCMUqP','UniverCore','bufferTime','/delete','listComments','addUser','Solve','body','rangeType','_commentService','8OnKxTG','createTimestamp','getComment','getUnit','rangeId','delete','deleteComment','/edit','reply','/add','threadId','slice','@univerjs-pro/collaboration-client','Add','_threadCommentDataSourceService','896840EEHYdE','CollaborationSessionService','_initDataSource','Disposable','15464086qSCojv','rxjs','resolved','UniverThreadCommentUIPlugin','subscribe','_threadCommentModel','10SIUFNJ','_configService','userID','UniverCollaborationClientPlugin','Reply','users','exports','saveCommentToSnapshot','OpenOrReOpen','Inject','11054034qJBijR','add','UNIVER_UNKNOWN','_init','_threadCommentDataSource','comments','@univerjs/thread-comment','type','UserManagerService','/solved','content','resolveComment','replies','length','ThreadCommentModel','YYYY/MM/DD\x20HH:mm','error','Injector','CommentService','@univerjs-pro/license','20CzXvlc','getMemberID','code','IConfigService'];_0x55dd=function(){return _0x46068c;};return _0x55dd();}
1
+ function _0x1a3b(){const _0x5f4946=['22337090QKcsGM','reply','@univerjs/core','parse','_injector','get','@univerjs-pro/collaboration-client','9PJStME','addComment','UniverInstanceType','UniverThreadComment','Inject','pluginName','post','DependentOn','/list','add','find','type','root','@univerjs/thread-comment-ui','amd','UniverThreadCommentUIPlugin','thread-comment-data-source.config','@univerjs/network','rxjs','UniverCore','content','merge','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','replyId','object','_configService','rangeType','map','31ZngTWj','UniverLicensePlugin','Solve','createTimestamp','setConfig','ThreadCommentModel','Injector','customRanges','_threadCommentModel','_init','onStarting','_sessionService','length','Delete','getComment','8pSHgIR','7731126ylLhFH','/universer-api/comment/unit/','/delete','values','parentId','personId','UniverNetwork','UserManagerService','getOwnPropertyDescriptor','/add','_threadCommentDataSourceService','commentUpdate$','_httpService','error','getMemberID','disposeWithMe','_initUserSync','ref','updateComment','1479948okIVtE','rangeId','_initDataSource','stringify','UNRECOGNIZED','delete','6349912NdYvAp','UniverProThreadCommentDatasource','filter','resolved','Edit','YYYY/MM/DD\x20HH:mm','Add','_commentService','Solved','OpenOrReOpen','IConfigService','getUnit','@univerjs-pro/license','UniverThreadCommentDataSourcePlugin','user','listComments','code','UniverThreadCommentUi','CollaborationSessionService','_config','Module','dayjs','8860159wyNqKh','body','CustomRangeType','requireSession','COMMENT','79334iFLXHJ','2155435uxpaYa','Disposable','saveCommentToSnapshot','slice','solved','@univerjs/thread-comment','format','subscribe','threadId','_threadCommentDataSource','forEach','HTTPService','/universer-api/user/list','getUser','comment','pipe','resolveComment','userId','addUser','replies','_userService','deleteComment','Reply','bufferTime','Unknown'];_0x1a3b=function(){return _0x5f4946;};return _0x1a3b();}function _0x3d08(_0xefa884,_0x12b092){const _0x1a3b03=_0x1a3b();return _0x3d08=function(_0x3d08f2,_0x489b3f){_0x3d08f2=_0x3d08f2-0x1da;let _0x185430=_0x1a3b03[_0x3d08f2];return _0x185430;},_0x3d08(_0xefa884,_0x12b092);}(function(_0x352dba,_0x5aba1b){const _0x2c6a1e=_0x3d08,_0x395d72=_0x352dba();while(!![]){try{const _0x9385c1=parseInt(_0x2c6a1e(0x20c))/0x1*(-parseInt(_0x2c6a1e(0x250))/0x2)+-parseInt(_0x2c6a1e(0x22f))/0x3*(-parseInt(_0x2c6a1e(0x21b))/0x4)+parseInt(_0x2c6a1e(0x251))/0x5+-parseInt(_0x2c6a1e(0x21c))/0x6+-parseInt(_0x2c6a1e(0x24b))/0x7+parseInt(_0x2c6a1e(0x235))/0x8+parseInt(_0x2c6a1e(0x1ef))/0x9*(parseInt(_0x2c6a1e(0x1e8))/0xa);if(_0x9385c1===_0x5aba1b)break;else _0x395d72['push'](_0x395d72['shift']());}catch(_0xd39e8a){_0x395d72['push'](_0x395d72['shift']());}}}(_0x1a3b,0xa16f0),function(_0x4f9d2c,_0xa10ccd){const _0x5ad4c7=_0x3d08;typeof exports==_0x5ad4c7(0x208)&&typeof module<'u'?_0xa10ccd(exports,require(_0x5ad4c7(0x1ee)),require(_0x5ad4c7(0x241)),require(_0x5ad4c7(0x1ea)),require(_0x5ad4c7(0x1fc)),require(_0x5ad4c7(0x256)),require('rxjs'),require(_0x5ad4c7(0x200))):typeof define=='function'&&define[_0x5ad4c7(0x1fd)]?define(['exports','@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x5ad4c7(0x1fc),'@univerjs/thread-comment',_0x5ad4c7(0x201),_0x5ad4c7(0x200)],_0xa10ccd):(_0x4f9d2c=typeof globalThis<'u'?globalThis:_0x4f9d2c||self,_0xa10ccd(_0x4f9d2c[_0x5ad4c7(0x236)]={},_0x4f9d2c['UniverProCollaborationClient'],_0x4f9d2c['UniverProLicense'],_0x4f9d2c[_0x5ad4c7(0x202)],_0x4f9d2c[_0x5ad4c7(0x246)],_0x4f9d2c[_0x5ad4c7(0x1f2)],_0x4f9d2c[_0x5ad4c7(0x201)],_0x4f9d2c[_0x5ad4c7(0x222)]));}(this,function(_0x5d58c4,_0x3c22ee,_0x5e75e3,_0x34997e,_0x438e4f,_0x2dc169,_0x1cb9ba,_0x26368c){'use strict';const _0x14e1d3=_0x3d08;const _0x404f18=_0x14e1d3(0x205);var _0x3e00c0=(_0x278d7d=>(_0x278d7d[_0x278d7d['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x278d7d[_0x278d7d['Solved']=0x1]='Solved',_0x278d7d[_0x278d7d[_0x14e1d3(0x233)]=-0x1]=_0x14e1d3(0x233),_0x278d7d))(_0x3e00c0||{}),_0x460808=(_0x188360=>(_0x188360[_0x188360[_0x14e1d3(0x1e7)]=0x0]='Unknown',_0x188360[_0x188360[_0x14e1d3(0x23b)]=0x1]='Add',_0x188360[_0x188360['Reply']=0x2]=_0x14e1d3(0x1e5),_0x188360[_0x188360[_0x14e1d3(0x239)]=0x3]=_0x14e1d3(0x239),_0x188360[_0x188360['Delete']=0x4]=_0x14e1d3(0x219),_0x188360[_0x188360[_0x14e1d3(0x20e)]=0x5]='Solve',_0x188360[_0x188360['UNRECOGNIZED']=-0x1]=_0x14e1d3(0x233),_0x188360))(_0x460808||{});const _0x11f57c=_0x8b9dc=>_0x34997e['dayjs'](new Date(+_0x8b9dc))[_0x14e1d3(0x257)](_0x14e1d3(0x23a)),_0x2cb561=async(_0x5850b3,_0xcd6991)=>{const _0xfffec1=_0x14e1d3,_0x42a9ca=_0x5850b3[_0xfffec1(0x1ed)](_0x34997e[_0xfffec1(0x223)]),_0x4913ea=_0x5850b3[_0xfffec1(0x1ed)](_0x26368c[_0xfffec1(0x1da)]);_0xcd6991['forEach'](_0x22a325=>{const _0x15d322=_0xfffec1;_0x42a9ca[_0x15d322(0x1dc)](_0x22a325)&&_0xcd6991[_0x15d322(0x234)](_0x22a325);}),_0xcd6991['size']&&(await _0x4913ea[_0xfffec1(0x1ed)](_0xfffec1(0x1db),{'params':{'userIDs':[..._0xcd6991]}}))[_0xfffec1(0x24c)]['users'][_0xfffec1(0x25b)](_0x27d92b=>{const _0x492d92=_0xfffec1;_0x27d92b&&_0x42a9ca[_0x492d92(0x1e1)](_0x27d92b);});};var _0x4b552b=Object[_0x14e1d3(0x224)],_0x6c0dc8=(_0x3c21ce,_0x2ee4e4,_0x539223,_0x3351cc)=>{const _0x51cfd4=_0x14e1d3;for(var _0x49befa=_0x3351cc>0x1?void 0x0:_0x3351cc?_0x4b552b(_0x2ee4e4,_0x539223):_0x2ee4e4,_0x1ba067=_0x3c21ce[_0x51cfd4(0x218)]-0x1,_0x35ae9f;_0x1ba067>=0x0;_0x1ba067--)(_0x35ae9f=_0x3c21ce[_0x1ba067])&&(_0x49befa=_0x35ae9f(_0x49befa)||_0x49befa);return _0x49befa;},_0x201133=(_0xb23236,_0x221b04)=>(_0xc1eee7,_0x4f0996)=>_0x221b04(_0xc1eee7,_0x4f0996,_0xb23236);let _0x219890=class extends _0x34997e[_0x14e1d3(0x252)]{constructor(_0xeb6fed,_0x48fcfb,_0xc2573b,_0x46d009){const _0x4fa084=_0x14e1d3;super(),this[_0x4fa084(0x23c)]=_0xeb6fed,this['_threadCommentModel']=_0x48fcfb,this['_userService']=_0xc2573b,this[_0x4fa084(0x1ec)]=_0x46d009,this[_0x4fa084(0x215)](),this[_0x4fa084(0x22c)]();}[_0x14e1d3(0x22c)](){const _0x2a003d=_0x14e1d3;this[_0x2a003d(0x22b)](this['_threadCommentModel'][_0x2a003d(0x227)][_0x2a003d(0x1de)](_0x1cb9ba[_0x2a003d(0x1e6)](0x10))['subscribe'](_0x3e0eb6=>{const _0xa625e5=_0x2a003d,_0x5e0dcc=new Set();_0x3e0eb6[_0xa625e5(0x25b)](_0x438e4c=>{const _0x5e705c=_0xa625e5;switch(_0x438e4c[_0x5e705c(0x1fa)]){case _0x5e705c(0x1f8):{const _0x3fd311=_0x438e4c['payload'][_0x5e705c(0x221)];_0x5e0dcc['add'](_0x3fd311);break;}}}),_0x2cb561(this[_0xa625e5(0x1ec)],_0x5e0dcc);}));}[_0x14e1d3(0x215)](){const _0x2ea736=_0x14e1d3;this['disposeWithMe'](this[_0x2ea736(0x23c)][_0x2ea736(0x227)][_0x2ea736(0x258)](async _0x5e306c=>{const _0x21e224=_0x2ea736;var _0x154bfa,_0x4a0179,_0x56442f,_0x293449;const _0x264373=(_0x154bfa=this['_threadCommentModel'][_0x21e224(0x240)](_0x5e306c['unitId'])[_0x21e224(0x1f9)](_0x5a07bf=>_0x5a07bf[_0x21e224(0x259)]===_0x5e306c[_0x21e224(0x259)]))==null?void 0x0:_0x154bfa[_0x21e224(0x1fb)];if(!_0x264373)return;const {unitId:_0x3f930b,subUnitId:_0x3ec814}=_0x264373;switch(_0x5e306c['user']&&this['_userService']['addUser'](_0x5e306c[_0x21e224(0x243)]),_0x5e306c['type']){case _0x460808[_0x21e224(0x23b)]:break;case _0x460808['Reply']:{this[_0x21e224(0x214)][_0x21e224(0x1f0)](_0x3f930b,_0x3ec814,{'unitId':_0x3f930b,'subUnitId':_0x3ec814,'ref':'','id':_0x5e306c[_0x21e224(0x207)],'dT':_0x11f57c(+_0x5e306c[_0x21e224(0x20f)]),'threadId':_0x5e306c[_0x21e224(0x259)],'personId':(_0x56442f=(_0x4a0179=_0x5e306c[_0x21e224(0x243)])==null?void 0x0:_0x4a0179['userID'])!=null?_0x56442f:_0x5e306c[_0x21e224(0x1e0)],'text':JSON[_0x21e224(0x1eb)](_0x5e306c[_0x21e224(0x203)]),'parentId':_0x264373['id']});break;}case _0x460808[_0x21e224(0x219)]:{const _0x1e0eba=this[_0x21e224(0x214)][_0x21e224(0x21a)](_0x3f930b,_0x3ec814,_0x5e306c['replyId']);_0x1e0eba&&_0x1e0eba[_0x21e224(0x220)]&&this[_0x21e224(0x214)]['deleteComment'](_0x3f930b,_0x3ec814,_0x5e306c[_0x21e224(0x207)]);break;}case _0x460808['Edit']:{this[_0x21e224(0x214)][_0x21e224(0x22e)](_0x3f930b,_0x3ec814,{'commentId':_0x5e306c['replyId'],'text':JSON[_0x21e224(0x1eb)](_0x5e306c[_0x21e224(0x203)])});break;}case _0x460808[_0x21e224(0x20e)]:{const _0x1d55bc=(_0x293449=this[_0x21e224(0x214)][_0x21e224(0x240)](_0x5e306c['unitId'])[_0x21e224(0x1f9)](_0x555cb7=>_0x555cb7['threadId']===_0x5e306c[_0x21e224(0x259)]))==null?void 0x0:_0x293449[_0x21e224(0x1fb)];_0x1d55bc&&this['_threadCommentModel'][_0x21e224(0x1df)](_0x3f930b,_0x3ec814,_0x1d55bc['id'],_0x5e306c[_0x21e224(0x255)]===_0x3e00c0['Solved']);break;}}}));}};_0x219890=_0x6c0dc8([_0x201133(0x0,_0x34997e[_0x14e1d3(0x1f3)](_0x3c22ee['CommentService'])),_0x201133(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x2dc169[_0x14e1d3(0x211)])),_0x201133(0x2,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e[_0x14e1d3(0x223)])),_0x201133(0x3,_0x34997e['Inject'](_0x34997e[_0x14e1d3(0x212)]))],_0x219890);const _0x219f2d=_0x14e1d3(0x1ff),_0x40e0d1={};var _0x259a8d=Object[_0x14e1d3(0x224)],_0x1fc87a=(_0x2e4dfe,_0x2e753b,_0x26fdfa,_0x64c699)=>{const _0x4b5b39=_0x14e1d3;for(var _0x217336=_0x64c699>0x1?void 0x0:_0x64c699?_0x259a8d(_0x2e753b,_0x26fdfa):_0x2e753b,_0x56aba1=_0x2e4dfe[_0x4b5b39(0x218)]-0x1,_0x4462c0;_0x56aba1>=0x0;_0x56aba1--)(_0x4462c0=_0x2e4dfe[_0x56aba1])&&(_0x217336=_0x4462c0(_0x217336)||_0x217336);return _0x217336;},_0x14f142=(_0x365acf,_0x28d2ee)=>(_0x476f9b,_0x50053e)=>_0x28d2ee(_0x476f9b,_0x50053e,_0x365acf);function _0x349a8f(_0x50a91f,_0x2fceb6){const _0x1334b2=_0x14e1d3,_0x58490e=_0x50a91f[_0x1334b2(0x1e2)][0x0];return{..._0x2fceb6,'id':_0x58490e['replyId'],'resolved':_0x50a91f[_0x1334b2(0x255)]===0x1,'dT':_0x11f57c(_0x58490e[_0x1334b2(0x20f)]),'personId':_0x58490e[_0x1334b2(0x1e0)],'threadId':_0x58490e[_0x1334b2(0x259)]};}function _0x57d166(_0x90ee81,_0x1d4184,_0x477318){const _0x623ddd=_0x14e1d3;var _0x5cc5aa,_0x59d989;if(((_0x59d989=(_0x5cc5aa=_0x90ee81==null?void 0x0:_0x90ee81['replies'])==null?void 0x0:_0x5cc5aa['length'])!=null?_0x59d989:0x0)>0x0){const _0x460214=(_0x69c6fc,_0xe33c6d)=>({'id':_0x69c6fc[_0x623ddd(0x207)],'threadId':_0x69c6fc[_0x623ddd(0x259)],'dT':_0x11f57c(_0x69c6fc[_0x623ddd(0x20f)]),'personId':_0x69c6fc[_0x623ddd(0x1e0)],'resolved':_0x90ee81[_0x623ddd(0x255)]===_0x3e00c0[_0x623ddd(0x23d)],'unitId':_0x1d4184,'subUnitId':_0x477318,'text':JSON[_0x623ddd(0x1eb)](_0x69c6fc[_0x623ddd(0x203)]),'parentId':_0xe33c6d}),_0x4ed3f8=_0x460214(_0x90ee81['replies'][0x0]);return{..._0x4ed3f8,'children':_0x90ee81['replies'][_0x623ddd(0x254)](0x1)[_0x623ddd(0x20b)](_0x2dbc23=>_0x460214(_0x2dbc23,_0x4ed3f8['id']))};}return null;}let _0x3113e2=class{constructor(_0x1aa023,_0x2821d1,_0x30ebb,_0xe8b0c6){const _0x4af897=_0x14e1d3;this[_0x4af897(0x228)]=_0x1aa023,this[_0x4af897(0x1e3)]=_0x2821d1,this[_0x4af897(0x217)]=_0x30ebb,this[_0x4af897(0x1ec)]=_0xe8b0c6;}async[_0x14e1d3(0x1f0)](_0x4a7d34){const _0x353891=_0x14e1d3;var _0x129b13,_0x32791f;const {parentId:_0xb8c2fa,unitId:_0x122e83,text:_0x257e1f,threadId:_0x3e8e77}=_0x4a7d34,_0x20512=(_0x32791f=(_0x129b13=_0x257e1f[_0x353891(0x213)])==null?void 0x0:_0x129b13[_0x353891(0x237)](_0x570a00=>_0x570a00[_0x353891(0x20a)]===_0x34997e[_0x353891(0x24d)]['COMMENT'])[_0x353891(0x20b)](_0x360b48=>_0x360b48['rangeId']))!=null?_0x32791f:[],_0x3dad73=JSON[_0x353891(0x232)](_0x257e1f),_0x14f24f=(await this[_0x353891(0x217)][_0x353891(0x24e)](_0x122e83))[_0x353891(0x22a)]();if(_0xb8c2fa){const _0x3634f0={'memberId':_0x14f24f,'unitId':_0x122e83,'content':_0x3dad73,'mention':_0x20512,'threadId':_0x3e8e77},_0x43bb2=(await this['_httpService'][_0x353891(0x1f5)]('/universer-api/comment/unit/'+_0x122e83+'/reply',{'body':_0x3634f0}))['body'][_0x353891(0x1e9)];return{..._0x4a7d34,'id':_0x43bb2[_0x353891(0x207)],'dT':_0x34997e[_0x353891(0x24a)](+_0x43bb2[_0x353891(0x20f)])['format'](_0x353891(0x23a)),'personId':_0x43bb2[_0x353891(0x1e0)]};}else{const _0x5d6317={'memberId':_0x14f24f,'unitId':_0x122e83,'content':_0x3dad73,'mention':_0x20512},_0x49e0ee=await this['_httpService'][_0x353891(0x1f5)](_0x353891(0x21d)+_0x122e83+_0x353891(0x225),{'body':_0x5d6317});return _0x349a8f(_0x49e0ee[_0x353891(0x24c)][_0x353891(0x1dd)],_0x4a7d34);}}async[_0x14e1d3(0x22e)](_0x25b942){const _0x5b38b0=_0x14e1d3;var _0x5cd0fe,_0x43496f;const {text:_0x31a95b,unitId:_0x1e2c6c}=_0x25b942,_0x530513=(_0x43496f=(_0x5cd0fe=_0x31a95b[_0x5b38b0(0x213)])==null?void 0x0:_0x5cd0fe[_0x5b38b0(0x237)](_0x2c11be=>_0x2c11be[_0x5b38b0(0x20a)]===_0x34997e[_0x5b38b0(0x24d)][_0x5b38b0(0x24f)])[_0x5b38b0(0x20b)](_0xbd5b15=>_0xbd5b15[_0x5b38b0(0x230)]))!=null?_0x43496f:[],_0x51f19a=JSON['stringify'](_0x31a95b),_0xec6e91=_0x25b942[_0x5b38b0(0x259)],_0x2b1eab=_0x25b942['id'],_0x4691ad={'memberId':(await this['_sessionService'][_0x5b38b0(0x24e)](_0x1e2c6c))[_0x5b38b0(0x22a)](),'unitId':_0x1e2c6c,'threadId':_0xec6e91,'mention':_0x530513,'content':_0x51f19a,'replyId':_0x2b1eab},_0x4b3b78=await this[_0x5b38b0(0x228)][_0x5b38b0(0x1f5)](_0x5b38b0(0x21d)+_0x1e2c6c+'/edit',{'body':_0x4691ad});return!_0x4b3b78['body'][_0x5b38b0(0x229)]||_0x4b3b78['body']['error'][_0x5b38b0(0x245)]===0x1;}async['resolveComment'](_0x1fafcb){const _0x5df248=_0x14e1d3,{unitId:_0x36fcaf}=_0x1fafcb,_0x597812=_0x1fafcb[_0x5df248(0x259)],_0x443a1c={'memberId':this[_0x5df248(0x1e3)]['getCurrentUser']()['userID'],'unitId':_0x36fcaf,'threadId':_0x597812,'solved':_0x1fafcb[_0x5df248(0x238)]?_0x3e00c0[_0x5df248(0x23d)]:_0x3e00c0[_0x5df248(0x23e)]},_0x48fbde=await this['_httpService'][_0x5df248(0x1f5)](_0x5df248(0x21d)+_0x36fcaf+_0x5df248(0x206),{'body':_0x443a1c});return!_0x48fbde['body']['error']||_0x48fbde[_0x5df248(0x24c)][_0x5df248(0x229)][_0x5df248(0x245)]===0x1;}async[_0x14e1d3(0x1e4)](_0x5f1967,_0x51bf3a,_0x390939,_0x31ee6a){const _0x1de6aa=_0x14e1d3,_0x35ca10={'memberId':(await this[_0x1de6aa(0x217)][_0x1de6aa(0x24e)](_0x5f1967))['getMemberID'](),'threadId':_0x390939,'replyId':_0x31ee6a,'unitId':_0x5f1967},_0x1f66e0=await this['_httpService'][_0x1de6aa(0x1f5)](_0x1de6aa(0x21d)+_0x5f1967+_0x1de6aa(0x21e),{'body':_0x35ca10});return!_0x1f66e0[_0x1de6aa(0x24c)][_0x1de6aa(0x229)]||_0x1f66e0[_0x1de6aa(0x24c)]['error']['code']===0x1;}async[_0x14e1d3(0x244)](_0x992956,_0x132549,_0x12a19){const _0x467ac3=_0x14e1d3,_0x429ebc={'unitId':_0x992956,'threadId':_0x12a19},_0x100985=await this[_0x467ac3(0x228)]['post'](_0x467ac3(0x21d)+_0x992956+_0x467ac3(0x1f7),{'body':_0x429ebc}),_0x38c4ca=_0x12a19[_0x467ac3(0x20b)](_0x4a8cf8=>_0x57d166(_0x100985[_0x467ac3(0x24c)]['comments'][_0x4a8cf8],_0x992956,_0x132549))['filter'](Boolean);return Object[_0x467ac3(0x21f)](_0x100985[_0x467ac3(0x24c)]['users'])[_0x467ac3(0x25b)](_0x20cc85=>{const _0x230443=_0x467ac3;this[_0x230443(0x1e3)][_0x230443(0x1e1)](_0x20cc85);}),_0x38c4ca;}[_0x14e1d3(0x253)](_0x9b58d){const _0x9ba0e3=_0x14e1d3;return{'id':_0x9b58d['id'],'threadId':_0x9b58d['threadId'],'ref':_0x9b58d[_0x9ba0e3(0x22d)]};}};_0x3113e2=_0x1fc87a([_0x14f142(0x0,_0x34997e[_0x14e1d3(0x1f3)](_0x26368c[_0x14e1d3(0x1da)])),_0x14f142(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e['UserManagerService'])),_0x14f142(0x2,_0x34997e['Inject'](_0x3c22ee[_0x14e1d3(0x247)])),_0x14f142(0x3,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e['Injector']))],_0x3113e2);var _0x364e8e=Object[_0x14e1d3(0x224)],_0x4c5a77=(_0x4f508b,_0x43710b,_0x53e5e6,_0x552bfd)=>{const _0x528999=_0x14e1d3;for(var _0x5a7ad8=_0x552bfd>0x1?void 0x0:_0x552bfd?_0x364e8e(_0x43710b,_0x53e5e6):_0x43710b,_0xac2530=_0x4f508b[_0x528999(0x218)]-0x1,_0x1c9561;_0xac2530>=0x0;_0xac2530--)(_0x1c9561=_0x4f508b[_0xac2530])&&(_0x5a7ad8=_0x1c9561(_0x5a7ad8)||_0x5a7ad8);return _0x5a7ad8;},_0x1ca1d5=(_0x2d74bc,_0x401883)=>(_0x24d92c,_0x5bf1f7)=>_0x401883(_0x24d92c,_0x5bf1f7,_0x2d74bc);let _0x34c2ef=class extends _0x34997e[_0x14e1d3(0x252)]{constructor(_0x31f41e,_0x347547){const _0x5b6df8=_0x14e1d3;super(),this[_0x5b6df8(0x226)]=_0x31f41e,this[_0x5b6df8(0x25a)]=_0x347547,this[_0x5b6df8(0x231)]();}[_0x14e1d3(0x231)](){const _0xd44fef=_0x14e1d3;this['_threadCommentDataSourceService']['dataSource']=this[_0xd44fef(0x25a)],this[_0xd44fef(0x226)]['syncUpdateMutationToColla']=!0x1;}};_0x34c2ef=_0x4c5a77([_0x1ca1d5(0x0,_0x2dc169['IThreadCommentDataSourceService']),_0x1ca1d5(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x3113e2))],_0x34c2ef);var _0x5cf7ee=Object['defineProperty'],_0x81077c=Object[_0x14e1d3(0x224)],_0x9ffec6=(_0x2e077f,_0x2a1922,_0x2e6a04)=>_0x2a1922 in _0x2e077f?_0x5cf7ee(_0x2e077f,_0x2a1922,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2e6a04}):_0x2e077f[_0x2a1922]=_0x2e6a04,_0xe0623c=(_0x590ebe,_0x19f1d3,_0x461d14,_0x55a07c)=>{const _0x483153=_0x14e1d3;for(var _0x1f7857=_0x55a07c>0x1?void 0x0:_0x55a07c?_0x81077c(_0x19f1d3,_0x461d14):_0x19f1d3,_0x450586=_0x590ebe[_0x483153(0x218)]-0x1,_0x20fd4e;_0x450586>=0x0;_0x450586--)(_0x20fd4e=_0x590ebe[_0x450586])&&(_0x1f7857=_0x20fd4e(_0x1f7857)||_0x1f7857);return _0x1f7857;},_0xc64092=(_0x2dce45,_0x290dec)=>(_0x400ce9,_0x342bfa)=>_0x290dec(_0x400ce9,_0x342bfa,_0x2dce45),_0x53b8cb=(_0x9ad304,_0x64fec3,_0x4ee082)=>_0x9ffec6(_0x9ad304,typeof _0x64fec3!='symbol'?_0x64fec3+'':_0x64fec3,_0x4ee082);_0x5d58c4[_0x14e1d3(0x242)]=class extends _0x34997e['Plugin']{constructor(_0x174c86=_0x40e0d1,_0x362f6b,_0x220d45){const _0x2c32cc=_0x14e1d3;super(),this[_0x2c32cc(0x248)]=_0x174c86,this[_0x2c32cc(0x1ec)]=_0x362f6b,this['_configService']=_0x220d45;const {..._0x36e29b}=_0x34997e[_0x2c32cc(0x204)]({},_0x40e0d1,this[_0x2c32cc(0x248)]);this[_0x2c32cc(0x209)][_0x2c32cc(0x210)](_0x219f2d,_0x36e29b);}[_0x14e1d3(0x216)](){[[_0x3113e2],[_0x34c2ef],[_0x219890]]['forEach'](_0x3f7ca7=>{this['_injector']['add'](_0x3f7ca7);});}['onReady'](){const _0x23ce61=_0x14e1d3;this[_0x23ce61(0x1ec)]['get'](_0x34c2ef),this[_0x23ce61(0x1ec)][_0x23ce61(0x1ed)](_0x219890);}},_0x53b8cb(_0x5d58c4[_0x14e1d3(0x242)],_0x14e1d3(0x1f4),_0x404f18),_0x53b8cb(_0x5d58c4[_0x14e1d3(0x242)],_0x14e1d3(0x1fa),_0x34997e[_0x14e1d3(0x1f1)]['UNIVER_UNKNOWN']),_0x5d58c4[_0x14e1d3(0x242)]=_0xe0623c([_0x34997e[_0x14e1d3(0x1f6)](_0x438e4f[_0x14e1d3(0x1fe)],_0x3c22ee['UniverCollaborationClientPlugin'],_0x5e75e3[_0x14e1d3(0x20d)]),_0xc64092(0x1,_0x34997e[_0x14e1d3(0x1f3)](_0x34997e[_0x14e1d3(0x212)])),_0xc64092(0x2,_0x34997e[_0x14e1d3(0x23f)])],_0x5d58c4[_0x14e1d3(0x242)]),Object['defineProperty'](_0x5d58c4,Symbol['toStringTag'],{'value':_0x14e1d3(0x249)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.1-nightly.202506141606",
3
+ "version": "0.8.1-nightly.202506161607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506141606",
49
- "@univerjs-pro/license": "0.8.1-nightly.202506141606",
48
+ "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506161607",
49
+ "@univerjs-pro/license": "0.8.1-nightly.202506161607",
50
50
  "@univerjs/protocol": "0.1.47-alpha.0",
51
- "@univerjs/network": "0.8.1-nightly.202506141606",
52
- "@univerjs/core": "0.8.1-nightly.202506141606",
53
- "@univerjs/thread-comment": "0.8.1-nightly.202506141606",
54
- "@univerjs/thread-comment-ui": "0.8.1-nightly.202506141606"
51
+ "@univerjs/network": "0.8.1-nightly.202506161607",
52
+ "@univerjs/core": "0.8.1-nightly.202506161607",
53
+ "@univerjs/thread-comment": "0.8.1-nightly.202506161607",
54
+ "@univerjs/thread-comment-ui": "0.8.1-nightly.202506161607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",