@univerjs-pro/thread-comment-datasource 0.8.0-nightly.202506051607 → 0.8.0

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 _0x49bf79=_0x5489;(function(_0x6c18d3,_0x29b2e2){const _0x449b9d=_0x5489,_0x342e7e=_0x6c18d3();while(!![]){try{const _0x1dc4bf=-parseInt(_0x449b9d(0x15e))/0x1*(parseInt(_0x449b9d(0x1c1))/0x2)+parseInt(_0x449b9d(0x17c))/0x3*(-parseInt(_0x449b9d(0x1ab))/0x4)+parseInt(_0x449b9d(0x1ae))/0x5+-parseInt(_0x449b9d(0x16a))/0x6*(parseInt(_0x449b9d(0x187))/0x7)+-parseInt(_0x449b9d(0x19b))/0x8+-parseInt(_0x449b9d(0x174))/0x9+parseInt(_0x449b9d(0x182))/0xa*(parseInt(_0x449b9d(0x166))/0xb);if(_0x1dc4bf===_0x29b2e2)break;else _0x342e7e['push'](_0x342e7e['shift']());}catch(_0x5e6b5f){_0x342e7e['push'](_0x342e7e['shift']());}}}(_0xa642,0x7edf2));Object[_0x49bf79(0x167)](exports,Symbol[_0x49bf79(0x176)],{'value':_0x49bf79(0x15f)});const b=require(_0x49bf79(0x1a5)),T=require(_0x49bf79(0x1bd)),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require(_0x49bf79(0x18e)),w=require(_0x49bf79(0x1a8)),P=require('@univerjs/network'),U=_0x49bf79(0x1b0);var I=(_0x38e964=>(_0x38e964[_0x38e964['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x38e964[_0x38e964[_0x49bf79(0x19d)]=0x1]=_0x49bf79(0x19d),_0x38e964[_0x38e964['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x38e964))(I||{}),v=(_0xe4ba6=>(_0xe4ba6[_0xe4ba6['Unknown']=0x0]=_0x49bf79(0x1a7),_0xe4ba6[_0xe4ba6[_0x49bf79(0x158)]=0x1]=_0x49bf79(0x158),_0xe4ba6[_0xe4ba6['Reply']=0x2]=_0x49bf79(0x177),_0xe4ba6[_0xe4ba6[_0x49bf79(0x179)]=0x3]=_0x49bf79(0x179),_0xe4ba6[_0xe4ba6[_0x49bf79(0x19e)]=0x4]=_0x49bf79(0x19e),_0xe4ba6[_0xe4ba6[_0x49bf79(0x1d1)]=0x5]=_0x49bf79(0x1d1),_0xe4ba6[_0xe4ba6[_0x49bf79(0x184)]=-0x1]=_0x49bf79(0x184),_0xe4ba6))(v||{});const f=_0x4ed036=>c[_0x49bf79(0x1c9)](new Date(+_0x4ed036))[_0x49bf79(0x1c7)](_0x49bf79(0x178)),R=async(_0x4f5c5b,_0x5a88de)=>{const _0x572cff=_0x49bf79,_0x4edbd1=_0x4f5c5b[_0x572cff(0x175)](c['UserManagerService']),_0x10d2a3=_0x4f5c5b[_0x572cff(0x175)](P[_0x572cff(0x1bf)]);_0x5a88de['forEach'](_0x313809=>{const _0x48e5e8=_0x572cff;_0x4edbd1[_0x48e5e8(0x1a4)](_0x313809)&&_0x5a88de[_0x48e5e8(0x1a6)](_0x313809);}),_0x5a88de[_0x572cff(0x15b)]&&(await _0x10d2a3['get'](_0x572cff(0x18c),{'params':{'userIDs':[..._0x5a88de]}}))['body'][_0x572cff(0x1c2)][_0x572cff(0x19f)](_0x4c971a=>{const _0x2a93e3=_0x572cff;_0x4c971a&&_0x4edbd1[_0x2a93e3(0x1be)](_0x4c971a);});};var $=Object[_0x49bf79(0x1b8)],E=(_0x7a6f7a,_0x2d5116,_0x141701,_0x5d6f66)=>{for(var _0x4bf9b9=_0x5d6f66>0x1?void 0x0:_0x5d6f66?$(_0x2d5116,_0x141701):_0x2d5116,_0x25fddb=_0x7a6f7a['length']-0x1,_0x5aca6c;_0x25fddb>=0x0;_0x25fddb--)(_0x5aca6c=_0x7a6f7a[_0x25fddb])&&(_0x4bf9b9=_0x5aca6c(_0x4bf9b9)||_0x4bf9b9);return _0x4bf9b9;},S=(_0x2c38ee,_0x57a98e)=>(_0x49388c,_0x467204)=>_0x57a98e(_0x49388c,_0x467204,_0x2c38ee);let p=class extends c[_0x49bf79(0x15c)]{constructor(_0x324b42,_0xd93f0,_0x17e19c,_0x58698c){const _0x3d7b9b=_0x49bf79;super(),this[_0x3d7b9b(0x193)]=_0x324b42,this[_0x3d7b9b(0x1aa)]=_0xd93f0,this[_0x3d7b9b(0x1c4)]=_0x17e19c,this[_0x3d7b9b(0x15d)]=_0x58698c,this[_0x3d7b9b(0x1b3)](),this[_0x3d7b9b(0x188)]();}['_initUserSync'](){const _0x1c2782=_0x49bf79;this[_0x1c2782(0x17e)](this[_0x1c2782(0x1aa)][_0x1c2782(0x197)][_0x1c2782(0x1ba)](w[_0x1c2782(0x168)](0x10))[_0x1c2782(0x1ca)](_0x5e685a=>{const _0x28c71c=_0x1c2782,_0x3c5662=new Set();_0x5e685a['forEach'](_0x3b2651=>{const _0x2eee86=_0x5489;switch(_0x3b2651[_0x2eee86(0x1d0)]){case _0x2eee86(0x1a2):{const _0x148e02=_0x3b2651[_0x2eee86(0x1bc)][_0x2eee86(0x19c)];_0x3c5662[_0x2eee86(0x1a2)](_0x148e02);break;}}}),R(this[_0x28c71c(0x15d)],_0x3c5662);}));}[_0x49bf79(0x1b3)](){const _0x103b3c=_0x49bf79;this[_0x103b3c(0x17e)](this[_0x103b3c(0x193)]['commentUpdate$'][_0x103b3c(0x1ca)](async _0x38082b=>{const _0x2ca6c6=_0x103b3c;var _0x35e6cf,_0x37ce1d,_0x1ec242,_0x23aee1;const _0x11f7c2=(_0x35e6cf=this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1a1)](_0x38082b['unitId'])[_0x2ca6c6(0x163)](_0x4aa590=>_0x4aa590[_0x2ca6c6(0x153)]===_0x38082b[_0x2ca6c6(0x153)]))==null?void 0x0:_0x35e6cf[_0x2ca6c6(0x190)];if(!_0x11f7c2)return;const {unitId:_0x49a31f,subUnitId:_0x16ec4c}=_0x11f7c2;switch(_0x38082b[_0x2ca6c6(0x186)]&&this[_0x2ca6c6(0x1c4)][_0x2ca6c6(0x1be)](_0x38082b[_0x2ca6c6(0x186)]),_0x38082b[_0x2ca6c6(0x1d0)]){case v[_0x2ca6c6(0x158)]:break;case v[_0x2ca6c6(0x177)]:{this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1c8)](_0x49a31f,_0x16ec4c,{'unitId':_0x49a31f,'subUnitId':_0x16ec4c,'ref':'','id':_0x38082b['replyId'],'dT':f(+_0x38082b['createTimestamp']),'threadId':_0x38082b[_0x2ca6c6(0x153)],'personId':(_0x1ec242=(_0x37ce1d=_0x38082b['user'])==null?void 0x0:_0x37ce1d[_0x2ca6c6(0x196)])!=null?_0x1ec242:_0x38082b[_0x2ca6c6(0x1cf)],'text':JSON['parse'](_0x38082b['content']),'parentId':_0x11f7c2['id']});break;}case v['Delete']:{const _0x51d9b7=this[_0x2ca6c6(0x1aa)]['getComment'](_0x49a31f,_0x16ec4c,_0x38082b[_0x2ca6c6(0x1cc)]);_0x51d9b7&&_0x51d9b7[_0x2ca6c6(0x18f)]&&this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1b7)](_0x49a31f,_0x16ec4c,_0x38082b[_0x2ca6c6(0x1cc)]);break;}case v['Edit']:{this[_0x2ca6c6(0x1aa)]['updateComment'](_0x49a31f,_0x16ec4c,{'commentId':_0x38082b[_0x2ca6c6(0x1cc)],'text':JSON[_0x2ca6c6(0x152)](_0x38082b[_0x2ca6c6(0x1bb)])});break;}case v['Solve']:{const _0x21c236=(_0x23aee1=this[_0x2ca6c6(0x1aa)][_0x2ca6c6(0x1a1)](_0x38082b[_0x2ca6c6(0x1ce)])['find'](_0x44d1d6=>_0x44d1d6[_0x2ca6c6(0x153)]===_0x38082b[_0x2ca6c6(0x153)]))==null?void 0x0:_0x23aee1[_0x2ca6c6(0x190)];_0x21c236&&this[_0x2ca6c6(0x1aa)]['resolveComment'](_0x49a31f,_0x16ec4c,_0x21c236['id'],_0x38082b[_0x2ca6c6(0x17b)]===I[_0x2ca6c6(0x19d)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x49bf79(0x156)])),S(0x1,c[_0x49bf79(0x171)](M[_0x49bf79(0x191)])),S(0x2,c['Inject'](c[_0x49bf79(0x1af)])),S(0x3,c['Inject'](c[_0x49bf79(0x16f)]))],p);function _0xa642(){const _0x3539db=['solved','2880534DgCNvE','body','disposeWithMe','setConfig','updateComment','listComments','35720340fpPZxv','createTimestamp','UNRECOGNIZED','/reply','user','91azMjdc','_initUserSync','map','UNIVER_UNKNOWN','/add','/universer-api/user/list','/edit','@univerjs/thread-comment','parentId','root','ThreadCommentModel','OpenOrReOpen','_commentService','code','filter','userID','commentUpdate$','getMemberID','merge','rangeType','7403256VeQTCU','personId','Solved','Delete','forEach','customRanges','getUnit','add','post','getUser','@univerjs-pro/collaboration-client','delete','Unknown','rxjs','Plugin','_threadCommentModel','4BafgKz','DependentOn','_config','1645445UuAGlH','UserManagerService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','symbol','replies','_init','saveCommentToSnapshot','_initDataSource','_httpService','deleteComment','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','pipe','content','payload','@univerjs-pro/license','addUser','HTTPService','resolveComment','2174ETQCgG','users','dataSource','_userService','thread-comment-data-source.config','COMMENT','format','addComment','dayjs','subscribe','requireSession','replyId','stringify','unitId','userId','type','Solve','comment','parse','threadId','/list','values','CommentService','_configService','Add','_threadCommentDataSourceService','comments','size','Disposable','_injector','11KrVmlt','Module','/solved','resolved','error','find','onStarting','/universer-api/comment/unit/','11PrtQlT','defineProperty','bufferTime','IConfigService','320964oCKYkG','CollaborationSessionService','length','_threadCommentDataSource','syncUpdateMutationToColla','Injector','_sessionService','Inject','rangeId','UniverThreadCommentDataSourcePlugin','7096437qBfpBa','get','toStringTag','Reply','YYYY/MM/DD\x20HH:mm','Edit','CustomRangeType'];_0xa642=function(){return _0x3539db;};return _0xa642();}const q=_0x49bf79(0x1c5),D={};var A=Object[_0x49bf79(0x1b8)],x=(_0x16c6db,_0x36ef4b,_0xd3ce05,_0x4c472d)=>{const _0x3be883=_0x49bf79;for(var _0x39b0ce=_0x4c472d>0x1?void 0x0:_0x4c472d?A(_0x36ef4b,_0xd3ce05):_0x36ef4b,_0x3d956e=_0x16c6db[_0x3be883(0x16c)]-0x1,_0x2acffe;_0x3d956e>=0x0;_0x3d956e--)(_0x2acffe=_0x16c6db[_0x3d956e])&&(_0x39b0ce=_0x2acffe(_0x39b0ce)||_0x39b0ce);return _0x39b0ce;},_=(_0x3b69ca,_0xbd5201)=>(_0x2af689,_0x22b10b)=>_0xbd5201(_0x2af689,_0x22b10b,_0x3b69ca);function Y(_0x23e02d,_0x3c343d){const _0x42047f=_0x49bf79,_0x595a74=_0x23e02d['replies'][0x0];return{..._0x3c343d,'id':_0x595a74[_0x42047f(0x1cc)],'resolved':_0x23e02d[_0x42047f(0x17b)]===0x1,'dT':f(_0x595a74[_0x42047f(0x183)]),'personId':_0x595a74[_0x42047f(0x1cf)],'threadId':_0x595a74[_0x42047f(0x153)]};}function _0x5489(_0x312ba7,_0x38f43a){const _0xa642c0=_0xa642();return _0x5489=function(_0x548909,_0x3aafe4){_0x548909=_0x548909-0x152;let _0x42cc36=_0xa642c0[_0x548909];return _0x42cc36;},_0x5489(_0x312ba7,_0x38f43a);}function G(_0x15ad7b,_0x4fbb54,_0x52a905){const _0xb143f3=_0x49bf79;var _0x2107a1,_0x37f167;if(((_0x37f167=(_0x2107a1=_0x15ad7b==null?void 0x0:_0x15ad7b[_0xb143f3(0x1b2)])==null?void 0x0:_0x2107a1[_0xb143f3(0x16c)])!=null?_0x37f167:0x0)>0x0){const _0x5ddac2=(_0x289d93,_0xdb74c9)=>({'id':_0x289d93['replyId'],'threadId':_0x289d93[_0xb143f3(0x153)],'dT':f(_0x289d93['createTimestamp']),'personId':_0x289d93[_0xb143f3(0x1cf)],'resolved':_0x15ad7b[_0xb143f3(0x17b)]===I[_0xb143f3(0x19d)],'unitId':_0x4fbb54,'subUnitId':_0x52a905,'text':JSON['parse'](_0x289d93[_0xb143f3(0x1bb)]),'parentId':_0xdb74c9}),_0x308f2d=_0x5ddac2(_0x15ad7b[_0xb143f3(0x1b2)][0x0]);return{..._0x308f2d,'children':_0x15ad7b[_0xb143f3(0x1b2)]['slice'](0x1)[_0xb143f3(0x189)](_0x5e7fee=>_0x5ddac2(_0x5e7fee,_0x308f2d['id']))};}return null;}let g=class{constructor(_0x17e694,_0x3f28d2,_0x41240c,_0x2489e8){const _0x48548b=_0x49bf79;this[_0x48548b(0x1b6)]=_0x17e694,this[_0x48548b(0x1c4)]=_0x3f28d2,this['_sessionService']=_0x41240c,this[_0x48548b(0x15d)]=_0x2489e8;}async[_0x49bf79(0x1c8)](_0x467af6){const _0x42bc4b=_0x49bf79;var _0x35c88d,_0xe90a92;const {parentId:_0x5ae672,unitId:_0x190e9d,text:_0x1be383,threadId:_0x2e8c7f}=_0x467af6,_0xfb6cc8=(_0xe90a92=(_0x35c88d=_0x1be383['customRanges'])==null?void 0x0:_0x35c88d[_0x42bc4b(0x195)](_0x5c2dc0=>_0x5c2dc0[_0x42bc4b(0x19a)]===c['CustomRangeType']['COMMENT'])['map'](_0x2a8146=>_0x2a8146[_0x42bc4b(0x172)]))!=null?_0xe90a92:[],_0x2b7689=JSON[_0x42bc4b(0x1cd)](_0x1be383),_0x5cfd29=(await this[_0x42bc4b(0x170)]['requireSession'](_0x190e9d))[_0x42bc4b(0x198)]();if(_0x5ae672){const _0x608079={'memberId':_0x5cfd29,'unitId':_0x190e9d,'content':_0x2b7689,'mention':_0xfb6cc8,'threadId':_0x2e8c7f},_0x2bb2ec=(await this[_0x42bc4b(0x1b6)][_0x42bc4b(0x1a3)]('/universer-api/comment/unit/'+_0x190e9d+_0x42bc4b(0x185),{'body':_0x608079}))[_0x42bc4b(0x17d)]['reply'];return{..._0x467af6,'id':_0x2bb2ec[_0x42bc4b(0x1cc)],'dT':c['dayjs'](+_0x2bb2ec[_0x42bc4b(0x183)])['format'](_0x42bc4b(0x178)),'personId':_0x2bb2ec[_0x42bc4b(0x1cf)]};}else{const _0x49339a={'memberId':_0x5cfd29,'unitId':_0x190e9d,'content':_0x2b7689,'mention':_0xfb6cc8},_0x4bb5a1=await this[_0x42bc4b(0x1b6)][_0x42bc4b(0x1a3)](_0x42bc4b(0x165)+_0x190e9d+_0x42bc4b(0x18b),{'body':_0x49339a});return Y(_0x4bb5a1[_0x42bc4b(0x17d)][_0x42bc4b(0x1d2)],_0x467af6);}}async[_0x49bf79(0x180)](_0x29ae4e){const _0x2b7a51=_0x49bf79;var _0x3282b8,_0x24d1d1;const {text:_0x434528,unitId:_0x19d106}=_0x29ae4e,_0x39d97b=(_0x24d1d1=(_0x3282b8=_0x434528[_0x2b7a51(0x1a0)])==null?void 0x0:_0x3282b8[_0x2b7a51(0x195)](_0x17be82=>_0x17be82[_0x2b7a51(0x19a)]===c[_0x2b7a51(0x17a)][_0x2b7a51(0x1c6)])[_0x2b7a51(0x189)](_0x1d3c95=>_0x1d3c95[_0x2b7a51(0x172)]))!=null?_0x24d1d1:[],_0x25b5bf=JSON[_0x2b7a51(0x1cd)](_0x434528),_0x3898ab=_0x29ae4e[_0x2b7a51(0x153)],_0x599a5f=_0x29ae4e['id'],_0xa9c9e7={'memberId':(await this['_sessionService'][_0x2b7a51(0x1cb)](_0x19d106))[_0x2b7a51(0x198)](),'unitId':_0x19d106,'threadId':_0x3898ab,'mention':_0x39d97b,'content':_0x25b5bf,'replyId':_0x599a5f},_0x3e1797=await this[_0x2b7a51(0x1b6)][_0x2b7a51(0x1a3)](_0x2b7a51(0x165)+_0x19d106+_0x2b7a51(0x18d),{'body':_0xa9c9e7});return!_0x3e1797[_0x2b7a51(0x17d)][_0x2b7a51(0x162)]||_0x3e1797['body'][_0x2b7a51(0x162)][_0x2b7a51(0x194)]===0x1;}async[_0x49bf79(0x1c0)](_0x32a0ec){const _0x557f2f=_0x49bf79,{unitId:_0x15df81}=_0x32a0ec,_0x44296e=_0x32a0ec[_0x557f2f(0x153)],_0x35475b={'memberId':this['_userService']['getCurrentUser']()[_0x557f2f(0x196)],'unitId':_0x15df81,'threadId':_0x44296e,'solved':_0x32a0ec[_0x557f2f(0x161)]?I[_0x557f2f(0x19d)]:I[_0x557f2f(0x192)]},_0x34fdb8=await this[_0x557f2f(0x1b6)][_0x557f2f(0x1a3)](_0x557f2f(0x165)+_0x15df81+_0x557f2f(0x160),{'body':_0x35475b});return!_0x34fdb8[_0x557f2f(0x17d)][_0x557f2f(0x162)]||_0x34fdb8[_0x557f2f(0x17d)][_0x557f2f(0x162)][_0x557f2f(0x194)]===0x1;}async['deleteComment'](_0x56761c,_0x1c7a30,_0x2031cd,_0x46b83d){const _0x8af501=_0x49bf79,_0x2f04f6={'memberId':(await this[_0x8af501(0x170)]['requireSession'](_0x56761c))[_0x8af501(0x198)](),'threadId':_0x2031cd,'replyId':_0x46b83d,'unitId':_0x56761c},_0x28ced5=await this[_0x8af501(0x1b6)][_0x8af501(0x1a3)](_0x8af501(0x165)+_0x56761c+'/delete',{'body':_0x2f04f6});return!_0x28ced5[_0x8af501(0x17d)][_0x8af501(0x162)]||_0x28ced5[_0x8af501(0x17d)][_0x8af501(0x162)][_0x8af501(0x194)]===0x1;}async[_0x49bf79(0x181)](_0x48dd50,_0x24b38c,_0x5265df){const _0x2a9f12=_0x49bf79,_0x3cd3ae={'unitId':_0x48dd50,'threadId':_0x5265df},_0x593deb=await this[_0x2a9f12(0x1b6)]['post'](_0x2a9f12(0x165)+_0x48dd50+_0x2a9f12(0x154),{'body':_0x3cd3ae}),_0x3b29d6=_0x5265df[_0x2a9f12(0x189)](_0x210e7c=>G(_0x593deb[_0x2a9f12(0x17d)][_0x2a9f12(0x15a)][_0x210e7c],_0x48dd50,_0x24b38c))[_0x2a9f12(0x195)](Boolean);return Object[_0x2a9f12(0x155)](_0x593deb[_0x2a9f12(0x17d)][_0x2a9f12(0x1c2)])['forEach'](_0x86ba8a=>{const _0x46188c=_0x2a9f12;this['_userService'][_0x46188c(0x1be)](_0x86ba8a);}),_0x3b29d6;}[_0x49bf79(0x1b4)](_0x108c28){const _0x165461=_0x49bf79;return{'id':_0x108c28['id'],'threadId':_0x108c28[_0x165461(0x153)],'ref':_0x108c28['ref']};}};g=x([_(0x0,c['Inject'](P[_0x49bf79(0x1bf)])),_(0x1,c[_0x49bf79(0x171)](c[_0x49bf79(0x1af)])),_(0x2,c['Inject'](b[_0x49bf79(0x16b)])),_(0x3,c[_0x49bf79(0x171)](c[_0x49bf79(0x16f)]))],g);var H=Object[_0x49bf79(0x1b8)],J=(_0x2365e9,_0x534419,_0x38a1ea,_0x5eef0e)=>{const _0x559e6a=_0x49bf79;for(var _0x8ab899=_0x5eef0e>0x1?void 0x0:_0x5eef0e?H(_0x534419,_0x38a1ea):_0x534419,_0x22492f=_0x2365e9[_0x559e6a(0x16c)]-0x1,_0x10d669;_0x22492f>=0x0;_0x22492f--)(_0x10d669=_0x2365e9[_0x22492f])&&(_0x8ab899=_0x10d669(_0x8ab899)||_0x8ab899);return _0x8ab899;},y=(_0x3801ff,_0x3465f6)=>(_0x4b8de3,_0x11bd5a)=>_0x3465f6(_0x4b8de3,_0x11bd5a,_0x3801ff);let C=class extends c[_0x49bf79(0x15c)]{constructor(_0x3beeea,_0x416d8c){const _0x5cb63c=_0x49bf79;super(),this[_0x5cb63c(0x159)]=_0x3beeea,this[_0x5cb63c(0x16d)]=_0x416d8c,this[_0x5cb63c(0x1b5)]();}[_0x49bf79(0x1b5)](){const _0xc28f4c=_0x49bf79;this['_threadCommentDataSourceService'][_0xc28f4c(0x1c3)]=this[_0xc28f4c(0x16d)],this[_0xc28f4c(0x159)][_0xc28f4c(0x16e)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x49bf79(0x171)](g))],C);var F=Object[_0x49bf79(0x167)],L=Object[_0x49bf79(0x1b8)],Z=(_0x5c8b97,_0x2e74eb,_0x38b8fa)=>_0x2e74eb in _0x5c8b97?F(_0x5c8b97,_0x2e74eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38b8fa}):_0x5c8b97[_0x2e74eb]=_0x38b8fa,W=(_0x5a2e9e,_0x3272a4,_0x17d428,_0x334678)=>{const _0x1df8c1=_0x49bf79;for(var _0x3156db=_0x334678>0x1?void 0x0:_0x334678?L(_0x3272a4,_0x17d428):_0x3272a4,_0x5a4b86=_0x5a2e9e[_0x1df8c1(0x16c)]-0x1,_0x27b9d8;_0x5a4b86>=0x0;_0x5a4b86--)(_0x27b9d8=_0x5a2e9e[_0x5a4b86])&&(_0x3156db=_0x27b9d8(_0x3156db)||_0x3156db);return _0x3156db;},O=(_0x410afd,_0x4dc964)=>(_0x54ab73,_0x561597)=>_0x4dc964(_0x54ab73,_0x561597,_0x410afd),N=(_0x294e27,_0x2b2fd2,_0x4f6104)=>Z(_0x294e27,typeof _0x2b2fd2!=_0x49bf79(0x1b1)?_0x2b2fd2+'':_0x2b2fd2,_0x4f6104);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x49bf79(0x1a9)]{constructor(_0x151a1b=D,_0x53c1a4,_0x437dc2){const _0x16fd4b=_0x49bf79;super(),this[_0x16fd4b(0x1ad)]=_0x151a1b,this[_0x16fd4b(0x15d)]=_0x53c1a4,this[_0x16fd4b(0x157)]=_0x437dc2;const {..._0x4f59ab}=c[_0x16fd4b(0x199)]({},D,this['_config']);this[_0x16fd4b(0x157)][_0x16fd4b(0x17f)](q,_0x4f59ab);}[_0x49bf79(0x164)](){const _0x49bd7b=_0x49bf79;[[g],[C],[p]][_0x49bd7b(0x19f)](_0xcaea74=>{const _0x3e9c73=_0x49bd7b;this[_0x3e9c73(0x15d)][_0x3e9c73(0x1a2)](_0xcaea74);});}['onReady'](){const _0x31e791=_0x49bf79;this[_0x31e791(0x15d)][_0x31e791(0x175)](C),this[_0x31e791(0x15d)]['get'](p);}},N(exports[_0x49bf79(0x173)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x49bf79(0x1d0),c['UniverInstanceType'][_0x49bf79(0x18a)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x49bf79(0x1ac)](j['UniverThreadCommentUIPlugin'],b[_0x49bf79(0x1b9)],T['UniverLicensePlugin']),O(0x1,c['Inject'](c[_0x49bf79(0x16f)])),O(0x2,c[_0x49bf79(0x169)])],exports[_0x49bf79(0x173)]);
1
+ 'use strict';const _0x4d61ea=_0x2e49;(function(_0x157d3e,_0x365705){const _0xd56dc6=_0x2e49,_0x1794f2=_0x157d3e();while(!![]){try{const _0xb839fe=-parseInt(_0xd56dc6(0x1d6))/0x1*(parseInt(_0xd56dc6(0x170))/0x2)+-parseInt(_0xd56dc6(0x162))/0x3*(-parseInt(_0xd56dc6(0x1c3))/0x4)+parseInt(_0xd56dc6(0x1b3))/0x5+-parseInt(_0xd56dc6(0x18d))/0x6*(parseInt(_0xd56dc6(0x1a6))/0x7)+parseInt(_0xd56dc6(0x15b))/0x8*(-parseInt(_0xd56dc6(0x15f))/0x9)+-parseInt(_0xd56dc6(0x15d))/0xa+-parseInt(_0xd56dc6(0x1bd))/0xb*(-parseInt(_0xd56dc6(0x159))/0xc);if(_0xb839fe===_0x365705)break;else _0x1794f2['push'](_0x1794f2['shift']());}catch(_0x224b18){_0x1794f2['push'](_0x1794f2['shift']());}}}(_0xdb0e,0xa9ed4));Object[_0x4d61ea(0x1a5)](exports,Symbol['toStringTag'],{'value':'Module'});const b=require(_0x4d61ea(0x16b)),T=require(_0x4d61ea(0x17c)),c=require(_0x4d61ea(0x1b8)),j=require(_0x4d61ea(0x1cb)),M=require(_0x4d61ea(0x1ad)),w=require(_0x4d61ea(0x1c0)),P=require('@univerjs/network'),U=_0x4d61ea(0x1a0);var I=(_0x5545e3=>(_0x5545e3[_0x5545e3[_0x4d61ea(0x194)]=0x0]=_0x4d61ea(0x194),_0x5545e3[_0x5545e3[_0x4d61ea(0x19d)]=0x1]=_0x4d61ea(0x19d),_0x5545e3[_0x5545e3['UNRECOGNIZED']=-0x1]=_0x4d61ea(0x199),_0x5545e3))(I||{}),v=(_0x26ca19=>(_0x26ca19[_0x26ca19[_0x4d61ea(0x1c1)]=0x0]=_0x4d61ea(0x1c1),_0x26ca19[_0x26ca19[_0x4d61ea(0x173)]=0x1]=_0x4d61ea(0x173),_0x26ca19[_0x26ca19[_0x4d61ea(0x177)]=0x2]='Reply',_0x26ca19[_0x26ca19[_0x4d61ea(0x1bf)]=0x3]='Edit',_0x26ca19[_0x26ca19[_0x4d61ea(0x171)]=0x4]=_0x4d61ea(0x171),_0x26ca19[_0x26ca19[_0x4d61ea(0x183)]=0x5]=_0x4d61ea(0x183),_0x26ca19[_0x26ca19['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x26ca19))(v||{});const f=_0x1a8ca4=>c['dayjs'](new Date(+_0x1a8ca4))[_0x4d61ea(0x19b)](_0x4d61ea(0x1aa)),R=async(_0x4d1da8,_0x1e9bc7)=>{const _0x1346c6=_0x4d61ea,_0x15e786=_0x4d1da8[_0x1346c6(0x163)](c['UserManagerService']),_0x20fcff=_0x4d1da8['get'](P[_0x1346c6(0x193)]);_0x1e9bc7['forEach'](_0x556334=>{const _0x1e6083=_0x1346c6;_0x15e786[_0x1e6083(0x1b5)](_0x556334)&&_0x1e9bc7[_0x1e6083(0x169)](_0x556334);}),_0x1e9bc7[_0x1346c6(0x1af)]&&(await _0x20fcff['get'](_0x1346c6(0x186),{'params':{'userIDs':[..._0x1e9bc7]}}))[_0x1346c6(0x16e)][_0x1346c6(0x16d)][_0x1346c6(0x1cd)](_0x4d11a2=>{const _0x1febcb=_0x1346c6;_0x4d11a2&&_0x15e786[_0x1febcb(0x1ac)](_0x4d11a2);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x963b4e,_0x2891b3,_0x2a0fd3,_0x6298be)=>{const _0x799846=_0x4d61ea;for(var _0x137ecc=_0x6298be>0x1?void 0x0:_0x6298be?$(_0x2891b3,_0x2a0fd3):_0x2891b3,_0x13488e=_0x963b4e[_0x799846(0x17a)]-0x1,_0x57ce44;_0x13488e>=0x0;_0x13488e--)(_0x57ce44=_0x963b4e[_0x13488e])&&(_0x137ecc=_0x57ce44(_0x137ecc)||_0x137ecc);return _0x137ecc;},S=(_0x46e3a9,_0x326f46)=>(_0x4c8859,_0x333978)=>_0x326f46(_0x4c8859,_0x333978,_0x46e3a9);let p=class extends c[_0x4d61ea(0x16a)]{constructor(_0x3932e6,_0x35ef61,_0x3588d6,_0x30a6e7){const _0x5a144c=_0x4d61ea;super(),this['_commentService']=_0x3932e6,this[_0x5a144c(0x18f)]=_0x35ef61,this[_0x5a144c(0x15a)]=_0x3588d6,this[_0x5a144c(0x187)]=_0x30a6e7,this[_0x5a144c(0x1ca)](),this[_0x5a144c(0x18c)]();}[_0x4d61ea(0x18c)](){const _0x32087f=_0x4d61ea;this['disposeWithMe'](this[_0x32087f(0x18f)][_0x32087f(0x1c7)][_0x32087f(0x184)](w[_0x32087f(0x182)](0x10))[_0x32087f(0x18a)](_0x557404=>{const _0x4c7d31=_0x32087f,_0x18b244=new Set();_0x557404[_0x4c7d31(0x1cd)](_0x4ff918=>{const _0x556f70=_0x4c7d31;switch(_0x4ff918['type']){case _0x556f70(0x1b1):{const _0x1d474d=_0x4ff918[_0x556f70(0x1a2)][_0x556f70(0x19f)];_0x18b244[_0x556f70(0x1b1)](_0x1d474d);break;}}}),R(this['_injector'],_0x18b244);}));}[_0x4d61ea(0x1ca)](){const _0x369cea=_0x4d61ea;this['disposeWithMe'](this['_commentService'][_0x369cea(0x1c7)][_0x369cea(0x18a)](async _0x4dd8f7=>{const _0x481b17=_0x369cea;var _0xb49fea,_0x355171,_0x3b2b20,_0x440113;const _0x233fd4=(_0xb49fea=this[_0x481b17(0x18f)][_0x481b17(0x1b0)](_0x4dd8f7['unitId'])[_0x481b17(0x168)](_0x5c12aa=>_0x5c12aa[_0x481b17(0x189)]===_0x4dd8f7[_0x481b17(0x189)]))==null?void 0x0:_0xb49fea[_0x481b17(0x19e)];if(!_0x233fd4)return;const {unitId:_0x9a425c,subUnitId:_0x1f8c65}=_0x233fd4;switch(_0x4dd8f7[_0x481b17(0x198)]&&this[_0x481b17(0x15a)]['addUser'](_0x4dd8f7['user']),_0x4dd8f7['type']){case v[_0x481b17(0x173)]:break;case v[_0x481b17(0x177)]:{this[_0x481b17(0x18f)][_0x481b17(0x1ab)](_0x9a425c,_0x1f8c65,{'unitId':_0x9a425c,'subUnitId':_0x1f8c65,'ref':'','id':_0x4dd8f7[_0x481b17(0x1a3)],'dT':f(+_0x4dd8f7['createTimestamp']),'threadId':_0x4dd8f7['threadId'],'personId':(_0x3b2b20=(_0x355171=_0x4dd8f7[_0x481b17(0x198)])==null?void 0x0:_0x355171[_0x481b17(0x17d)])!=null?_0x3b2b20:_0x4dd8f7[_0x481b17(0x1be)],'text':JSON[_0x481b17(0x166)](_0x4dd8f7[_0x481b17(0x1cc)]),'parentId':_0x233fd4['id']});break;}case v[_0x481b17(0x171)]:{const _0x47064f=this['_threadCommentModel'][_0x481b17(0x17e)](_0x9a425c,_0x1f8c65,_0x4dd8f7[_0x481b17(0x1a3)]);_0x47064f&&_0x47064f[_0x481b17(0x19c)]&&this[_0x481b17(0x18f)][_0x481b17(0x158)](_0x9a425c,_0x1f8c65,_0x4dd8f7['replyId']);break;}case v[_0x481b17(0x1bf)]:{this[_0x481b17(0x18f)][_0x481b17(0x164)](_0x9a425c,_0x1f8c65,{'commentId':_0x4dd8f7[_0x481b17(0x1a3)],'text':JSON[_0x481b17(0x166)](_0x4dd8f7[_0x481b17(0x1cc)])});break;}case v[_0x481b17(0x183)]:{const _0x562d7b=(_0x440113=this[_0x481b17(0x18f)][_0x481b17(0x1b0)](_0x4dd8f7[_0x481b17(0x18b)])[_0x481b17(0x168)](_0xfeeea4=>_0xfeeea4[_0x481b17(0x189)]===_0x4dd8f7['threadId']))==null?void 0x0:_0x440113['root'];_0x562d7b&&this[_0x481b17(0x18f)][_0x481b17(0x19a)](_0x9a425c,_0x1f8c65,_0x562d7b['id'],_0x4dd8f7[_0x481b17(0x176)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x4d61ea(0x1a7)](b[_0x4d61ea(0x1c2)])),S(0x1,c[_0x4d61ea(0x1a7)](M[_0x4d61ea(0x175)])),S(0x2,c[_0x4d61ea(0x1a7)](c[_0x4d61ea(0x174)])),S(0x3,c['Inject'](c['Injector']))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x4d61ea(0x167)],x=(_0x238d24,_0x4060e2,_0x529dfe,_0x40778c)=>{for(var _0x25db71=_0x40778c>0x1?void 0x0:_0x40778c?A(_0x4060e2,_0x529dfe):_0x4060e2,_0x2ca530=_0x238d24['length']-0x1,_0xa8313f;_0x2ca530>=0x0;_0x2ca530--)(_0xa8313f=_0x238d24[_0x2ca530])&&(_0x25db71=_0xa8313f(_0x25db71)||_0x25db71);return _0x25db71;},_=(_0x52f8e4,_0x2f2b20)=>(_0x2ccc77,_0x494ac1)=>_0x2f2b20(_0x2ccc77,_0x494ac1,_0x52f8e4);function Y(_0x3c0130,_0x4dbed2){const _0x5075e4=_0x4d61ea,_0x35d81a=_0x3c0130[_0x5075e4(0x160)][0x0];return{..._0x4dbed2,'id':_0x35d81a['replyId'],'resolved':_0x3c0130[_0x5075e4(0x176)]===0x1,'dT':f(_0x35d81a['createTimestamp']),'personId':_0x35d81a['userId'],'threadId':_0x35d81a[_0x5075e4(0x189)]};}function G(_0x2fe89b,_0x54834a,_0x37389c){const _0x16c38f=_0x4d61ea;var _0x54ea22,_0x5ba73a;if(((_0x5ba73a=(_0x54ea22=_0x2fe89b==null?void 0x0:_0x2fe89b[_0x16c38f(0x160)])==null?void 0x0:_0x54ea22[_0x16c38f(0x17a)])!=null?_0x5ba73a:0x0)>0x0){const _0x43b077=(_0x4c5592,_0x59e98f)=>({'id':_0x4c5592[_0x16c38f(0x1a3)],'threadId':_0x4c5592[_0x16c38f(0x189)],'dT':f(_0x4c5592['createTimestamp']),'personId':_0x4c5592['userId'],'resolved':_0x2fe89b['solved']===I[_0x16c38f(0x19d)],'unitId':_0x54834a,'subUnitId':_0x37389c,'text':JSON['parse'](_0x4c5592[_0x16c38f(0x1cc)]),'parentId':_0x59e98f}),_0x54aae1=_0x43b077(_0x2fe89b['replies'][0x0]);return{..._0x54aae1,'children':_0x2fe89b[_0x16c38f(0x160)][_0x16c38f(0x1d3)](0x1)[_0x16c38f(0x1a8)](_0x582a65=>_0x43b077(_0x582a65,_0x54aae1['id']))};}return null;}function _0xdb0e(){const _0x344a94=['/list','users','body','filter','1494NSZBrZ','Delete','_initDataSource','Add','UserManagerService','ThreadCommentModel','solved','Reply','onReady','customRanges','length','/reply','@univerjs-pro/license','userID','getComment','_configService','/delete','rangeId','bufferTime','Solve','pipe','UniverInstanceType','/universer-api/user/list','_injector','comments','threadId','subscribe','unitId','_initUserSync','3522LQPOIE','post','_threadCommentModel','CustomRangeType','_threadCommentDataSourceService','error','HTTPService','OpenOrReOpen','comment','Plugin','_httpService','user','UNRECOGNIZED','resolveComment','format','parentId','Solved','root','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/solved','payload','replyId','/universer-api/comment/unit/','defineProperty','12817rClemy','Inject','map','reply','YYYY/MM/DD\x20HH:mm','addComment','addUser','@univerjs/thread-comment','saveCommentToSnapshot','size','getUnit','add','getCurrentUser','472860hhKsao','UNIVER_UNKNOWN','getUser','Injector','getMemberID','@univerjs/core','_sessionService','_config','/add','listComments','140459RhNjnI','userId','Edit','rxjs','Unknown','CommentService','1778380SpdQcq','setConfig','dataSource','COMMENT','commentUpdate$','values','UniverThreadCommentDataSourcePlugin','_init','@univerjs/thread-comment-ui','content','forEach','_threadCommentDataSource','UniverCollaborationClientPlugin','UniverLicensePlugin','code','rangeType','slice','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','1015CZvLXo','/edit','deleteComment','3624lziQQL','_userService','30584JrmunR','merge','12508800CqVERV','stringify','1449mzKKzV','replies','syncUpdateMutationToColla','3jtIhEw','get','updateComment','requireSession','parse','getOwnPropertyDescriptor','find','delete','Disposable','@univerjs-pro/collaboration-client'];_0xdb0e=function(){return _0x344a94;};return _0xdb0e();}let g=class{constructor(_0x51a264,_0x53bf6f,_0x4073b0,_0x4e853d){const _0x5df4f3=_0x4d61ea;this[_0x5df4f3(0x197)]=_0x51a264,this[_0x5df4f3(0x15a)]=_0x53bf6f,this[_0x5df4f3(0x1b9)]=_0x4073b0,this[_0x5df4f3(0x187)]=_0x4e853d;}async['addComment'](_0x449c4a){const _0x5ced02=_0x4d61ea;var _0x6b56f,_0x1cda5b;const {parentId:_0x2e3858,unitId:_0xc0d506,text:_0x36e3a8,threadId:_0x4a27ce}=_0x449c4a,_0x316050=(_0x1cda5b=(_0x6b56f=_0x36e3a8['customRanges'])==null?void 0x0:_0x6b56f[_0x5ced02(0x16f)](_0x3711cc=>_0x3711cc[_0x5ced02(0x1d2)]===c[_0x5ced02(0x190)][_0x5ced02(0x1c6)])[_0x5ced02(0x1a8)](_0x4e0318=>_0x4e0318[_0x5ced02(0x181)]))!=null?_0x1cda5b:[],_0x2f99c6=JSON[_0x5ced02(0x15e)](_0x36e3a8),_0x1a4333=(await this[_0x5ced02(0x1b9)][_0x5ced02(0x165)](_0xc0d506))[_0x5ced02(0x1b7)]();if(_0x2e3858){const _0x5bf3bd={'memberId':_0x1a4333,'unitId':_0xc0d506,'content':_0x2f99c6,'mention':_0x316050,'threadId':_0x4a27ce},_0x546436=(await this['_httpService']['post'](_0x5ced02(0x1a4)+_0xc0d506+_0x5ced02(0x17b),{'body':_0x5bf3bd}))['body'][_0x5ced02(0x1a9)];return{..._0x449c4a,'id':_0x546436[_0x5ced02(0x1a3)],'dT':c['dayjs'](+_0x546436['createTimestamp'])['format'](_0x5ced02(0x1aa)),'personId':_0x546436[_0x5ced02(0x1be)]};}else{const _0x6070d={'memberId':_0x1a4333,'unitId':_0xc0d506,'content':_0x2f99c6,'mention':_0x316050},_0x815b56=await this['_httpService']['post']('/universer-api/comment/unit/'+_0xc0d506+_0x5ced02(0x1bb),{'body':_0x6070d});return Y(_0x815b56['body'][_0x5ced02(0x195)],_0x449c4a);}}async[_0x4d61ea(0x164)](_0x23cc12){const _0x157b06=_0x4d61ea;var _0x5156d6,_0x3c8299;const {text:_0x4df7a4,unitId:_0x132e6c}=_0x23cc12,_0xe8e35d=(_0x3c8299=(_0x5156d6=_0x4df7a4[_0x157b06(0x179)])==null?void 0x0:_0x5156d6[_0x157b06(0x16f)](_0x2f09f1=>_0x2f09f1[_0x157b06(0x1d2)]===c[_0x157b06(0x190)][_0x157b06(0x1c6)])['map'](_0x263bc1=>_0x263bc1[_0x157b06(0x181)]))!=null?_0x3c8299:[],_0x259477=JSON[_0x157b06(0x15e)](_0x4df7a4),_0x58764b=_0x23cc12['threadId'],_0x402de5=_0x23cc12['id'],_0x5442d8={'memberId':(await this[_0x157b06(0x1b9)][_0x157b06(0x165)](_0x132e6c))[_0x157b06(0x1b7)](),'unitId':_0x132e6c,'threadId':_0x58764b,'mention':_0xe8e35d,'content':_0x259477,'replyId':_0x402de5},_0x44c1fb=await this['_httpService'][_0x157b06(0x18e)](_0x157b06(0x1a4)+_0x132e6c+_0x157b06(0x157),{'body':_0x5442d8});return!_0x44c1fb[_0x157b06(0x16e)][_0x157b06(0x192)]||_0x44c1fb[_0x157b06(0x16e)][_0x157b06(0x192)][_0x157b06(0x1d1)]===0x1;}async['resolveComment'](_0x9d4239){const _0x21994f=_0x4d61ea,{unitId:_0x2f4410}=_0x9d4239,_0x12ffc5=_0x9d4239['threadId'],_0x495494={'memberId':this['_userService'][_0x21994f(0x1b2)]()[_0x21994f(0x17d)],'unitId':_0x2f4410,'threadId':_0x12ffc5,'solved':_0x9d4239['resolved']?I[_0x21994f(0x19d)]:I[_0x21994f(0x194)]},_0x18f79d=await this[_0x21994f(0x197)]['post'](_0x21994f(0x1a4)+_0x2f4410+_0x21994f(0x1a1),{'body':_0x495494});return!_0x18f79d[_0x21994f(0x16e)][_0x21994f(0x192)]||_0x18f79d[_0x21994f(0x16e)]['error'][_0x21994f(0x1d1)]===0x1;}async['deleteComment'](_0x50abf5,_0x1c873a,_0x39619c,_0x129540){const _0x47023f=_0x4d61ea,_0x5cab93={'memberId':(await this['_sessionService'][_0x47023f(0x165)](_0x50abf5))[_0x47023f(0x1b7)](),'threadId':_0x39619c,'replyId':_0x129540,'unitId':_0x50abf5},_0x20a019=await this[_0x47023f(0x197)][_0x47023f(0x18e)](_0x47023f(0x1a4)+_0x50abf5+_0x47023f(0x180),{'body':_0x5cab93});return!_0x20a019['body'][_0x47023f(0x192)]||_0x20a019[_0x47023f(0x16e)][_0x47023f(0x192)][_0x47023f(0x1d1)]===0x1;}async[_0x4d61ea(0x1bc)](_0x1264ed,_0x20556d,_0x4ff77c){const _0x46dbbe=_0x4d61ea,_0x3a26d3={'unitId':_0x1264ed,'threadId':_0x4ff77c},_0x593408=await this[_0x46dbbe(0x197)]['post']('/universer-api/comment/unit/'+_0x1264ed+_0x46dbbe(0x16c),{'body':_0x3a26d3}),_0x1ee117=_0x4ff77c['map'](_0x34221b=>G(_0x593408[_0x46dbbe(0x16e)][_0x46dbbe(0x188)][_0x34221b],_0x1264ed,_0x20556d))[_0x46dbbe(0x16f)](Boolean);return Object[_0x46dbbe(0x1c8)](_0x593408[_0x46dbbe(0x16e)][_0x46dbbe(0x16d)])[_0x46dbbe(0x1cd)](_0x5a92dd=>{const _0x379ee8=_0x46dbbe;this[_0x379ee8(0x15a)][_0x379ee8(0x1ac)](_0x5a92dd);}),_0x1ee117;}[_0x4d61ea(0x1ae)](_0x51d523){const _0x3b6069=_0x4d61ea;return{'id':_0x51d523['id'],'threadId':_0x51d523[_0x3b6069(0x189)],'ref':_0x51d523['ref']};}};function _0x2e49(_0xbd4e82,_0x49ef84){const _0xdb0ef6=_0xdb0e();return _0x2e49=function(_0x2e49a6,_0x3a36ce){_0x2e49a6=_0x2e49a6-0x157;let _0x517b6d=_0xdb0ef6[_0x2e49a6];return _0x517b6d;},_0x2e49(_0xbd4e82,_0x49ef84);}g=x([_(0x0,c[_0x4d61ea(0x1a7)](P[_0x4d61ea(0x193)])),_(0x1,c[_0x4d61ea(0x1a7)](c['UserManagerService'])),_(0x2,c[_0x4d61ea(0x1a7)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x4d61ea(0x1b6)]))],g);var H=Object[_0x4d61ea(0x167)],J=(_0x3bdfaf,_0x1d6c43,_0x4e57fa,_0x30e816)=>{const _0x2ee5e3=_0x4d61ea;for(var _0x7e74b1=_0x30e816>0x1?void 0x0:_0x30e816?H(_0x1d6c43,_0x4e57fa):_0x1d6c43,_0x560997=_0x3bdfaf[_0x2ee5e3(0x17a)]-0x1,_0x3eed2b;_0x560997>=0x0;_0x560997--)(_0x3eed2b=_0x3bdfaf[_0x560997])&&(_0x7e74b1=_0x3eed2b(_0x7e74b1)||_0x7e74b1);return _0x7e74b1;},y=(_0x51d574,_0x453bee)=>(_0x8cbe5c,_0x416401)=>_0x453bee(_0x8cbe5c,_0x416401,_0x51d574);let C=class extends c[_0x4d61ea(0x16a)]{constructor(_0x33b8d5,_0x5e68b0){const _0x27ac77=_0x4d61ea;super(),this[_0x27ac77(0x191)]=_0x33b8d5,this['_threadCommentDataSource']=_0x5e68b0,this[_0x27ac77(0x172)]();}[_0x4d61ea(0x172)](){const _0x382c7c=_0x4d61ea;this[_0x382c7c(0x191)][_0x382c7c(0x1c5)]=this[_0x382c7c(0x1ce)],this[_0x382c7c(0x191)][_0x382c7c(0x161)]=!0x1;}};C=J([y(0x0,M[_0x4d61ea(0x1d4)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x4d61ea(0x1a5)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1d4008,_0x4383e3,_0x1a588a)=>_0x4383e3 in _0x1d4008?F(_0x1d4008,_0x4383e3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1a588a}):_0x1d4008[_0x4383e3]=_0x1a588a,W=(_0x36e12b,_0x42be48,_0x2314ee,_0x100f01)=>{const _0x103e7a=_0x4d61ea;for(var _0x52b844=_0x100f01>0x1?void 0x0:_0x100f01?L(_0x42be48,_0x2314ee):_0x42be48,_0x26d586=_0x36e12b[_0x103e7a(0x17a)]-0x1,_0x5c3b3a;_0x26d586>=0x0;_0x26d586--)(_0x5c3b3a=_0x36e12b[_0x26d586])&&(_0x52b844=_0x5c3b3a(_0x52b844)||_0x52b844);return _0x52b844;},O=(_0x51aa00,_0x4fa26b)=>(_0x5cf118,_0x26e6e2)=>_0x4fa26b(_0x5cf118,_0x26e6e2,_0x51aa00),N=(_0xe5bfd5,_0xd48f9c,_0x14df34)=>Z(_0xe5bfd5,typeof _0xd48f9c!='symbol'?_0xd48f9c+'':_0xd48f9c,_0x14df34);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x4d61ea(0x196)]{constructor(_0x386a5f=D,_0x53c8d6,_0x585a59){const _0x241d30=_0x4d61ea;super(),this['_config']=_0x386a5f,this['_injector']=_0x53c8d6,this[_0x241d30(0x17f)]=_0x585a59;const {..._0x2dc94e}=c[_0x241d30(0x15c)]({},D,this[_0x241d30(0x1ba)]);this[_0x241d30(0x17f)][_0x241d30(0x1c4)](q,_0x2dc94e);}['onStarting'](){const _0x4ec6b8=_0x4d61ea;[[g],[C],[p]][_0x4ec6b8(0x1cd)](_0x46ccce=>{const _0x49bcbc=_0x4ec6b8;this[_0x49bcbc(0x187)]['add'](_0x46ccce);});}[_0x4d61ea(0x178)](){const _0x546ba1=_0x4d61ea;this['_injector'][_0x546ba1(0x163)](C),this['_injector']['get'](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0x4d61ea(0x185)][_0x4d61ea(0x1b4)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x4d61ea(0x1d5)],b[_0x4d61ea(0x1cf)],T[_0x4d61ea(0x1d0)]),O(0x1,c[_0x4d61ea(0x1a7)](c[_0x4d61ea(0x1b6)])),O(0x2,c['IConfigService'])],exports[_0x4d61ea(0x1c9)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x15a028=_0x6018;(function(_0x344545,_0x54bf3c){const _0x5091a7=_0x6018,_0x3c2b54=_0x344545();while(!![]){try{const _0x109cc9=-parseInt(_0x5091a7(0x1e8))/0x1*(-parseInt(_0x5091a7(0x203))/0x2)+-parseInt(_0x5091a7(0x24e))/0x3*(-parseInt(_0x5091a7(0x1ed))/0x4)+parseInt(_0x5091a7(0x1ef))/0x5+parseInt(_0x5091a7(0x1ff))/0x6+-parseInt(_0x5091a7(0x234))/0x7+parseInt(_0x5091a7(0x21e))/0x8*(parseInt(_0x5091a7(0x1fd))/0x9)+-parseInt(_0x5091a7(0x1fb))/0xa;if(_0x109cc9===_0x54bf3c)break;else _0x3c2b54['push'](_0x3c2b54['shift']());}catch(_0x3da37d){_0x3c2b54['push'](_0x3c2b54['shift']());}}}(_0x3d91,0xccfa3));import{CommentService as _0x253c4f,CollaborationSessionService as _0x8a85c4,UniverCollaborationClientPlugin as _0x267342}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1782a3}from'@univerjs-pro/license';import{dayjs as _0x35743c,UserManagerService as _0x1f607e,Inject as _0x5cfd2a,Injector as _0x4e2d06,Disposable as _0x4ffcbe,CustomRangeType as _0xe13e7a,UniverInstanceType as _0x4632e5,DependentOn as _0x3b7993,IConfigService as _0x58de89,Plugin as _0x46fc63,merge as _0x5609b0}from'@univerjs/core';function _0x6018(_0x1bc6fa,_0x1311fc){const _0x3d917a=_0x3d91();return _0x6018=function(_0x6018a5,_0x5eff06){_0x6018a5=_0x6018a5-0x1e8;let _0x1b0f32=_0x3d917a[_0x6018a5];return _0x1b0f32;},_0x6018(_0x1bc6fa,_0x1311fc);}import{UniverThreadCommentUIPlugin as _0x3dd618}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48a5cd,IThreadCommentDataSourceService as _0x34f453}from'@univerjs/thread-comment';import{bufferTime as _0x4ff96d}from'rxjs';import{HTTPService as _0xeb8e79}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x532dc6=>(_0x532dc6[_0x532dc6[_0x15a028(0x232)]=0x0]=_0x15a028(0x232),_0x532dc6[_0x532dc6[_0x15a028(0x241)]=0x1]=_0x15a028(0x241),_0x532dc6[_0x532dc6[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x532dc6))(I||{}),v=(_0x50ff93=>(_0x50ff93[_0x50ff93['Unknown']=0x0]=_0x15a028(0x1f7),_0x50ff93[_0x50ff93[_0x15a028(0x247)]=0x1]='Add',_0x50ff93[_0x50ff93[_0x15a028(0x218)]=0x2]=_0x15a028(0x218),_0x50ff93[_0x50ff93[_0x15a028(0x23b)]=0x3]=_0x15a028(0x23b),_0x50ff93[_0x50ff93['Delete']=0x4]='Delete',_0x50ff93[_0x50ff93[_0x15a028(0x204)]=0x5]=_0x15a028(0x204),_0x50ff93[_0x50ff93[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x50ff93))(v||{});const D=_0x122c5b=>_0x35743c(new Date(+_0x122c5b))[_0x15a028(0x1f0)](_0x15a028(0x208)),B=async(_0x37953a,_0x25e775)=>{const _0x139966=_0x15a028,_0x428f4c=_0x37953a[_0x139966(0x222)](_0x1f607e),_0x1dc018=_0x37953a[_0x139966(0x222)](_0xeb8e79);_0x25e775[_0x139966(0x20e)](_0x5b11fe=>{const _0x4a3b7b=_0x139966;_0x428f4c[_0x4a3b7b(0x23d)](_0x5b11fe)&&_0x25e775[_0x4a3b7b(0x242)](_0x5b11fe);}),_0x25e775[_0x139966(0x24d)]&&(await _0x1dc018['get'](_0x139966(0x231),{'params':{'userIDs':[..._0x25e775]}}))[_0x139966(0x220)][_0x139966(0x244)][_0x139966(0x20e)](_0x257f4d=>{const _0x1d2422=_0x139966;_0x257f4d&&_0x428f4c[_0x1d2422(0x239)](_0x257f4d);});};var K=Object[_0x15a028(0x214)],V=(_0x134347,_0x3af775,_0x2bc25b,_0x45798d)=>{for(var _0x47ea62=_0x45798d>0x1?void 0x0:_0x45798d?K(_0x3af775,_0x2bc25b):_0x3af775,_0x1dd33e=_0x134347['length']-0x1,_0x35c777;_0x1dd33e>=0x0;_0x1dd33e--)(_0x35c777=_0x134347[_0x1dd33e])&&(_0x47ea62=_0x35c777(_0x47ea62)||_0x47ea62);return _0x47ea62;},p=(_0x494ebc,_0x526f45)=>(_0x2ac6f2,_0x3c4ff4)=>_0x526f45(_0x2ac6f2,_0x3c4ff4,_0x494ebc);let S=class extends _0x4ffcbe{constructor(_0x452dcd,_0x4e478b,_0x24a489,_0x4f790c){const _0x260497=_0x15a028;super(),this[_0x260497(0x24a)]=_0x452dcd,this[_0x260497(0x205)]=_0x4e478b,this[_0x260497(0x1f6)]=_0x24a489,this[_0x260497(0x206)]=_0x4f790c,this[_0x260497(0x20b)](),this[_0x260497(0x22d)]();}[_0x15a028(0x22d)](){const _0xb98b1f=_0x15a028;this[_0xb98b1f(0x20a)](this['_threadCommentModel'][_0xb98b1f(0x211)]['pipe'](_0x4ff96d(0x10))[_0xb98b1f(0x1e9)](_0x319130=>{const _0x5b53a8=_0xb98b1f,_0x14fbde=new Set();_0x319130['forEach'](_0x4c6202=>{const _0x4a39e3=_0x6018;switch(_0x4c6202[_0x4a39e3(0x229)]){case'add':{const _0x2bf500=_0x4c6202['payload']['personId'];_0x14fbde[_0x4a39e3(0x20c)](_0x2bf500);break;}}}),B(this[_0x5b53a8(0x206)],_0x14fbde);}));}[_0x15a028(0x20b)](){const _0x1db84e=_0x15a028;this[_0x1db84e(0x20a)](this['_commentService'][_0x1db84e(0x211)][_0x1db84e(0x1e9)](async _0x21a53e=>{const _0x4f62eb=_0x1db84e;var _0x4094ea,_0x4359e3,_0x24c7e1,_0x47c369;const _0x558fdc=(_0x4094ea=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])[_0x4f62eb(0x219)](_0xab5002=>_0xab5002[_0x4f62eb(0x236)]===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x4094ea['root'];if(!_0x558fdc)return;const {unitId:_0x3223c3,subUnitId:_0x38affb}=_0x558fdc;switch(_0x21a53e[_0x4f62eb(0x1f4)]&&this[_0x4f62eb(0x1f6)][_0x4f62eb(0x239)](_0x21a53e['user']),_0x21a53e['type']){case v[_0x4f62eb(0x247)]:break;case v[_0x4f62eb(0x218)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x21c)](_0x3223c3,_0x38affb,{'unitId':_0x3223c3,'subUnitId':_0x38affb,'ref':'','id':_0x21a53e[_0x4f62eb(0x1f9)],'dT':D(+_0x21a53e[_0x4f62eb(0x243)]),'threadId':_0x21a53e['threadId'],'personId':(_0x24c7e1=(_0x4359e3=_0x21a53e[_0x4f62eb(0x1f4)])==null?void 0x0:_0x4359e3[_0x4f62eb(0x21d)])!=null?_0x24c7e1:_0x21a53e[_0x4f62eb(0x1fa)],'text':JSON[_0x4f62eb(0x22e)](_0x21a53e[_0x4f62eb(0x215)]),'parentId':_0x558fdc['id']});break;}case v[_0x4f62eb(0x233)]:{const _0x1768b8=this[_0x4f62eb(0x205)][_0x4f62eb(0x207)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);_0x1768b8&&_0x1768b8['parentId']&&this[_0x4f62eb(0x205)][_0x4f62eb(0x23e)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);break;}case v[_0x4f62eb(0x23b)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x23f)](_0x3223c3,_0x38affb,{'commentId':_0x21a53e[_0x4f62eb(0x1f9)],'text':JSON['parse'](_0x21a53e[_0x4f62eb(0x215)])});break;}case v[_0x4f62eb(0x204)]:{const _0x262cca=(_0x47c369=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])['find'](_0x210123=>_0x210123['threadId']===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x47c369[_0x4f62eb(0x210)];_0x262cca&&this[_0x4f62eb(0x205)][_0x4f62eb(0x22f)](_0x3223c3,_0x38affb,_0x262cca['id'],_0x21a53e['solved']===I[_0x4f62eb(0x241)]);break;}}}));}};S=V([p(0x0,_0x5cfd2a(_0x253c4f)),p(0x1,_0x5cfd2a(_0x48a5cd)),p(0x2,_0x5cfd2a(_0x1f607e)),p(0x3,_0x5cfd2a(_0x4e2d06))],S);const z=_0x15a028(0x235),M={};var k=Object[_0x15a028(0x214)],Q=(_0x2dc919,_0x595483,_0x31b92e,_0x39ee5d)=>{const _0xa8dd0b=_0x15a028;for(var _0x37271b=_0x39ee5d>0x1?void 0x0:_0x39ee5d?k(_0x595483,_0x31b92e):_0x595483,_0x5dd6fe=_0x2dc919[_0xa8dd0b(0x227)]-0x1,_0x2623ad;_0x5dd6fe>=0x0;_0x5dd6fe--)(_0x2623ad=_0x2dc919[_0x5dd6fe])&&(_0x37271b=_0x2623ad(_0x37271b)||_0x37271b);return _0x37271b;},_=(_0x1a1b32,_0x45abf3)=>(_0x5d4e69,_0x58729a)=>_0x45abf3(_0x5d4e69,_0x58729a,_0x1a1b32);function X(_0x2471bc,_0xa5d22e){const _0x3cd42b=_0x15a028,_0x571d38=_0x2471bc[_0x3cd42b(0x1f5)][0x0];return{..._0xa5d22e,'id':_0x571d38[_0x3cd42b(0x1f9)],'resolved':_0x2471bc[_0x3cd42b(0x20d)]===0x1,'dT':D(_0x571d38[_0x3cd42b(0x243)]),'personId':_0x571d38[_0x3cd42b(0x1fa)],'threadId':_0x571d38[_0x3cd42b(0x236)]};}function ee(_0x3d672b,_0x29dee3,_0x281431){const _0xfa2551=_0x15a028;var _0x29f862,_0x5a473d;if(((_0x5a473d=(_0x29f862=_0x3d672b==null?void 0x0:_0x3d672b[_0xfa2551(0x1f5)])==null?void 0x0:_0x29f862[_0xfa2551(0x227)])!=null?_0x5a473d:0x0)>0x0){const _0x33acaa=(_0x5f3be4,_0x501372)=>({'id':_0x5f3be4[_0xfa2551(0x1f9)],'threadId':_0x5f3be4[_0xfa2551(0x236)],'dT':D(_0x5f3be4['createTimestamp']),'personId':_0x5f3be4[_0xfa2551(0x1fa)],'resolved':_0x3d672b[_0xfa2551(0x20d)]===I[_0xfa2551(0x241)],'unitId':_0x29dee3,'subUnitId':_0x281431,'text':JSON[_0xfa2551(0x22e)](_0x5f3be4[_0xfa2551(0x215)]),'parentId':_0x501372}),_0x2593e7=_0x33acaa(_0x3d672b[_0xfa2551(0x1f5)][0x0]);return{..._0x2593e7,'children':_0x3d672b[_0xfa2551(0x1f5)]['slice'](0x1)[_0xfa2551(0x230)](_0x15c981=>_0x33acaa(_0x15c981,_0x2593e7['id']))};}return null;}let f=class{constructor(_0x46a7b0,_0x4cf54d,_0x4d1150,_0x3e173f){const _0x1096e3=_0x15a028;this['_httpService']=_0x46a7b0,this[_0x1096e3(0x1f6)]=_0x4cf54d,this[_0x1096e3(0x225)]=_0x4d1150,this['_injector']=_0x3e173f;}async[_0x15a028(0x21c)](_0x1e62d1){const _0x2bc2a2=_0x15a028;var _0x4a6d9c,_0x58cd3f;const {parentId:_0x56762d,unitId:_0x3d17cd,text:_0x32e94d,threadId:_0x1b8ef0}=_0x1e62d1,_0x275e47=(_0x58cd3f=(_0x4a6d9c=_0x32e94d[_0x2bc2a2(0x216)])==null?void 0x0:_0x4a6d9c[_0x2bc2a2(0x202)](_0x142278=>_0x142278[_0x2bc2a2(0x238)]===_0xe13e7a[_0x2bc2a2(0x248)])[_0x2bc2a2(0x230)](_0xbe00bd=>_0xbe00bd[_0x2bc2a2(0x249)]))!=null?_0x58cd3f:[],_0x470e43=JSON[_0x2bc2a2(0x23a)](_0x32e94d),_0x4cdfa5=(await this[_0x2bc2a2(0x225)][_0x2bc2a2(0x228)](_0x3d17cd))['getMemberID']();if(_0x56762d){const _0x5c4a95={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47,'threadId':_0x1b8ef0},_0x162044=(await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)]('/universer-api/comment/unit/'+_0x3d17cd+_0x2bc2a2(0x201),{'body':_0x5c4a95}))[_0x2bc2a2(0x220)][_0x2bc2a2(0x1fe)];return{..._0x1e62d1,'id':_0x162044[_0x2bc2a2(0x1f9)],'dT':_0x35743c(+_0x162044[_0x2bc2a2(0x243)])['format'](_0x2bc2a2(0x208)),'personId':_0x162044[_0x2bc2a2(0x1fa)]};}else{const _0x3e9f6d={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47},_0x40cf21=await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)](_0x2bc2a2(0x246)+_0x3d17cd+'/add',{'body':_0x3e9f6d});return X(_0x40cf21['body'][_0x2bc2a2(0x212)],_0x1e62d1);}}async['updateComment'](_0x1540be){const _0x506d55=_0x15a028;var _0xd41fd8,_0x30ed62;const {text:_0xd55881,unitId:_0x42ed27}=_0x1540be,_0x3c9b3e=(_0x30ed62=(_0xd41fd8=_0xd55881[_0x506d55(0x216)])==null?void 0x0:_0xd41fd8[_0x506d55(0x202)](_0x143cba=>_0x143cba[_0x506d55(0x238)]===_0xe13e7a[_0x506d55(0x248)])[_0x506d55(0x230)](_0x155e31=>_0x155e31['rangeId']))!=null?_0x30ed62:[],_0x5ef6ef=JSON['stringify'](_0xd55881),_0x5b6e85=_0x1540be[_0x506d55(0x236)],_0x247a28=_0x1540be['id'],_0x3ce71c={'memberId':(await this[_0x506d55(0x225)][_0x506d55(0x228)](_0x42ed27))['getMemberID'](),'unitId':_0x42ed27,'threadId':_0x5b6e85,'mention':_0x3c9b3e,'content':_0x5ef6ef,'replyId':_0x247a28},_0x3ee3b1=await this[_0x506d55(0x1ee)][_0x506d55(0x1eb)]('/universer-api/comment/unit/'+_0x42ed27+_0x506d55(0x209),{'body':_0x3ce71c});return!_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)]||_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)][_0x506d55(0x24b)]===0x1;}async[_0x15a028(0x22f)](_0x47e431){const _0x1bac14=_0x15a028,{unitId:_0x349677}=_0x47e431,_0x35a8cd=_0x47e431['threadId'],_0xf401f6={'memberId':this[_0x1bac14(0x1f6)][_0x1bac14(0x20f)]()[_0x1bac14(0x21d)],'unitId':_0x349677,'threadId':_0x35a8cd,'solved':_0x47e431[_0x1bac14(0x22a)]?I[_0x1bac14(0x241)]:I[_0x1bac14(0x232)]},_0x10ede0=await this['_httpService'][_0x1bac14(0x1eb)](_0x1bac14(0x246)+_0x349677+_0x1bac14(0x240),{'body':_0xf401f6});return!_0x10ede0[_0x1bac14(0x220)][_0x1bac14(0x217)]||_0x10ede0['body'][_0x1bac14(0x217)]['code']===0x1;}async[_0x15a028(0x23e)](_0x13b291,_0x547e19,_0x24df7a,_0x505396){const _0x34822c=_0x15a028,_0x2bd46c={'memberId':(await this['_sessionService'][_0x34822c(0x228)](_0x13b291))[_0x34822c(0x24c)](),'threadId':_0x24df7a,'replyId':_0x505396,'unitId':_0x13b291},_0x18983b=await this['_httpService'][_0x34822c(0x1eb)](_0x34822c(0x246)+_0x13b291+_0x34822c(0x1f3),{'body':_0x2bd46c});return!_0x18983b['body'][_0x34822c(0x217)]||_0x18983b['body'][_0x34822c(0x217)][_0x34822c(0x24b)]===0x1;}async[_0x15a028(0x21b)](_0x4fb704,_0x55465e,_0x4e6b7d){const _0x44e10c=_0x15a028,_0x451e1f={'unitId':_0x4fb704,'threadId':_0x4e6b7d},_0xaae836=await this[_0x44e10c(0x1ee)][_0x44e10c(0x1eb)](_0x44e10c(0x246)+_0x4fb704+_0x44e10c(0x213),{'body':_0x451e1f}),_0x599682=_0x4e6b7d[_0x44e10c(0x230)](_0x2f8663=>ee(_0xaae836['body'][_0x44e10c(0x226)][_0x2f8663],_0x4fb704,_0x55465e))[_0x44e10c(0x202)](Boolean);return Object[_0x44e10c(0x245)](_0xaae836[_0x44e10c(0x220)][_0x44e10c(0x244)])[_0x44e10c(0x20e)](_0x39fce7=>{const _0x4a95bf=_0x44e10c;this['_userService'][_0x4a95bf(0x239)](_0x39fce7);}),_0x599682;}[_0x15a028(0x1f1)](_0x136eea){const _0x49a926=_0x15a028;return{'id':_0x136eea['id'],'threadId':_0x136eea[_0x49a926(0x236)],'ref':_0x136eea[_0x49a926(0x22c)]};}};f=Q([_(0x0,_0x5cfd2a(_0xeb8e79)),_(0x1,_0x5cfd2a(_0x1f607e)),_(0x2,_0x5cfd2a(_0x8a85c4)),_(0x3,_0x5cfd2a(_0x4e2d06))],f);var re=Object[_0x15a028(0x214)],te=(_0x297f5a,_0x383edc,_0x21f41f,_0x44bff1)=>{const _0x372a4a=_0x15a028;for(var _0x3d0fe6=_0x44bff1>0x1?void 0x0:_0x44bff1?re(_0x383edc,_0x21f41f):_0x383edc,_0x1deb8a=_0x297f5a[_0x372a4a(0x227)]-0x1,_0x5bfacc;_0x1deb8a>=0x0;_0x1deb8a--)(_0x5bfacc=_0x297f5a[_0x1deb8a])&&(_0x3d0fe6=_0x5bfacc(_0x3d0fe6)||_0x3d0fe6);return _0x3d0fe6;},N=(_0x42a13c,_0x5afb17)=>(_0x5991b9,_0x30b8d6)=>_0x5afb17(_0x5991b9,_0x30b8d6,_0x42a13c);let g=class extends _0x4ffcbe{constructor(_0xac065,_0x2d5f9a){const _0x3fc0d7=_0x15a028;super(),this[_0x3fc0d7(0x22b)]=_0xac065,this[_0x3fc0d7(0x1f2)]=_0x2d5f9a,this[_0x3fc0d7(0x23c)]();}[_0x15a028(0x23c)](){const _0x390636=_0x15a028;this['_threadCommentDataSourceService'][_0x390636(0x221)]=this[_0x390636(0x1f2)],this[_0x390636(0x22b)][_0x390636(0x21f)]=!0x1;}};g=te([N(0x0,_0x34f453),N(0x1,_0x5cfd2a(f))],g);var se=Object[_0x15a028(0x223)],oe=Object[_0x15a028(0x214)],ne=(_0x4caba2,_0xf1668f,_0x50b268)=>_0xf1668f in _0x4caba2?se(_0x4caba2,_0xf1668f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50b268}):_0x4caba2[_0xf1668f]=_0x50b268,ie=(_0x4a9327,_0x231092,_0x203039,_0x210d85)=>{const _0x384c27=_0x15a028;for(var _0x4db634=_0x210d85>0x1?void 0x0:_0x210d85?oe(_0x231092,_0x203039):_0x231092,_0x4c5760=_0x4a9327[_0x384c27(0x227)]-0x1,_0x41b266;_0x4c5760>=0x0;_0x4c5760--)(_0x41b266=_0x4a9327[_0x4c5760])&&(_0x4db634=_0x41b266(_0x4db634)||_0x4db634);return _0x4db634;},w=(_0x51bf6b,_0x359e15)=>(_0x2a48bf,_0x4f82e9)=>_0x359e15(_0x2a48bf,_0x4f82e9,_0x51bf6b),$=(_0x36deb2,_0x4a3c14,_0x54282c)=>ne(_0x36deb2,typeof _0x4a3c14!=_0x15a028(0x1ea)?_0x4a3c14+'':_0x4a3c14,_0x54282c);let b=class extends _0x46fc63{constructor(_0x208264=M,_0x383125,_0x12c1ee){const _0x5e708c=_0x15a028;super(),this[_0x5e708c(0x1ec)]=_0x208264,this[_0x5e708c(0x206)]=_0x383125,this[_0x5e708c(0x237)]=_0x12c1ee;const {..._0x204bc9}=_0x5609b0({},M,this[_0x5e708c(0x1ec)]);this[_0x5e708c(0x237)]['setConfig'](z,_0x204bc9);}[_0x15a028(0x1fc)](){const _0x343e31=_0x15a028;[[f],[g],[S]][_0x343e31(0x20e)](_0x17c3fb=>{const _0x3b3475=_0x343e31;this[_0x3b3475(0x206)]['add'](_0x17c3fb);});}['onReady'](){const _0x555ca7=_0x15a028;this[_0x555ca7(0x206)]['get'](g),this[_0x555ca7(0x206)][_0x555ca7(0x222)](S);}};$(b,'pluginName',W),$(b,_0x15a028(0x229),_0x4632e5[_0x15a028(0x200)]),b=ie([_0x3b7993(_0x3dd618,_0x267342,_0x1782a3),w(0x1,_0x5cfd2a(_0x4e2d06)),w(0x2,_0x58de89)],b);function _0x3d91(){const _0x2a5ca8=['60XKBcEi','_httpService','6312770ThZRQA','format','saveCommentToSnapshot','_threadCommentDataSource','/delete','user','replies','_userService','Unknown','unitId','replyId','userId','30147620cxmuVf','onStarting','6102KmNmPP','reply','6702282XfFiIl','UNIVER_UNKNOWN','/reply','filter','2MqYPUF','Solve','_threadCommentModel','_injector','getComment','YYYY/MM/DD\x20HH:mm','/edit','disposeWithMe','_init','add','solved','forEach','getCurrentUser','root','commentUpdate$','comment','/list','getOwnPropertyDescriptor','content','customRanges','error','Reply','find','getUnit','listComments','addComment','userID','6128nhZOdV','syncUpdateMutationToColla','body','dataSource','get','defineProperty','UNRECOGNIZED','_sessionService','comments','length','requireSession','type','resolved','_threadCommentDataSourceService','ref','_initUserSync','parse','resolveComment','map','/universer-api/user/list','OpenOrReOpen','Delete','1138032zoXGOq','thread-comment-data-source.config','threadId','_configService','rangeType','addUser','stringify','Edit','_initDataSource','getUser','deleteComment','updateComment','/solved','Solved','delete','createTimestamp','users','values','/universer-api/comment/unit/','Add','COMMENT','rangeId','_commentService','code','getMemberID','size','185937OQYARM','188291ezGVyn','subscribe','symbol','post','_config'];_0x3d91=function(){return _0x2a5ca8;};return _0x3d91();}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x947c7a=_0x32b7;(function(_0x1be8fc,_0x2b7d58){const _0x3e50f7=_0x32b7,_0x191590=_0x1be8fc();while(!![]){try{const _0x604f93=-parseInt(_0x3e50f7(0xef))/0x1+-parseInt(_0x3e50f7(0xdc))/0x2*(parseInt(_0x3e50f7(0x91))/0x3)+parseInt(_0x3e50f7(0xd2))/0x4*(-parseInt(_0x3e50f7(0xe8))/0x5)+-parseInt(_0x3e50f7(0xbe))/0x6+parseInt(_0x3e50f7(0xab))/0x7*(parseInt(_0x3e50f7(0xe6))/0x8)+-parseInt(_0x3e50f7(0xa8))/0x9+-parseInt(_0x3e50f7(0x92))/0xa*(-parseInt(_0x3e50f7(0x94))/0xb);if(_0x604f93===_0x2b7d58)break;else _0x191590['push'](_0x191590['shift']());}catch(_0x1604e7){_0x191590['push'](_0x191590['shift']());}}}(_0x281c,0x93ce2));import{CommentService as _0x14b70a,CollaborationSessionService as _0x2c99d4,UniverCollaborationClientPlugin as _0x32ec4d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x33fe54}from'@univerjs-pro/license';import{dayjs as _0xfce144,UserManagerService as _0x6997ae,Inject as _0x45baf3,Injector as _0x2dd7cd,Disposable as _0x184533,CustomRangeType as _0x5cc40f,UniverInstanceType as _0x58d1d0,DependentOn as _0x3b1b27,IConfigService as _0x400041,Plugin as _0x2cc18b,merge as _0x1f14fb}from'@univerjs/core';function _0x32b7(_0x3b55d0,_0x2648cc){const _0x281cf3=_0x281c();return _0x32b7=function(_0x32b75f,_0x5f0e9b){_0x32b75f=_0x32b75f-0x8f;let _0x24b2e4=_0x281cf3[_0x32b75f];return _0x24b2e4;},_0x32b7(_0x3b55d0,_0x2648cc);}import{UniverThreadCommentUIPlugin as _0x2646aa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3b3dbf,IThreadCommentDataSourceService as _0x23a6ff}from'@univerjs/thread-comment';import{bufferTime as _0x4a06d2}from'rxjs';import{HTTPService as _0x4dd32b}from'@univerjs/network';const W=_0x947c7a(0xb2);var I=(_0x1826e6=>(_0x1826e6[_0x1826e6[_0x947c7a(0xcf)]=0x0]=_0x947c7a(0xcf),_0x1826e6[_0x1826e6['Solved']=0x1]=_0x947c7a(0x9f),_0x1826e6[_0x1826e6[_0x947c7a(0xa6)]=-0x1]=_0x947c7a(0xa6),_0x1826e6))(I||{}),v=(_0x4ed1d9=>(_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xa0)]=0x0]=_0x947c7a(0xa0),_0x4ed1d9[_0x4ed1d9['Add']=0x1]=_0x947c7a(0xb0),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xea)]=0x2]=_0x947c7a(0xea),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xd4)]=0x3]=_0x947c7a(0xd4),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xe1)]=0x4]=_0x947c7a(0xe1),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xda)]=0x5]=_0x947c7a(0xda),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xa6)]=-0x1]=_0x947c7a(0xa6),_0x4ed1d9))(v||{});const D=_0x5e3a06=>_0xfce144(new Date(+_0x5e3a06))['format'](_0x947c7a(0xae)),B=async(_0x33695e,_0x2e20aa)=>{const _0x441ad1=_0x947c7a,_0x182bae=_0x33695e[_0x441ad1(0xc9)](_0x6997ae),_0x204b60=_0x33695e[_0x441ad1(0xc9)](_0x4dd32b);_0x2e20aa[_0x441ad1(0xc8)](_0x4ad854=>{_0x182bae['getUser'](_0x4ad854)&&_0x2e20aa['delete'](_0x4ad854);}),_0x2e20aa['size']&&(await _0x204b60[_0x441ad1(0xc9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2e20aa]}}))[_0x441ad1(0xee)][_0x441ad1(0xa7)][_0x441ad1(0xc8)](_0x3ab8ae=>{const _0x5ef783=_0x441ad1;_0x3ab8ae&&_0x182bae[_0x5ef783(0x95)](_0x3ab8ae);});};var K=Object[_0x947c7a(0x98)],V=(_0x474c75,_0x4aec02,_0x15283c,_0x5bb152)=>{const _0x2e0bec=_0x947c7a;for(var _0xb17ebb=_0x5bb152>0x1?void 0x0:_0x5bb152?K(_0x4aec02,_0x15283c):_0x4aec02,_0x18cbb5=_0x474c75[_0x2e0bec(0xeb)]-0x1,_0x254626;_0x18cbb5>=0x0;_0x18cbb5--)(_0x254626=_0x474c75[_0x18cbb5])&&(_0xb17ebb=_0x254626(_0xb17ebb)||_0xb17ebb);return _0xb17ebb;},p=(_0x5838c4,_0x402421)=>(_0x5d2e5a,_0x55fb39)=>_0x402421(_0x5d2e5a,_0x55fb39,_0x5838c4);let S=class extends _0x184533{constructor(_0x173f48,_0x345f33,_0x539f99,_0x352ade){const _0x5278da=_0x947c7a;super(),this[_0x5278da(0x9b)]=_0x173f48,this[_0x5278da(0xd6)]=_0x345f33,this[_0x5278da(0xc2)]=_0x539f99,this['_injector']=_0x352ade,this[_0x5278da(0xc7)](),this['_initUserSync']();}[_0x947c7a(0xe2)](){const _0x1c6d4c=_0x947c7a;this[_0x1c6d4c(0x97)](this[_0x1c6d4c(0xd6)][_0x1c6d4c(0xa5)][_0x1c6d4c(0xbb)](_0x4a06d2(0x10))[_0x1c6d4c(0xb3)](_0x16befe=>{const _0x2e6f55=new Set();_0x16befe['forEach'](_0x2e09e5=>{const _0x6fa9a3=_0x32b7;switch(_0x2e09e5[_0x6fa9a3(0x93)]){case _0x6fa9a3(0xb8):{const _0x8fe9e4=_0x2e09e5[_0x6fa9a3(0xaa)][_0x6fa9a3(0xad)];_0x2e6f55['add'](_0x8fe9e4);break;}}}),B(this['_injector'],_0x2e6f55);}));}['_init'](){const _0x43f05a=_0x947c7a;this['disposeWithMe'](this[_0x43f05a(0x9b)][_0x43f05a(0xa5)][_0x43f05a(0xb3)](async _0x2bc7c7=>{const _0x4d9040=_0x43f05a;var _0x4714d0,_0x1de676,_0x348b09,_0x1b2aa3;const _0x14c584=(_0x4714d0=this['_threadCommentModel'][_0x4d9040(0x9c)](_0x2bc7c7[_0x4d9040(0x96)])[_0x4d9040(0xb6)](_0x3df0f7=>_0x3df0f7[_0x4d9040(0xdb)]===_0x2bc7c7[_0x4d9040(0xdb)]))==null?void 0x0:_0x4714d0[_0x4d9040(0x8f)];if(!_0x14c584)return;const {unitId:_0x2895a4,subUnitId:_0x29accf}=_0x14c584;switch(_0x2bc7c7[_0x4d9040(0xbd)]&&this[_0x4d9040(0xc2)][_0x4d9040(0x95)](_0x2bc7c7[_0x4d9040(0xbd)]),_0x2bc7c7['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x2895a4,_0x29accf,{'unitId':_0x2895a4,'subUnitId':_0x29accf,'ref':'','id':_0x2bc7c7[_0x4d9040(0xbc)],'dT':D(+_0x2bc7c7['createTimestamp']),'threadId':_0x2bc7c7[_0x4d9040(0xdb)],'personId':(_0x348b09=(_0x1de676=_0x2bc7c7[_0x4d9040(0xbd)])==null?void 0x0:_0x1de676[_0x4d9040(0xc3)])!=null?_0x348b09:_0x2bc7c7[_0x4d9040(0xaf)],'text':JSON[_0x4d9040(0xb7)](_0x2bc7c7[_0x4d9040(0xb1)]),'parentId':_0x14c584['id']});break;}case v[_0x4d9040(0xe1)]:{const _0x3375d1=this[_0x4d9040(0xd6)][_0x4d9040(0x9a)](_0x2895a4,_0x29accf,_0x2bc7c7[_0x4d9040(0xbc)]);_0x3375d1&&_0x3375d1['parentId']&&this[_0x4d9040(0xd6)][_0x4d9040(0xd0)](_0x2895a4,_0x29accf,_0x2bc7c7[_0x4d9040(0xbc)]);break;}case v['Edit']:{this[_0x4d9040(0xd6)][_0x4d9040(0xb4)](_0x2895a4,_0x29accf,{'commentId':_0x2bc7c7['replyId'],'text':JSON[_0x4d9040(0xb7)](_0x2bc7c7[_0x4d9040(0xb1)])});break;}case v[_0x4d9040(0xda)]:{const _0x4a6fe6=(_0x1b2aa3=this[_0x4d9040(0xd6)][_0x4d9040(0x9c)](_0x2bc7c7[_0x4d9040(0x96)])[_0x4d9040(0xb6)](_0x1fc192=>_0x1fc192[_0x4d9040(0xdb)]===_0x2bc7c7[_0x4d9040(0xdb)]))==null?void 0x0:_0x1b2aa3[_0x4d9040(0x8f)];_0x4a6fe6&&this['_threadCommentModel'][_0x4d9040(0x90)](_0x2895a4,_0x29accf,_0x4a6fe6['id'],_0x2bc7c7[_0x4d9040(0xc6)]===I[_0x4d9040(0x9f)]);break;}}}));}};S=V([p(0x0,_0x45baf3(_0x14b70a)),p(0x1,_0x45baf3(_0x3b3dbf)),p(0x2,_0x45baf3(_0x6997ae)),p(0x3,_0x45baf3(_0x2dd7cd))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x947c7a(0x98)],Q=(_0x5b5d90,_0x1eb7b2,_0x8c510,_0x44d69f)=>{const _0x2a3eab=_0x947c7a;for(var _0x447bef=_0x44d69f>0x1?void 0x0:_0x44d69f?k(_0x1eb7b2,_0x8c510):_0x1eb7b2,_0x5d61a4=_0x5b5d90[_0x2a3eab(0xeb)]-0x1,_0x15738a;_0x5d61a4>=0x0;_0x5d61a4--)(_0x15738a=_0x5b5d90[_0x5d61a4])&&(_0x447bef=_0x15738a(_0x447bef)||_0x447bef);return _0x447bef;},_=(_0x4dbc2c,_0x4c6a88)=>(_0x278281,_0x6ccbf1)=>_0x4c6a88(_0x278281,_0x6ccbf1,_0x4dbc2c);function X(_0x497ce1,_0x48908a){const _0xd70c07=_0x947c7a,_0x417cdd=_0x497ce1[_0xd70c07(0xba)][0x0];return{..._0x48908a,'id':_0x417cdd[_0xd70c07(0xbc)],'resolved':_0x497ce1[_0xd70c07(0xc6)]===0x1,'dT':D(_0x417cdd[_0xd70c07(0xa1)]),'personId':_0x417cdd[_0xd70c07(0xaf)],'threadId':_0x417cdd[_0xd70c07(0xdb)]};}function ee(_0x6dd644,_0x290f49,_0x5921c5){const _0x19d1d8=_0x947c7a;var _0x177220,_0x1e5cad;if(((_0x1e5cad=(_0x177220=_0x6dd644==null?void 0x0:_0x6dd644[_0x19d1d8(0xba)])==null?void 0x0:_0x177220[_0x19d1d8(0xeb)])!=null?_0x1e5cad:0x0)>0x0){const _0x821314=(_0x2c4ac8,_0x2b602b)=>({'id':_0x2c4ac8['replyId'],'threadId':_0x2c4ac8['threadId'],'dT':D(_0x2c4ac8[_0x19d1d8(0xa1)]),'personId':_0x2c4ac8[_0x19d1d8(0xaf)],'resolved':_0x6dd644['solved']===I[_0x19d1d8(0x9f)],'unitId':_0x290f49,'subUnitId':_0x5921c5,'text':JSON['parse'](_0x2c4ac8[_0x19d1d8(0xb1)]),'parentId':_0x2b602b}),_0x50a709=_0x821314(_0x6dd644['replies'][0x0]);return{..._0x50a709,'children':_0x6dd644[_0x19d1d8(0xba)][_0x19d1d8(0xed)](0x1)['map'](_0x36f6ae=>_0x821314(_0x36f6ae,_0x50a709['id']))};}return null;}function _0x281c(){const _0x366393=['post','Delete','_initUserSync','rangeType','map','code','1432IYNujg','rangeId','551695sUTDUL','requireSession','Reply','length','values','slice','body','184849GWGcjM','root','resolveComment','2248617hFtfdw','18591330WGTJiw','type','11szCjyl','addUser','unitId','disposeWithMe','getOwnPropertyDescriptor','resolved','getComment','_commentService','getUnit','/edit','getMemberID','Solved','Unknown','createTimestamp','dataSource','/add','_configService','commentUpdate$','UNRECOGNIZED','users','4047849LLAlMU','_httpService','payload','44961qooGHd','_threadCommentDataSource','personId','YYYY/MM/DD\x20HH:mm','userId','Add','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','updateComment','/reply','find','parse','add','_threadCommentDataSourceService','replies','pipe','replyId','user','3467610ObRIaY','_sessionService','_config','/delete','_userService','userID','syncUpdateMutationToColla','/solved','solved','_init','forEach','get','customRanges','_injector','stringify','comments','COMMENT','OpenOrReOpen','deleteComment','/universer-api/comment/unit/','16MCwTNn','onStarting','Edit','/list','_threadCommentModel','error','defineProperty','ref','Solve','threadId','2dtzhux','filter','setConfig','comment'];_0x281c=function(){return _0x366393;};return _0x281c();}let f=class{constructor(_0x5dd7b9,_0x146aba,_0x46698a,_0x1bbfac){const _0x24d629=_0x947c7a;this[_0x24d629(0xa9)]=_0x5dd7b9,this[_0x24d629(0xc2)]=_0x146aba,this[_0x24d629(0xbf)]=_0x46698a,this[_0x24d629(0xcb)]=_0x1bbfac;}async['addComment'](_0xba73ff){const _0x5ced45=_0x947c7a;var _0x4a36fe,_0xd7a7da;const {parentId:_0x5f5c63,unitId:_0x1e42fa,text:_0xc4e0a8,threadId:_0x457e1e}=_0xba73ff,_0x2d74e2=(_0xd7a7da=(_0x4a36fe=_0xc4e0a8['customRanges'])==null?void 0x0:_0x4a36fe[_0x5ced45(0xdd)](_0x4ea6af=>_0x4ea6af[_0x5ced45(0xe3)]===_0x5cc40f[_0x5ced45(0xce)])[_0x5ced45(0xe4)](_0x1db21c=>_0x1db21c[_0x5ced45(0xe7)]))!=null?_0xd7a7da:[],_0x55ddc4=JSON[_0x5ced45(0xcc)](_0xc4e0a8),_0x458419=(await this[_0x5ced45(0xbf)][_0x5ced45(0xe9)](_0x1e42fa))['getMemberID']();if(_0x5f5c63){const _0x314340={'memberId':_0x458419,'unitId':_0x1e42fa,'content':_0x55ddc4,'mention':_0x2d74e2,'threadId':_0x457e1e},_0x1f41ef=(await this[_0x5ced45(0xa9)][_0x5ced45(0xe0)](_0x5ced45(0xd1)+_0x1e42fa+_0x5ced45(0xb5),{'body':_0x314340}))[_0x5ced45(0xee)]['reply'];return{..._0xba73ff,'id':_0x1f41ef['replyId'],'dT':_0xfce144(+_0x1f41ef[_0x5ced45(0xa1)])['format'](_0x5ced45(0xae)),'personId':_0x1f41ef[_0x5ced45(0xaf)]};}else{const _0x644199={'memberId':_0x458419,'unitId':_0x1e42fa,'content':_0x55ddc4,'mention':_0x2d74e2},_0x5cac32=await this[_0x5ced45(0xa9)][_0x5ced45(0xe0)]('/universer-api/comment/unit/'+_0x1e42fa+_0x5ced45(0xa3),{'body':_0x644199});return X(_0x5cac32[_0x5ced45(0xee)][_0x5ced45(0xdf)],_0xba73ff);}}async[_0x947c7a(0xb4)](_0xa3146a){const _0x8f0cb2=_0x947c7a;var _0x51f11b,_0x5211d3;const {text:_0x105440,unitId:_0x4b884d}=_0xa3146a,_0x1ee4ea=(_0x5211d3=(_0x51f11b=_0x105440[_0x8f0cb2(0xca)])==null?void 0x0:_0x51f11b[_0x8f0cb2(0xdd)](_0x4a2769=>_0x4a2769[_0x8f0cb2(0xe3)]===_0x5cc40f[_0x8f0cb2(0xce)])[_0x8f0cb2(0xe4)](_0x2b1a3f=>_0x2b1a3f[_0x8f0cb2(0xe7)]))!=null?_0x5211d3:[],_0xce53a1=JSON[_0x8f0cb2(0xcc)](_0x105440),_0x5620fd=_0xa3146a[_0x8f0cb2(0xdb)],_0x3e3764=_0xa3146a['id'],_0x4e8964={'memberId':(await this[_0x8f0cb2(0xbf)][_0x8f0cb2(0xe9)](_0x4b884d))[_0x8f0cb2(0x9e)](),'unitId':_0x4b884d,'threadId':_0x5620fd,'mention':_0x1ee4ea,'content':_0xce53a1,'replyId':_0x3e3764},_0x1b9e71=await this[_0x8f0cb2(0xa9)][_0x8f0cb2(0xe0)](_0x8f0cb2(0xd1)+_0x4b884d+_0x8f0cb2(0x9d),{'body':_0x4e8964});return!_0x1b9e71['body']['error']||_0x1b9e71[_0x8f0cb2(0xee)]['error']['code']===0x1;}async[_0x947c7a(0x90)](_0x1a7dbe){const _0x1230ec=_0x947c7a,{unitId:_0x31993e}=_0x1a7dbe,_0xd43ce8=_0x1a7dbe[_0x1230ec(0xdb)],_0x3ea08c={'memberId':this[_0x1230ec(0xc2)]['getCurrentUser']()[_0x1230ec(0xc3)],'unitId':_0x31993e,'threadId':_0xd43ce8,'solved':_0x1a7dbe[_0x1230ec(0x99)]?I[_0x1230ec(0x9f)]:I['OpenOrReOpen']},_0x2556b3=await this['_httpService'][_0x1230ec(0xe0)](_0x1230ec(0xd1)+_0x31993e+_0x1230ec(0xc5),{'body':_0x3ea08c});return!_0x2556b3[_0x1230ec(0xee)][_0x1230ec(0xd7)]||_0x2556b3[_0x1230ec(0xee)][_0x1230ec(0xd7)][_0x1230ec(0xe5)]===0x1;}async['deleteComment'](_0x47dd11,_0x1c567b,_0x360443,_0x3dee4a){const _0x33a7ef=_0x947c7a,_0x524573={'memberId':(await this['_sessionService'][_0x33a7ef(0xe9)](_0x47dd11))[_0x33a7ef(0x9e)](),'threadId':_0x360443,'replyId':_0x3dee4a,'unitId':_0x47dd11},_0x55b8ec=await this['_httpService'][_0x33a7ef(0xe0)](_0x33a7ef(0xd1)+_0x47dd11+_0x33a7ef(0xc1),{'body':_0x524573});return!_0x55b8ec['body'][_0x33a7ef(0xd7)]||_0x55b8ec[_0x33a7ef(0xee)]['error'][_0x33a7ef(0xe5)]===0x1;}async['listComments'](_0x427b09,_0x4e2131,_0x333f55){const _0x427fe0=_0x947c7a,_0x28f252={'unitId':_0x427b09,'threadId':_0x333f55},_0xfce509=await this[_0x427fe0(0xa9)][_0x427fe0(0xe0)](_0x427fe0(0xd1)+_0x427b09+_0x427fe0(0xd5),{'body':_0x28f252}),_0x82b18b=_0x333f55[_0x427fe0(0xe4)](_0x46efb0=>ee(_0xfce509[_0x427fe0(0xee)][_0x427fe0(0xcd)][_0x46efb0],_0x427b09,_0x4e2131))['filter'](Boolean);return Object[_0x427fe0(0xec)](_0xfce509[_0x427fe0(0xee)][_0x427fe0(0xa7)])[_0x427fe0(0xc8)](_0x260e06=>{const _0x50a02b=_0x427fe0;this[_0x50a02b(0xc2)][_0x50a02b(0x95)](_0x260e06);}),_0x82b18b;}['saveCommentToSnapshot'](_0x5e0e99){const _0xa26654=_0x947c7a;return{'id':_0x5e0e99['id'],'threadId':_0x5e0e99[_0xa26654(0xdb)],'ref':_0x5e0e99[_0xa26654(0xd9)]};}};f=Q([_(0x0,_0x45baf3(_0x4dd32b)),_(0x1,_0x45baf3(_0x6997ae)),_(0x2,_0x45baf3(_0x2c99d4)),_(0x3,_0x45baf3(_0x2dd7cd))],f);var re=Object[_0x947c7a(0x98)],te=(_0x8e955f,_0x52b672,_0x2dbf7e,_0x529b22)=>{const _0xefd0d9=_0x947c7a;for(var _0x580e8c=_0x529b22>0x1?void 0x0:_0x529b22?re(_0x52b672,_0x2dbf7e):_0x52b672,_0x352f5a=_0x8e955f[_0xefd0d9(0xeb)]-0x1,_0x48dab9;_0x352f5a>=0x0;_0x352f5a--)(_0x48dab9=_0x8e955f[_0x352f5a])&&(_0x580e8c=_0x48dab9(_0x580e8c)||_0x580e8c);return _0x580e8c;},N=(_0x3acfd6,_0x7a137c)=>(_0x566f34,_0x58522f)=>_0x7a137c(_0x566f34,_0x58522f,_0x3acfd6);let g=class extends _0x184533{constructor(_0x3aa539,_0x2ac7bb){const _0x45520f=_0x947c7a;super(),this[_0x45520f(0xb9)]=_0x3aa539,this['_threadCommentDataSource']=_0x2ac7bb,this['_initDataSource']();}['_initDataSource'](){const _0x24a663=_0x947c7a;this[_0x24a663(0xb9)][_0x24a663(0xa2)]=this[_0x24a663(0xac)],this[_0x24a663(0xb9)][_0x24a663(0xc4)]=!0x1;}};g=te([N(0x0,_0x23a6ff),N(0x1,_0x45baf3(f))],g);var se=Object[_0x947c7a(0xd8)],oe=Object[_0x947c7a(0x98)],ne=(_0x255c27,_0x36b8ef,_0x1c552c)=>_0x36b8ef in _0x255c27?se(_0x255c27,_0x36b8ef,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1c552c}):_0x255c27[_0x36b8ef]=_0x1c552c,ie=(_0x2cf46e,_0x16407f,_0x20b13e,_0x583653)=>{const _0xf5035c=_0x947c7a;for(var _0x37f91c=_0x583653>0x1?void 0x0:_0x583653?oe(_0x16407f,_0x20b13e):_0x16407f,_0x2573a5=_0x2cf46e[_0xf5035c(0xeb)]-0x1,_0x27caaf;_0x2573a5>=0x0;_0x2573a5--)(_0x27caaf=_0x2cf46e[_0x2573a5])&&(_0x37f91c=_0x27caaf(_0x37f91c)||_0x37f91c);return _0x37f91c;},w=(_0x3954ea,_0x4d91e9)=>(_0x362932,_0x1ff659)=>_0x4d91e9(_0x362932,_0x1ff659,_0x3954ea),$=(_0x45f22d,_0x5a72b0,_0x562c2c)=>ne(_0x45f22d,typeof _0x5a72b0!='symbol'?_0x5a72b0+'':_0x5a72b0,_0x562c2c);let b=class extends _0x2cc18b{constructor(_0x51abc6=M,_0x578328,_0x47eaa3){const _0x559099=_0x947c7a;super(),this[_0x559099(0xc0)]=_0x51abc6,this[_0x559099(0xcb)]=_0x578328,this['_configService']=_0x47eaa3;const {..._0x38b629}=_0x1f14fb({},M,this[_0x559099(0xc0)]);this[_0x559099(0xa4)][_0x559099(0xde)](z,_0x38b629);}[_0x947c7a(0xd3)](){const _0x19f682=_0x947c7a;[[f],[g],[S]][_0x19f682(0xc8)](_0x3d5aef=>{const _0x55f59e=_0x19f682;this[_0x55f59e(0xcb)][_0x55f59e(0xb8)](_0x3d5aef);});}['onReady'](){const _0x5222d7=_0x947c7a;this[_0x5222d7(0xcb)][_0x5222d7(0xc9)](g),this[_0x5222d7(0xcb)][_0x5222d7(0xc9)](S);}};$(b,'pluginName',W),$(b,_0x947c7a(0x93),_0x58d1d0['UNIVER_UNKNOWN']),b=ie([_0x3b1b27(_0x2646aa,_0x32ec4d,_0x33fe54),w(0x1,_0x45baf3(_0x2dd7cd)),w(0x2,_0x400041)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x15a028=_0x6018;(function(_0x344545,_0x54bf3c){const _0x5091a7=_0x6018,_0x3c2b54=_0x344545();while(!![]){try{const _0x109cc9=-parseInt(_0x5091a7(0x1e8))/0x1*(-parseInt(_0x5091a7(0x203))/0x2)+-parseInt(_0x5091a7(0x24e))/0x3*(-parseInt(_0x5091a7(0x1ed))/0x4)+parseInt(_0x5091a7(0x1ef))/0x5+parseInt(_0x5091a7(0x1ff))/0x6+-parseInt(_0x5091a7(0x234))/0x7+parseInt(_0x5091a7(0x21e))/0x8*(parseInt(_0x5091a7(0x1fd))/0x9)+-parseInt(_0x5091a7(0x1fb))/0xa;if(_0x109cc9===_0x54bf3c)break;else _0x3c2b54['push'](_0x3c2b54['shift']());}catch(_0x3da37d){_0x3c2b54['push'](_0x3c2b54['shift']());}}}(_0x3d91,0xccfa3));import{CommentService as _0x253c4f,CollaborationSessionService as _0x8a85c4,UniverCollaborationClientPlugin as _0x267342}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1782a3}from'@univerjs-pro/license';import{dayjs as _0x35743c,UserManagerService as _0x1f607e,Inject as _0x5cfd2a,Injector as _0x4e2d06,Disposable as _0x4ffcbe,CustomRangeType as _0xe13e7a,UniverInstanceType as _0x4632e5,DependentOn as _0x3b7993,IConfigService as _0x58de89,Plugin as _0x46fc63,merge as _0x5609b0}from'@univerjs/core';function _0x6018(_0x1bc6fa,_0x1311fc){const _0x3d917a=_0x3d91();return _0x6018=function(_0x6018a5,_0x5eff06){_0x6018a5=_0x6018a5-0x1e8;let _0x1b0f32=_0x3d917a[_0x6018a5];return _0x1b0f32;},_0x6018(_0x1bc6fa,_0x1311fc);}import{UniverThreadCommentUIPlugin as _0x3dd618}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48a5cd,IThreadCommentDataSourceService as _0x34f453}from'@univerjs/thread-comment';import{bufferTime as _0x4ff96d}from'rxjs';import{HTTPService as _0xeb8e79}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x532dc6=>(_0x532dc6[_0x532dc6[_0x15a028(0x232)]=0x0]=_0x15a028(0x232),_0x532dc6[_0x532dc6[_0x15a028(0x241)]=0x1]=_0x15a028(0x241),_0x532dc6[_0x532dc6[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x532dc6))(I||{}),v=(_0x50ff93=>(_0x50ff93[_0x50ff93['Unknown']=0x0]=_0x15a028(0x1f7),_0x50ff93[_0x50ff93[_0x15a028(0x247)]=0x1]='Add',_0x50ff93[_0x50ff93[_0x15a028(0x218)]=0x2]=_0x15a028(0x218),_0x50ff93[_0x50ff93[_0x15a028(0x23b)]=0x3]=_0x15a028(0x23b),_0x50ff93[_0x50ff93['Delete']=0x4]='Delete',_0x50ff93[_0x50ff93[_0x15a028(0x204)]=0x5]=_0x15a028(0x204),_0x50ff93[_0x50ff93[_0x15a028(0x224)]=-0x1]=_0x15a028(0x224),_0x50ff93))(v||{});const D=_0x122c5b=>_0x35743c(new Date(+_0x122c5b))[_0x15a028(0x1f0)](_0x15a028(0x208)),B=async(_0x37953a,_0x25e775)=>{const _0x139966=_0x15a028,_0x428f4c=_0x37953a[_0x139966(0x222)](_0x1f607e),_0x1dc018=_0x37953a[_0x139966(0x222)](_0xeb8e79);_0x25e775[_0x139966(0x20e)](_0x5b11fe=>{const _0x4a3b7b=_0x139966;_0x428f4c[_0x4a3b7b(0x23d)](_0x5b11fe)&&_0x25e775[_0x4a3b7b(0x242)](_0x5b11fe);}),_0x25e775[_0x139966(0x24d)]&&(await _0x1dc018['get'](_0x139966(0x231),{'params':{'userIDs':[..._0x25e775]}}))[_0x139966(0x220)][_0x139966(0x244)][_0x139966(0x20e)](_0x257f4d=>{const _0x1d2422=_0x139966;_0x257f4d&&_0x428f4c[_0x1d2422(0x239)](_0x257f4d);});};var K=Object[_0x15a028(0x214)],V=(_0x134347,_0x3af775,_0x2bc25b,_0x45798d)=>{for(var _0x47ea62=_0x45798d>0x1?void 0x0:_0x45798d?K(_0x3af775,_0x2bc25b):_0x3af775,_0x1dd33e=_0x134347['length']-0x1,_0x35c777;_0x1dd33e>=0x0;_0x1dd33e--)(_0x35c777=_0x134347[_0x1dd33e])&&(_0x47ea62=_0x35c777(_0x47ea62)||_0x47ea62);return _0x47ea62;},p=(_0x494ebc,_0x526f45)=>(_0x2ac6f2,_0x3c4ff4)=>_0x526f45(_0x2ac6f2,_0x3c4ff4,_0x494ebc);let S=class extends _0x4ffcbe{constructor(_0x452dcd,_0x4e478b,_0x24a489,_0x4f790c){const _0x260497=_0x15a028;super(),this[_0x260497(0x24a)]=_0x452dcd,this[_0x260497(0x205)]=_0x4e478b,this[_0x260497(0x1f6)]=_0x24a489,this[_0x260497(0x206)]=_0x4f790c,this[_0x260497(0x20b)](),this[_0x260497(0x22d)]();}[_0x15a028(0x22d)](){const _0xb98b1f=_0x15a028;this[_0xb98b1f(0x20a)](this['_threadCommentModel'][_0xb98b1f(0x211)]['pipe'](_0x4ff96d(0x10))[_0xb98b1f(0x1e9)](_0x319130=>{const _0x5b53a8=_0xb98b1f,_0x14fbde=new Set();_0x319130['forEach'](_0x4c6202=>{const _0x4a39e3=_0x6018;switch(_0x4c6202[_0x4a39e3(0x229)]){case'add':{const _0x2bf500=_0x4c6202['payload']['personId'];_0x14fbde[_0x4a39e3(0x20c)](_0x2bf500);break;}}}),B(this[_0x5b53a8(0x206)],_0x14fbde);}));}[_0x15a028(0x20b)](){const _0x1db84e=_0x15a028;this[_0x1db84e(0x20a)](this['_commentService'][_0x1db84e(0x211)][_0x1db84e(0x1e9)](async _0x21a53e=>{const _0x4f62eb=_0x1db84e;var _0x4094ea,_0x4359e3,_0x24c7e1,_0x47c369;const _0x558fdc=(_0x4094ea=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])[_0x4f62eb(0x219)](_0xab5002=>_0xab5002[_0x4f62eb(0x236)]===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x4094ea['root'];if(!_0x558fdc)return;const {unitId:_0x3223c3,subUnitId:_0x38affb}=_0x558fdc;switch(_0x21a53e[_0x4f62eb(0x1f4)]&&this[_0x4f62eb(0x1f6)][_0x4f62eb(0x239)](_0x21a53e['user']),_0x21a53e['type']){case v[_0x4f62eb(0x247)]:break;case v[_0x4f62eb(0x218)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x21c)](_0x3223c3,_0x38affb,{'unitId':_0x3223c3,'subUnitId':_0x38affb,'ref':'','id':_0x21a53e[_0x4f62eb(0x1f9)],'dT':D(+_0x21a53e[_0x4f62eb(0x243)]),'threadId':_0x21a53e['threadId'],'personId':(_0x24c7e1=(_0x4359e3=_0x21a53e[_0x4f62eb(0x1f4)])==null?void 0x0:_0x4359e3[_0x4f62eb(0x21d)])!=null?_0x24c7e1:_0x21a53e[_0x4f62eb(0x1fa)],'text':JSON[_0x4f62eb(0x22e)](_0x21a53e[_0x4f62eb(0x215)]),'parentId':_0x558fdc['id']});break;}case v[_0x4f62eb(0x233)]:{const _0x1768b8=this[_0x4f62eb(0x205)][_0x4f62eb(0x207)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);_0x1768b8&&_0x1768b8['parentId']&&this[_0x4f62eb(0x205)][_0x4f62eb(0x23e)](_0x3223c3,_0x38affb,_0x21a53e[_0x4f62eb(0x1f9)]);break;}case v[_0x4f62eb(0x23b)]:{this[_0x4f62eb(0x205)][_0x4f62eb(0x23f)](_0x3223c3,_0x38affb,{'commentId':_0x21a53e[_0x4f62eb(0x1f9)],'text':JSON['parse'](_0x21a53e[_0x4f62eb(0x215)])});break;}case v[_0x4f62eb(0x204)]:{const _0x262cca=(_0x47c369=this[_0x4f62eb(0x205)][_0x4f62eb(0x21a)](_0x21a53e[_0x4f62eb(0x1f8)])['find'](_0x210123=>_0x210123['threadId']===_0x21a53e[_0x4f62eb(0x236)]))==null?void 0x0:_0x47c369[_0x4f62eb(0x210)];_0x262cca&&this[_0x4f62eb(0x205)][_0x4f62eb(0x22f)](_0x3223c3,_0x38affb,_0x262cca['id'],_0x21a53e['solved']===I[_0x4f62eb(0x241)]);break;}}}));}};S=V([p(0x0,_0x5cfd2a(_0x253c4f)),p(0x1,_0x5cfd2a(_0x48a5cd)),p(0x2,_0x5cfd2a(_0x1f607e)),p(0x3,_0x5cfd2a(_0x4e2d06))],S);const z=_0x15a028(0x235),M={};var k=Object[_0x15a028(0x214)],Q=(_0x2dc919,_0x595483,_0x31b92e,_0x39ee5d)=>{const _0xa8dd0b=_0x15a028;for(var _0x37271b=_0x39ee5d>0x1?void 0x0:_0x39ee5d?k(_0x595483,_0x31b92e):_0x595483,_0x5dd6fe=_0x2dc919[_0xa8dd0b(0x227)]-0x1,_0x2623ad;_0x5dd6fe>=0x0;_0x5dd6fe--)(_0x2623ad=_0x2dc919[_0x5dd6fe])&&(_0x37271b=_0x2623ad(_0x37271b)||_0x37271b);return _0x37271b;},_=(_0x1a1b32,_0x45abf3)=>(_0x5d4e69,_0x58729a)=>_0x45abf3(_0x5d4e69,_0x58729a,_0x1a1b32);function X(_0x2471bc,_0xa5d22e){const _0x3cd42b=_0x15a028,_0x571d38=_0x2471bc[_0x3cd42b(0x1f5)][0x0];return{..._0xa5d22e,'id':_0x571d38[_0x3cd42b(0x1f9)],'resolved':_0x2471bc[_0x3cd42b(0x20d)]===0x1,'dT':D(_0x571d38[_0x3cd42b(0x243)]),'personId':_0x571d38[_0x3cd42b(0x1fa)],'threadId':_0x571d38[_0x3cd42b(0x236)]};}function ee(_0x3d672b,_0x29dee3,_0x281431){const _0xfa2551=_0x15a028;var _0x29f862,_0x5a473d;if(((_0x5a473d=(_0x29f862=_0x3d672b==null?void 0x0:_0x3d672b[_0xfa2551(0x1f5)])==null?void 0x0:_0x29f862[_0xfa2551(0x227)])!=null?_0x5a473d:0x0)>0x0){const _0x33acaa=(_0x5f3be4,_0x501372)=>({'id':_0x5f3be4[_0xfa2551(0x1f9)],'threadId':_0x5f3be4[_0xfa2551(0x236)],'dT':D(_0x5f3be4['createTimestamp']),'personId':_0x5f3be4[_0xfa2551(0x1fa)],'resolved':_0x3d672b[_0xfa2551(0x20d)]===I[_0xfa2551(0x241)],'unitId':_0x29dee3,'subUnitId':_0x281431,'text':JSON[_0xfa2551(0x22e)](_0x5f3be4[_0xfa2551(0x215)]),'parentId':_0x501372}),_0x2593e7=_0x33acaa(_0x3d672b[_0xfa2551(0x1f5)][0x0]);return{..._0x2593e7,'children':_0x3d672b[_0xfa2551(0x1f5)]['slice'](0x1)[_0xfa2551(0x230)](_0x15c981=>_0x33acaa(_0x15c981,_0x2593e7['id']))};}return null;}let f=class{constructor(_0x46a7b0,_0x4cf54d,_0x4d1150,_0x3e173f){const _0x1096e3=_0x15a028;this['_httpService']=_0x46a7b0,this[_0x1096e3(0x1f6)]=_0x4cf54d,this[_0x1096e3(0x225)]=_0x4d1150,this['_injector']=_0x3e173f;}async[_0x15a028(0x21c)](_0x1e62d1){const _0x2bc2a2=_0x15a028;var _0x4a6d9c,_0x58cd3f;const {parentId:_0x56762d,unitId:_0x3d17cd,text:_0x32e94d,threadId:_0x1b8ef0}=_0x1e62d1,_0x275e47=(_0x58cd3f=(_0x4a6d9c=_0x32e94d[_0x2bc2a2(0x216)])==null?void 0x0:_0x4a6d9c[_0x2bc2a2(0x202)](_0x142278=>_0x142278[_0x2bc2a2(0x238)]===_0xe13e7a[_0x2bc2a2(0x248)])[_0x2bc2a2(0x230)](_0xbe00bd=>_0xbe00bd[_0x2bc2a2(0x249)]))!=null?_0x58cd3f:[],_0x470e43=JSON[_0x2bc2a2(0x23a)](_0x32e94d),_0x4cdfa5=(await this[_0x2bc2a2(0x225)][_0x2bc2a2(0x228)](_0x3d17cd))['getMemberID']();if(_0x56762d){const _0x5c4a95={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47,'threadId':_0x1b8ef0},_0x162044=(await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)]('/universer-api/comment/unit/'+_0x3d17cd+_0x2bc2a2(0x201),{'body':_0x5c4a95}))[_0x2bc2a2(0x220)][_0x2bc2a2(0x1fe)];return{..._0x1e62d1,'id':_0x162044[_0x2bc2a2(0x1f9)],'dT':_0x35743c(+_0x162044[_0x2bc2a2(0x243)])['format'](_0x2bc2a2(0x208)),'personId':_0x162044[_0x2bc2a2(0x1fa)]};}else{const _0x3e9f6d={'memberId':_0x4cdfa5,'unitId':_0x3d17cd,'content':_0x470e43,'mention':_0x275e47},_0x40cf21=await this[_0x2bc2a2(0x1ee)][_0x2bc2a2(0x1eb)](_0x2bc2a2(0x246)+_0x3d17cd+'/add',{'body':_0x3e9f6d});return X(_0x40cf21['body'][_0x2bc2a2(0x212)],_0x1e62d1);}}async['updateComment'](_0x1540be){const _0x506d55=_0x15a028;var _0xd41fd8,_0x30ed62;const {text:_0xd55881,unitId:_0x42ed27}=_0x1540be,_0x3c9b3e=(_0x30ed62=(_0xd41fd8=_0xd55881[_0x506d55(0x216)])==null?void 0x0:_0xd41fd8[_0x506d55(0x202)](_0x143cba=>_0x143cba[_0x506d55(0x238)]===_0xe13e7a[_0x506d55(0x248)])[_0x506d55(0x230)](_0x155e31=>_0x155e31['rangeId']))!=null?_0x30ed62:[],_0x5ef6ef=JSON['stringify'](_0xd55881),_0x5b6e85=_0x1540be[_0x506d55(0x236)],_0x247a28=_0x1540be['id'],_0x3ce71c={'memberId':(await this[_0x506d55(0x225)][_0x506d55(0x228)](_0x42ed27))['getMemberID'](),'unitId':_0x42ed27,'threadId':_0x5b6e85,'mention':_0x3c9b3e,'content':_0x5ef6ef,'replyId':_0x247a28},_0x3ee3b1=await this[_0x506d55(0x1ee)][_0x506d55(0x1eb)]('/universer-api/comment/unit/'+_0x42ed27+_0x506d55(0x209),{'body':_0x3ce71c});return!_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)]||_0x3ee3b1[_0x506d55(0x220)][_0x506d55(0x217)][_0x506d55(0x24b)]===0x1;}async[_0x15a028(0x22f)](_0x47e431){const _0x1bac14=_0x15a028,{unitId:_0x349677}=_0x47e431,_0x35a8cd=_0x47e431['threadId'],_0xf401f6={'memberId':this[_0x1bac14(0x1f6)][_0x1bac14(0x20f)]()[_0x1bac14(0x21d)],'unitId':_0x349677,'threadId':_0x35a8cd,'solved':_0x47e431[_0x1bac14(0x22a)]?I[_0x1bac14(0x241)]:I[_0x1bac14(0x232)]},_0x10ede0=await this['_httpService'][_0x1bac14(0x1eb)](_0x1bac14(0x246)+_0x349677+_0x1bac14(0x240),{'body':_0xf401f6});return!_0x10ede0[_0x1bac14(0x220)][_0x1bac14(0x217)]||_0x10ede0['body'][_0x1bac14(0x217)]['code']===0x1;}async[_0x15a028(0x23e)](_0x13b291,_0x547e19,_0x24df7a,_0x505396){const _0x34822c=_0x15a028,_0x2bd46c={'memberId':(await this['_sessionService'][_0x34822c(0x228)](_0x13b291))[_0x34822c(0x24c)](),'threadId':_0x24df7a,'replyId':_0x505396,'unitId':_0x13b291},_0x18983b=await this['_httpService'][_0x34822c(0x1eb)](_0x34822c(0x246)+_0x13b291+_0x34822c(0x1f3),{'body':_0x2bd46c});return!_0x18983b['body'][_0x34822c(0x217)]||_0x18983b['body'][_0x34822c(0x217)][_0x34822c(0x24b)]===0x1;}async[_0x15a028(0x21b)](_0x4fb704,_0x55465e,_0x4e6b7d){const _0x44e10c=_0x15a028,_0x451e1f={'unitId':_0x4fb704,'threadId':_0x4e6b7d},_0xaae836=await this[_0x44e10c(0x1ee)][_0x44e10c(0x1eb)](_0x44e10c(0x246)+_0x4fb704+_0x44e10c(0x213),{'body':_0x451e1f}),_0x599682=_0x4e6b7d[_0x44e10c(0x230)](_0x2f8663=>ee(_0xaae836['body'][_0x44e10c(0x226)][_0x2f8663],_0x4fb704,_0x55465e))[_0x44e10c(0x202)](Boolean);return Object[_0x44e10c(0x245)](_0xaae836[_0x44e10c(0x220)][_0x44e10c(0x244)])[_0x44e10c(0x20e)](_0x39fce7=>{const _0x4a95bf=_0x44e10c;this['_userService'][_0x4a95bf(0x239)](_0x39fce7);}),_0x599682;}[_0x15a028(0x1f1)](_0x136eea){const _0x49a926=_0x15a028;return{'id':_0x136eea['id'],'threadId':_0x136eea[_0x49a926(0x236)],'ref':_0x136eea[_0x49a926(0x22c)]};}};f=Q([_(0x0,_0x5cfd2a(_0xeb8e79)),_(0x1,_0x5cfd2a(_0x1f607e)),_(0x2,_0x5cfd2a(_0x8a85c4)),_(0x3,_0x5cfd2a(_0x4e2d06))],f);var re=Object[_0x15a028(0x214)],te=(_0x297f5a,_0x383edc,_0x21f41f,_0x44bff1)=>{const _0x372a4a=_0x15a028;for(var _0x3d0fe6=_0x44bff1>0x1?void 0x0:_0x44bff1?re(_0x383edc,_0x21f41f):_0x383edc,_0x1deb8a=_0x297f5a[_0x372a4a(0x227)]-0x1,_0x5bfacc;_0x1deb8a>=0x0;_0x1deb8a--)(_0x5bfacc=_0x297f5a[_0x1deb8a])&&(_0x3d0fe6=_0x5bfacc(_0x3d0fe6)||_0x3d0fe6);return _0x3d0fe6;},N=(_0x42a13c,_0x5afb17)=>(_0x5991b9,_0x30b8d6)=>_0x5afb17(_0x5991b9,_0x30b8d6,_0x42a13c);let g=class extends _0x4ffcbe{constructor(_0xac065,_0x2d5f9a){const _0x3fc0d7=_0x15a028;super(),this[_0x3fc0d7(0x22b)]=_0xac065,this[_0x3fc0d7(0x1f2)]=_0x2d5f9a,this[_0x3fc0d7(0x23c)]();}[_0x15a028(0x23c)](){const _0x390636=_0x15a028;this['_threadCommentDataSourceService'][_0x390636(0x221)]=this[_0x390636(0x1f2)],this[_0x390636(0x22b)][_0x390636(0x21f)]=!0x1;}};g=te([N(0x0,_0x34f453),N(0x1,_0x5cfd2a(f))],g);var se=Object[_0x15a028(0x223)],oe=Object[_0x15a028(0x214)],ne=(_0x4caba2,_0xf1668f,_0x50b268)=>_0xf1668f in _0x4caba2?se(_0x4caba2,_0xf1668f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x50b268}):_0x4caba2[_0xf1668f]=_0x50b268,ie=(_0x4a9327,_0x231092,_0x203039,_0x210d85)=>{const _0x384c27=_0x15a028;for(var _0x4db634=_0x210d85>0x1?void 0x0:_0x210d85?oe(_0x231092,_0x203039):_0x231092,_0x4c5760=_0x4a9327[_0x384c27(0x227)]-0x1,_0x41b266;_0x4c5760>=0x0;_0x4c5760--)(_0x41b266=_0x4a9327[_0x4c5760])&&(_0x4db634=_0x41b266(_0x4db634)||_0x4db634);return _0x4db634;},w=(_0x51bf6b,_0x359e15)=>(_0x2a48bf,_0x4f82e9)=>_0x359e15(_0x2a48bf,_0x4f82e9,_0x51bf6b),$=(_0x36deb2,_0x4a3c14,_0x54282c)=>ne(_0x36deb2,typeof _0x4a3c14!=_0x15a028(0x1ea)?_0x4a3c14+'':_0x4a3c14,_0x54282c);let b=class extends _0x46fc63{constructor(_0x208264=M,_0x383125,_0x12c1ee){const _0x5e708c=_0x15a028;super(),this[_0x5e708c(0x1ec)]=_0x208264,this[_0x5e708c(0x206)]=_0x383125,this[_0x5e708c(0x237)]=_0x12c1ee;const {..._0x204bc9}=_0x5609b0({},M,this[_0x5e708c(0x1ec)]);this[_0x5e708c(0x237)]['setConfig'](z,_0x204bc9);}[_0x15a028(0x1fc)](){const _0x343e31=_0x15a028;[[f],[g],[S]][_0x343e31(0x20e)](_0x17c3fb=>{const _0x3b3475=_0x343e31;this[_0x3b3475(0x206)]['add'](_0x17c3fb);});}['onReady'](){const _0x555ca7=_0x15a028;this[_0x555ca7(0x206)]['get'](g),this[_0x555ca7(0x206)][_0x555ca7(0x222)](S);}};$(b,'pluginName',W),$(b,_0x15a028(0x229),_0x4632e5[_0x15a028(0x200)]),b=ie([_0x3b7993(_0x3dd618,_0x267342,_0x1782a3),w(0x1,_0x5cfd2a(_0x4e2d06)),w(0x2,_0x58de89)],b);function _0x3d91(){const _0x2a5ca8=['60XKBcEi','_httpService','6312770ThZRQA','format','saveCommentToSnapshot','_threadCommentDataSource','/delete','user','replies','_userService','Unknown','unitId','replyId','userId','30147620cxmuVf','onStarting','6102KmNmPP','reply','6702282XfFiIl','UNIVER_UNKNOWN','/reply','filter','2MqYPUF','Solve','_threadCommentModel','_injector','getComment','YYYY/MM/DD\x20HH:mm','/edit','disposeWithMe','_init','add','solved','forEach','getCurrentUser','root','commentUpdate$','comment','/list','getOwnPropertyDescriptor','content','customRanges','error','Reply','find','getUnit','listComments','addComment','userID','6128nhZOdV','syncUpdateMutationToColla','body','dataSource','get','defineProperty','UNRECOGNIZED','_sessionService','comments','length','requireSession','type','resolved','_threadCommentDataSourceService','ref','_initUserSync','parse','resolveComment','map','/universer-api/user/list','OpenOrReOpen','Delete','1138032zoXGOq','thread-comment-data-source.config','threadId','_configService','rangeType','addUser','stringify','Edit','_initDataSource','getUser','deleteComment','updateComment','/solved','Solved','delete','createTimestamp','users','values','/universer-api/comment/unit/','Add','COMMENT','rangeId','_commentService','code','getMemberID','size','185937OQYARM','188291ezGVyn','subscribe','symbol','post','_config'];_0x3d91=function(){return _0x2a5ca8;};return _0x3d91();}export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x947c7a=_0x32b7;(function(_0x1be8fc,_0x2b7d58){const _0x3e50f7=_0x32b7,_0x191590=_0x1be8fc();while(!![]){try{const _0x604f93=-parseInt(_0x3e50f7(0xef))/0x1+-parseInt(_0x3e50f7(0xdc))/0x2*(parseInt(_0x3e50f7(0x91))/0x3)+parseInt(_0x3e50f7(0xd2))/0x4*(-parseInt(_0x3e50f7(0xe8))/0x5)+-parseInt(_0x3e50f7(0xbe))/0x6+parseInt(_0x3e50f7(0xab))/0x7*(parseInt(_0x3e50f7(0xe6))/0x8)+-parseInt(_0x3e50f7(0xa8))/0x9+-parseInt(_0x3e50f7(0x92))/0xa*(-parseInt(_0x3e50f7(0x94))/0xb);if(_0x604f93===_0x2b7d58)break;else _0x191590['push'](_0x191590['shift']());}catch(_0x1604e7){_0x191590['push'](_0x191590['shift']());}}}(_0x281c,0x93ce2));import{CommentService as _0x14b70a,CollaborationSessionService as _0x2c99d4,UniverCollaborationClientPlugin as _0x32ec4d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x33fe54}from'@univerjs-pro/license';import{dayjs as _0xfce144,UserManagerService as _0x6997ae,Inject as _0x45baf3,Injector as _0x2dd7cd,Disposable as _0x184533,CustomRangeType as _0x5cc40f,UniverInstanceType as _0x58d1d0,DependentOn as _0x3b1b27,IConfigService as _0x400041,Plugin as _0x2cc18b,merge as _0x1f14fb}from'@univerjs/core';function _0x32b7(_0x3b55d0,_0x2648cc){const _0x281cf3=_0x281c();return _0x32b7=function(_0x32b75f,_0x5f0e9b){_0x32b75f=_0x32b75f-0x8f;let _0x24b2e4=_0x281cf3[_0x32b75f];return _0x24b2e4;},_0x32b7(_0x3b55d0,_0x2648cc);}import{UniverThreadCommentUIPlugin as _0x2646aa}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3b3dbf,IThreadCommentDataSourceService as _0x23a6ff}from'@univerjs/thread-comment';import{bufferTime as _0x4a06d2}from'rxjs';import{HTTPService as _0x4dd32b}from'@univerjs/network';const W=_0x947c7a(0xb2);var I=(_0x1826e6=>(_0x1826e6[_0x1826e6[_0x947c7a(0xcf)]=0x0]=_0x947c7a(0xcf),_0x1826e6[_0x1826e6['Solved']=0x1]=_0x947c7a(0x9f),_0x1826e6[_0x1826e6[_0x947c7a(0xa6)]=-0x1]=_0x947c7a(0xa6),_0x1826e6))(I||{}),v=(_0x4ed1d9=>(_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xa0)]=0x0]=_0x947c7a(0xa0),_0x4ed1d9[_0x4ed1d9['Add']=0x1]=_0x947c7a(0xb0),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xea)]=0x2]=_0x947c7a(0xea),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xd4)]=0x3]=_0x947c7a(0xd4),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xe1)]=0x4]=_0x947c7a(0xe1),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xda)]=0x5]=_0x947c7a(0xda),_0x4ed1d9[_0x4ed1d9[_0x947c7a(0xa6)]=-0x1]=_0x947c7a(0xa6),_0x4ed1d9))(v||{});const D=_0x5e3a06=>_0xfce144(new Date(+_0x5e3a06))['format'](_0x947c7a(0xae)),B=async(_0x33695e,_0x2e20aa)=>{const _0x441ad1=_0x947c7a,_0x182bae=_0x33695e[_0x441ad1(0xc9)](_0x6997ae),_0x204b60=_0x33695e[_0x441ad1(0xc9)](_0x4dd32b);_0x2e20aa[_0x441ad1(0xc8)](_0x4ad854=>{_0x182bae['getUser'](_0x4ad854)&&_0x2e20aa['delete'](_0x4ad854);}),_0x2e20aa['size']&&(await _0x204b60[_0x441ad1(0xc9)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2e20aa]}}))[_0x441ad1(0xee)][_0x441ad1(0xa7)][_0x441ad1(0xc8)](_0x3ab8ae=>{const _0x5ef783=_0x441ad1;_0x3ab8ae&&_0x182bae[_0x5ef783(0x95)](_0x3ab8ae);});};var K=Object[_0x947c7a(0x98)],V=(_0x474c75,_0x4aec02,_0x15283c,_0x5bb152)=>{const _0x2e0bec=_0x947c7a;for(var _0xb17ebb=_0x5bb152>0x1?void 0x0:_0x5bb152?K(_0x4aec02,_0x15283c):_0x4aec02,_0x18cbb5=_0x474c75[_0x2e0bec(0xeb)]-0x1,_0x254626;_0x18cbb5>=0x0;_0x18cbb5--)(_0x254626=_0x474c75[_0x18cbb5])&&(_0xb17ebb=_0x254626(_0xb17ebb)||_0xb17ebb);return _0xb17ebb;},p=(_0x5838c4,_0x402421)=>(_0x5d2e5a,_0x55fb39)=>_0x402421(_0x5d2e5a,_0x55fb39,_0x5838c4);let S=class extends _0x184533{constructor(_0x173f48,_0x345f33,_0x539f99,_0x352ade){const _0x5278da=_0x947c7a;super(),this[_0x5278da(0x9b)]=_0x173f48,this[_0x5278da(0xd6)]=_0x345f33,this[_0x5278da(0xc2)]=_0x539f99,this['_injector']=_0x352ade,this[_0x5278da(0xc7)](),this['_initUserSync']();}[_0x947c7a(0xe2)](){const _0x1c6d4c=_0x947c7a;this[_0x1c6d4c(0x97)](this[_0x1c6d4c(0xd6)][_0x1c6d4c(0xa5)][_0x1c6d4c(0xbb)](_0x4a06d2(0x10))[_0x1c6d4c(0xb3)](_0x16befe=>{const _0x2e6f55=new Set();_0x16befe['forEach'](_0x2e09e5=>{const _0x6fa9a3=_0x32b7;switch(_0x2e09e5[_0x6fa9a3(0x93)]){case _0x6fa9a3(0xb8):{const _0x8fe9e4=_0x2e09e5[_0x6fa9a3(0xaa)][_0x6fa9a3(0xad)];_0x2e6f55['add'](_0x8fe9e4);break;}}}),B(this['_injector'],_0x2e6f55);}));}['_init'](){const _0x43f05a=_0x947c7a;this['disposeWithMe'](this[_0x43f05a(0x9b)][_0x43f05a(0xa5)][_0x43f05a(0xb3)](async _0x2bc7c7=>{const _0x4d9040=_0x43f05a;var _0x4714d0,_0x1de676,_0x348b09,_0x1b2aa3;const _0x14c584=(_0x4714d0=this['_threadCommentModel'][_0x4d9040(0x9c)](_0x2bc7c7[_0x4d9040(0x96)])[_0x4d9040(0xb6)](_0x3df0f7=>_0x3df0f7[_0x4d9040(0xdb)]===_0x2bc7c7[_0x4d9040(0xdb)]))==null?void 0x0:_0x4714d0[_0x4d9040(0x8f)];if(!_0x14c584)return;const {unitId:_0x2895a4,subUnitId:_0x29accf}=_0x14c584;switch(_0x2bc7c7[_0x4d9040(0xbd)]&&this[_0x4d9040(0xc2)][_0x4d9040(0x95)](_0x2bc7c7[_0x4d9040(0xbd)]),_0x2bc7c7['type']){case v['Add']:break;case v['Reply']:{this['_threadCommentModel']['addComment'](_0x2895a4,_0x29accf,{'unitId':_0x2895a4,'subUnitId':_0x29accf,'ref':'','id':_0x2bc7c7[_0x4d9040(0xbc)],'dT':D(+_0x2bc7c7['createTimestamp']),'threadId':_0x2bc7c7[_0x4d9040(0xdb)],'personId':(_0x348b09=(_0x1de676=_0x2bc7c7[_0x4d9040(0xbd)])==null?void 0x0:_0x1de676[_0x4d9040(0xc3)])!=null?_0x348b09:_0x2bc7c7[_0x4d9040(0xaf)],'text':JSON[_0x4d9040(0xb7)](_0x2bc7c7[_0x4d9040(0xb1)]),'parentId':_0x14c584['id']});break;}case v[_0x4d9040(0xe1)]:{const _0x3375d1=this[_0x4d9040(0xd6)][_0x4d9040(0x9a)](_0x2895a4,_0x29accf,_0x2bc7c7[_0x4d9040(0xbc)]);_0x3375d1&&_0x3375d1['parentId']&&this[_0x4d9040(0xd6)][_0x4d9040(0xd0)](_0x2895a4,_0x29accf,_0x2bc7c7[_0x4d9040(0xbc)]);break;}case v['Edit']:{this[_0x4d9040(0xd6)][_0x4d9040(0xb4)](_0x2895a4,_0x29accf,{'commentId':_0x2bc7c7['replyId'],'text':JSON[_0x4d9040(0xb7)](_0x2bc7c7[_0x4d9040(0xb1)])});break;}case v[_0x4d9040(0xda)]:{const _0x4a6fe6=(_0x1b2aa3=this[_0x4d9040(0xd6)][_0x4d9040(0x9c)](_0x2bc7c7[_0x4d9040(0x96)])[_0x4d9040(0xb6)](_0x1fc192=>_0x1fc192[_0x4d9040(0xdb)]===_0x2bc7c7[_0x4d9040(0xdb)]))==null?void 0x0:_0x1b2aa3[_0x4d9040(0x8f)];_0x4a6fe6&&this['_threadCommentModel'][_0x4d9040(0x90)](_0x2895a4,_0x29accf,_0x4a6fe6['id'],_0x2bc7c7[_0x4d9040(0xc6)]===I[_0x4d9040(0x9f)]);break;}}}));}};S=V([p(0x0,_0x45baf3(_0x14b70a)),p(0x1,_0x45baf3(_0x3b3dbf)),p(0x2,_0x45baf3(_0x6997ae)),p(0x3,_0x45baf3(_0x2dd7cd))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x947c7a(0x98)],Q=(_0x5b5d90,_0x1eb7b2,_0x8c510,_0x44d69f)=>{const _0x2a3eab=_0x947c7a;for(var _0x447bef=_0x44d69f>0x1?void 0x0:_0x44d69f?k(_0x1eb7b2,_0x8c510):_0x1eb7b2,_0x5d61a4=_0x5b5d90[_0x2a3eab(0xeb)]-0x1,_0x15738a;_0x5d61a4>=0x0;_0x5d61a4--)(_0x15738a=_0x5b5d90[_0x5d61a4])&&(_0x447bef=_0x15738a(_0x447bef)||_0x447bef);return _0x447bef;},_=(_0x4dbc2c,_0x4c6a88)=>(_0x278281,_0x6ccbf1)=>_0x4c6a88(_0x278281,_0x6ccbf1,_0x4dbc2c);function X(_0x497ce1,_0x48908a){const _0xd70c07=_0x947c7a,_0x417cdd=_0x497ce1[_0xd70c07(0xba)][0x0];return{..._0x48908a,'id':_0x417cdd[_0xd70c07(0xbc)],'resolved':_0x497ce1[_0xd70c07(0xc6)]===0x1,'dT':D(_0x417cdd[_0xd70c07(0xa1)]),'personId':_0x417cdd[_0xd70c07(0xaf)],'threadId':_0x417cdd[_0xd70c07(0xdb)]};}function ee(_0x6dd644,_0x290f49,_0x5921c5){const _0x19d1d8=_0x947c7a;var _0x177220,_0x1e5cad;if(((_0x1e5cad=(_0x177220=_0x6dd644==null?void 0x0:_0x6dd644[_0x19d1d8(0xba)])==null?void 0x0:_0x177220[_0x19d1d8(0xeb)])!=null?_0x1e5cad:0x0)>0x0){const _0x821314=(_0x2c4ac8,_0x2b602b)=>({'id':_0x2c4ac8['replyId'],'threadId':_0x2c4ac8['threadId'],'dT':D(_0x2c4ac8[_0x19d1d8(0xa1)]),'personId':_0x2c4ac8[_0x19d1d8(0xaf)],'resolved':_0x6dd644['solved']===I[_0x19d1d8(0x9f)],'unitId':_0x290f49,'subUnitId':_0x5921c5,'text':JSON['parse'](_0x2c4ac8[_0x19d1d8(0xb1)]),'parentId':_0x2b602b}),_0x50a709=_0x821314(_0x6dd644['replies'][0x0]);return{..._0x50a709,'children':_0x6dd644[_0x19d1d8(0xba)][_0x19d1d8(0xed)](0x1)['map'](_0x36f6ae=>_0x821314(_0x36f6ae,_0x50a709['id']))};}return null;}function _0x281c(){const _0x366393=['post','Delete','_initUserSync','rangeType','map','code','1432IYNujg','rangeId','551695sUTDUL','requireSession','Reply','length','values','slice','body','184849GWGcjM','root','resolveComment','2248617hFtfdw','18591330WGTJiw','type','11szCjyl','addUser','unitId','disposeWithMe','getOwnPropertyDescriptor','resolved','getComment','_commentService','getUnit','/edit','getMemberID','Solved','Unknown','createTimestamp','dataSource','/add','_configService','commentUpdate$','UNRECOGNIZED','users','4047849LLAlMU','_httpService','payload','44961qooGHd','_threadCommentDataSource','personId','YYYY/MM/DD\x20HH:mm','userId','Add','content','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','subscribe','updateComment','/reply','find','parse','add','_threadCommentDataSourceService','replies','pipe','replyId','user','3467610ObRIaY','_sessionService','_config','/delete','_userService','userID','syncUpdateMutationToColla','/solved','solved','_init','forEach','get','customRanges','_injector','stringify','comments','COMMENT','OpenOrReOpen','deleteComment','/universer-api/comment/unit/','16MCwTNn','onStarting','Edit','/list','_threadCommentModel','error','defineProperty','ref','Solve','threadId','2dtzhux','filter','setConfig','comment'];_0x281c=function(){return _0x366393;};return _0x281c();}let f=class{constructor(_0x5dd7b9,_0x146aba,_0x46698a,_0x1bbfac){const _0x24d629=_0x947c7a;this[_0x24d629(0xa9)]=_0x5dd7b9,this[_0x24d629(0xc2)]=_0x146aba,this[_0x24d629(0xbf)]=_0x46698a,this[_0x24d629(0xcb)]=_0x1bbfac;}async['addComment'](_0xba73ff){const _0x5ced45=_0x947c7a;var _0x4a36fe,_0xd7a7da;const {parentId:_0x5f5c63,unitId:_0x1e42fa,text:_0xc4e0a8,threadId:_0x457e1e}=_0xba73ff,_0x2d74e2=(_0xd7a7da=(_0x4a36fe=_0xc4e0a8['customRanges'])==null?void 0x0:_0x4a36fe[_0x5ced45(0xdd)](_0x4ea6af=>_0x4ea6af[_0x5ced45(0xe3)]===_0x5cc40f[_0x5ced45(0xce)])[_0x5ced45(0xe4)](_0x1db21c=>_0x1db21c[_0x5ced45(0xe7)]))!=null?_0xd7a7da:[],_0x55ddc4=JSON[_0x5ced45(0xcc)](_0xc4e0a8),_0x458419=(await this[_0x5ced45(0xbf)][_0x5ced45(0xe9)](_0x1e42fa))['getMemberID']();if(_0x5f5c63){const _0x314340={'memberId':_0x458419,'unitId':_0x1e42fa,'content':_0x55ddc4,'mention':_0x2d74e2,'threadId':_0x457e1e},_0x1f41ef=(await this[_0x5ced45(0xa9)][_0x5ced45(0xe0)](_0x5ced45(0xd1)+_0x1e42fa+_0x5ced45(0xb5),{'body':_0x314340}))[_0x5ced45(0xee)]['reply'];return{..._0xba73ff,'id':_0x1f41ef['replyId'],'dT':_0xfce144(+_0x1f41ef[_0x5ced45(0xa1)])['format'](_0x5ced45(0xae)),'personId':_0x1f41ef[_0x5ced45(0xaf)]};}else{const _0x644199={'memberId':_0x458419,'unitId':_0x1e42fa,'content':_0x55ddc4,'mention':_0x2d74e2},_0x5cac32=await this[_0x5ced45(0xa9)][_0x5ced45(0xe0)]('/universer-api/comment/unit/'+_0x1e42fa+_0x5ced45(0xa3),{'body':_0x644199});return X(_0x5cac32[_0x5ced45(0xee)][_0x5ced45(0xdf)],_0xba73ff);}}async[_0x947c7a(0xb4)](_0xa3146a){const _0x8f0cb2=_0x947c7a;var _0x51f11b,_0x5211d3;const {text:_0x105440,unitId:_0x4b884d}=_0xa3146a,_0x1ee4ea=(_0x5211d3=(_0x51f11b=_0x105440[_0x8f0cb2(0xca)])==null?void 0x0:_0x51f11b[_0x8f0cb2(0xdd)](_0x4a2769=>_0x4a2769[_0x8f0cb2(0xe3)]===_0x5cc40f[_0x8f0cb2(0xce)])[_0x8f0cb2(0xe4)](_0x2b1a3f=>_0x2b1a3f[_0x8f0cb2(0xe7)]))!=null?_0x5211d3:[],_0xce53a1=JSON[_0x8f0cb2(0xcc)](_0x105440),_0x5620fd=_0xa3146a[_0x8f0cb2(0xdb)],_0x3e3764=_0xa3146a['id'],_0x4e8964={'memberId':(await this[_0x8f0cb2(0xbf)][_0x8f0cb2(0xe9)](_0x4b884d))[_0x8f0cb2(0x9e)](),'unitId':_0x4b884d,'threadId':_0x5620fd,'mention':_0x1ee4ea,'content':_0xce53a1,'replyId':_0x3e3764},_0x1b9e71=await this[_0x8f0cb2(0xa9)][_0x8f0cb2(0xe0)](_0x8f0cb2(0xd1)+_0x4b884d+_0x8f0cb2(0x9d),{'body':_0x4e8964});return!_0x1b9e71['body']['error']||_0x1b9e71[_0x8f0cb2(0xee)]['error']['code']===0x1;}async[_0x947c7a(0x90)](_0x1a7dbe){const _0x1230ec=_0x947c7a,{unitId:_0x31993e}=_0x1a7dbe,_0xd43ce8=_0x1a7dbe[_0x1230ec(0xdb)],_0x3ea08c={'memberId':this[_0x1230ec(0xc2)]['getCurrentUser']()[_0x1230ec(0xc3)],'unitId':_0x31993e,'threadId':_0xd43ce8,'solved':_0x1a7dbe[_0x1230ec(0x99)]?I[_0x1230ec(0x9f)]:I['OpenOrReOpen']},_0x2556b3=await this['_httpService'][_0x1230ec(0xe0)](_0x1230ec(0xd1)+_0x31993e+_0x1230ec(0xc5),{'body':_0x3ea08c});return!_0x2556b3[_0x1230ec(0xee)][_0x1230ec(0xd7)]||_0x2556b3[_0x1230ec(0xee)][_0x1230ec(0xd7)][_0x1230ec(0xe5)]===0x1;}async['deleteComment'](_0x47dd11,_0x1c567b,_0x360443,_0x3dee4a){const _0x33a7ef=_0x947c7a,_0x524573={'memberId':(await this['_sessionService'][_0x33a7ef(0xe9)](_0x47dd11))[_0x33a7ef(0x9e)](),'threadId':_0x360443,'replyId':_0x3dee4a,'unitId':_0x47dd11},_0x55b8ec=await this['_httpService'][_0x33a7ef(0xe0)](_0x33a7ef(0xd1)+_0x47dd11+_0x33a7ef(0xc1),{'body':_0x524573});return!_0x55b8ec['body'][_0x33a7ef(0xd7)]||_0x55b8ec[_0x33a7ef(0xee)]['error'][_0x33a7ef(0xe5)]===0x1;}async['listComments'](_0x427b09,_0x4e2131,_0x333f55){const _0x427fe0=_0x947c7a,_0x28f252={'unitId':_0x427b09,'threadId':_0x333f55},_0xfce509=await this[_0x427fe0(0xa9)][_0x427fe0(0xe0)](_0x427fe0(0xd1)+_0x427b09+_0x427fe0(0xd5),{'body':_0x28f252}),_0x82b18b=_0x333f55[_0x427fe0(0xe4)](_0x46efb0=>ee(_0xfce509[_0x427fe0(0xee)][_0x427fe0(0xcd)][_0x46efb0],_0x427b09,_0x4e2131))['filter'](Boolean);return Object[_0x427fe0(0xec)](_0xfce509[_0x427fe0(0xee)][_0x427fe0(0xa7)])[_0x427fe0(0xc8)](_0x260e06=>{const _0x50a02b=_0x427fe0;this[_0x50a02b(0xc2)][_0x50a02b(0x95)](_0x260e06);}),_0x82b18b;}['saveCommentToSnapshot'](_0x5e0e99){const _0xa26654=_0x947c7a;return{'id':_0x5e0e99['id'],'threadId':_0x5e0e99[_0xa26654(0xdb)],'ref':_0x5e0e99[_0xa26654(0xd9)]};}};f=Q([_(0x0,_0x45baf3(_0x4dd32b)),_(0x1,_0x45baf3(_0x6997ae)),_(0x2,_0x45baf3(_0x2c99d4)),_(0x3,_0x45baf3(_0x2dd7cd))],f);var re=Object[_0x947c7a(0x98)],te=(_0x8e955f,_0x52b672,_0x2dbf7e,_0x529b22)=>{const _0xefd0d9=_0x947c7a;for(var _0x580e8c=_0x529b22>0x1?void 0x0:_0x529b22?re(_0x52b672,_0x2dbf7e):_0x52b672,_0x352f5a=_0x8e955f[_0xefd0d9(0xeb)]-0x1,_0x48dab9;_0x352f5a>=0x0;_0x352f5a--)(_0x48dab9=_0x8e955f[_0x352f5a])&&(_0x580e8c=_0x48dab9(_0x580e8c)||_0x580e8c);return _0x580e8c;},N=(_0x3acfd6,_0x7a137c)=>(_0x566f34,_0x58522f)=>_0x7a137c(_0x566f34,_0x58522f,_0x3acfd6);let g=class extends _0x184533{constructor(_0x3aa539,_0x2ac7bb){const _0x45520f=_0x947c7a;super(),this[_0x45520f(0xb9)]=_0x3aa539,this['_threadCommentDataSource']=_0x2ac7bb,this['_initDataSource']();}['_initDataSource'](){const _0x24a663=_0x947c7a;this[_0x24a663(0xb9)][_0x24a663(0xa2)]=this[_0x24a663(0xac)],this[_0x24a663(0xb9)][_0x24a663(0xc4)]=!0x1;}};g=te([N(0x0,_0x23a6ff),N(0x1,_0x45baf3(f))],g);var se=Object[_0x947c7a(0xd8)],oe=Object[_0x947c7a(0x98)],ne=(_0x255c27,_0x36b8ef,_0x1c552c)=>_0x36b8ef in _0x255c27?se(_0x255c27,_0x36b8ef,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1c552c}):_0x255c27[_0x36b8ef]=_0x1c552c,ie=(_0x2cf46e,_0x16407f,_0x20b13e,_0x583653)=>{const _0xf5035c=_0x947c7a;for(var _0x37f91c=_0x583653>0x1?void 0x0:_0x583653?oe(_0x16407f,_0x20b13e):_0x16407f,_0x2573a5=_0x2cf46e[_0xf5035c(0xeb)]-0x1,_0x27caaf;_0x2573a5>=0x0;_0x2573a5--)(_0x27caaf=_0x2cf46e[_0x2573a5])&&(_0x37f91c=_0x27caaf(_0x37f91c)||_0x37f91c);return _0x37f91c;},w=(_0x3954ea,_0x4d91e9)=>(_0x362932,_0x1ff659)=>_0x4d91e9(_0x362932,_0x1ff659,_0x3954ea),$=(_0x45f22d,_0x5a72b0,_0x562c2c)=>ne(_0x45f22d,typeof _0x5a72b0!='symbol'?_0x5a72b0+'':_0x5a72b0,_0x562c2c);let b=class extends _0x2cc18b{constructor(_0x51abc6=M,_0x578328,_0x47eaa3){const _0x559099=_0x947c7a;super(),this[_0x559099(0xc0)]=_0x51abc6,this[_0x559099(0xcb)]=_0x578328,this['_configService']=_0x47eaa3;const {..._0x38b629}=_0x1f14fb({},M,this[_0x559099(0xc0)]);this[_0x559099(0xa4)][_0x559099(0xde)](z,_0x38b629);}[_0x947c7a(0xd3)](){const _0x19f682=_0x947c7a;[[f],[g],[S]][_0x19f682(0xc8)](_0x3d5aef=>{const _0x55f59e=_0x19f682;this[_0x55f59e(0xcb)][_0x55f59e(0xb8)](_0x3d5aef);});}['onReady'](){const _0x5222d7=_0x947c7a;this[_0x5222d7(0xcb)][_0x5222d7(0xc9)](g),this[_0x5222d7(0xcb)][_0x5222d7(0xc9)](S);}};$(b,'pluginName',W),$(b,_0x947c7a(0x93),_0x58d1d0['UNIVER_UNKNOWN']),b=ie([_0x3b1b27(_0x2646aa,_0x32ec4d,_0x33fe54),w(0x1,_0x45baf3(_0x2dd7cd)),w(0x2,_0x400041)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x19dcb5,_0x5003c7){const _0x4f641a=_0xd8b8,_0x29b86c=_0x19dcb5();while(!![]){try{const _0x5b989c=parseInt(_0x4f641a(0x15d))/0x1+parseInt(_0x4f641a(0x104))/0x2*(-parseInt(_0x4f641a(0x10b))/0x3)+parseInt(_0x4f641a(0x135))/0x4+parseInt(_0x4f641a(0x169))/0x5+parseInt(_0x4f641a(0x16d))/0x6*(parseInt(_0x4f641a(0x122))/0x7)+parseInt(_0x4f641a(0x129))/0x8+-parseInt(_0x4f641a(0x109))/0x9;if(_0x5b989c===_0x5003c7)break;else _0x29b86c['push'](_0x29b86c['shift']());}catch(_0x24ad45){_0x29b86c['push'](_0x29b86c['shift']());}}}(_0x5cfd,0x1afba),function(_0x12f55c,_0x43c4f8){const _0x13f89a=_0xd8b8;typeof exports==_0x13f89a(0x147)&&typeof module<'u'?_0x43c4f8(exports,require(_0x13f89a(0x113)),require(_0x13f89a(0x11e)),require(_0x13f89a(0x138)),require(_0x13f89a(0x126)),require(_0x13f89a(0x178)),require(_0x13f89a(0x12b)),require(_0x13f89a(0x127))):typeof define==_0x13f89a(0x10c)&&define['amd']?define(['exports',_0x13f89a(0x113),'@univerjs-pro/license',_0x13f89a(0x138),_0x13f89a(0x126),'@univerjs/thread-comment',_0x13f89a(0x12b),'@univerjs/network'],_0x43c4f8):(_0x12f55c=typeof globalThis<'u'?globalThis:_0x12f55c||self,_0x43c4f8(_0x12f55c['UniverProThreadCommentDatasource']={},_0x12f55c[_0x13f89a(0xfa)],_0x12f55c['UniverProLicense'],_0x12f55c[_0x13f89a(0x118)],_0x12f55c[_0x13f89a(0x106)],_0x12f55c[_0x13f89a(0xfb)],_0x12f55c[_0x13f89a(0x12b)],_0x12f55c[_0x13f89a(0x157)]));}(this,function(_0x5c21b9,_0x1a8adc,_0x4ce85d,_0x383e05,_0x2ba6e9,_0x3587e2,_0x3d9b0e,_0x1cf243){'use strict';const _0x161f25=_0xd8b8;const _0x5bcb87=_0x161f25(0x11a);var _0x5a7e30=(_0x11939d=>(_0x11939d[_0x11939d[_0x161f25(0x168)]=0x0]=_0x161f25(0x168),_0x11939d[_0x11939d['Solved']=0x1]=_0x161f25(0x12f),_0x11939d[_0x11939d[_0x161f25(0x10d)]=-0x1]=_0x161f25(0x10d),_0x11939d))(_0x5a7e30||{}),_0x4df7a0=(_0x27d005=>(_0x27d005[_0x27d005['Unknown']=0x0]='Unknown',_0x27d005[_0x27d005[_0x161f25(0x15e)]=0x1]=_0x161f25(0x15e),_0x27d005[_0x27d005['Reply']=0x2]=_0x161f25(0x155),_0x27d005[_0x27d005['Edit']=0x3]=_0x161f25(0x16b),_0x27d005[_0x27d005[_0x161f25(0x16f)]=0x4]='Delete',_0x27d005[_0x27d005[_0x161f25(0x179)]=0x5]='Solve',_0x27d005[_0x27d005[_0x161f25(0x10d)]=-0x1]='UNRECOGNIZED',_0x27d005))(_0x4df7a0||{});const _0x40085c=_0x18871d=>_0x383e05[_0x161f25(0x144)](new Date(+_0x18871d))[_0x161f25(0x145)](_0x161f25(0x14c)),_0x12bed1=async(_0x492122,_0x40ff47)=>{const _0x1d5b2f=_0x161f25,_0x330f1f=_0x492122['get'](_0x383e05[_0x1d5b2f(0x100)]),_0x21beda=_0x492122[_0x1d5b2f(0x165)](_0x1cf243[_0x1d5b2f(0x177)]);_0x40ff47['forEach'](_0x5105b0=>{const _0x526268=_0x1d5b2f;_0x330f1f[_0x526268(0x153)](_0x5105b0)&&_0x40ff47[_0x526268(0x173)](_0x5105b0);}),_0x40ff47['size']&&(await _0x21beda[_0x1d5b2f(0x165)]('/universer-api/user/list',{'params':{'userIDs':[..._0x40ff47]}}))[_0x1d5b2f(0x137)][_0x1d5b2f(0x151)][_0x1d5b2f(0x132)](_0x7cc756=>{const _0x3300e8=_0x1d5b2f;_0x7cc756&&_0x330f1f[_0x3300e8(0x12d)](_0x7cc756);});};var _0x2bf5c5=Object[_0x161f25(0x11d)],_0x75b723=(_0x458d03,_0x4c9d82,_0x43a57e,_0x44911b)=>{for(var _0xe1fe61=_0x44911b>0x1?void 0x0:_0x44911b?_0x2bf5c5(_0x4c9d82,_0x43a57e):_0x4c9d82,_0x1a0ea8=_0x458d03['length']-0x1,_0x529559;_0x1a0ea8>=0x0;_0x1a0ea8--)(_0x529559=_0x458d03[_0x1a0ea8])&&(_0xe1fe61=_0x529559(_0xe1fe61)||_0xe1fe61);return _0xe1fe61;},_0xf6834f=(_0xf3474,_0x3dacb3)=>(_0x493086,_0x5520bb)=>_0x3dacb3(_0x493086,_0x5520bb,_0xf3474);let _0x19f978=class extends _0x383e05[_0x161f25(0x14a)]{constructor(_0x166168,_0x323c41,_0x3d1f13,_0x3565b1){const _0x2be80c=_0x161f25;super(),this[_0x2be80c(0x111)]=_0x166168,this['_threadCommentModel']=_0x323c41,this[_0x2be80c(0x13c)]=_0x3d1f13,this[_0x2be80c(0x152)]=_0x3565b1,this[_0x2be80c(0x164)](),this['_initUserSync']();}[_0x161f25(0x176)](){const _0x56d4a0=_0x161f25;this[_0x56d4a0(0x123)](this[_0x56d4a0(0x16a)][_0x56d4a0(0x13b)]['pipe'](_0x3d9b0e['bufferTime'](0x10))[_0x56d4a0(0x136)](_0xa2430b=>{const _0x1af93c=_0x56d4a0,_0x1eb58e=new Set();_0xa2430b[_0x1af93c(0x132)](_0x1ea280=>{const _0x1edc0f=_0x1af93c;switch(_0x1ea280[_0x1edc0f(0x128)]){case _0x1edc0f(0xff):{const _0x5ee0e1=_0x1ea280[_0x1edc0f(0x10f)][_0x1edc0f(0x10e)];_0x1eb58e[_0x1edc0f(0xff)](_0x5ee0e1);break;}}}),_0x12bed1(this[_0x1af93c(0x152)],_0x1eb58e);}));}[_0x161f25(0x164)](){const _0x2a16ef=_0x161f25;this[_0x2a16ef(0x123)](this[_0x2a16ef(0x111)][_0x2a16ef(0x13b)][_0x2a16ef(0x136)](async _0x23bf23=>{const _0x184f43=_0x2a16ef;var _0x17668d,_0x31884a,_0x29f10a,_0x55dcad;const _0x88996e=(_0x17668d=this[_0x184f43(0x16a)][_0x184f43(0x120)](_0x23bf23[_0x184f43(0x146)])[_0x184f43(0x163)](_0x24517a=>_0x24517a[_0x184f43(0x13d)]===_0x23bf23[_0x184f43(0x13d)]))==null?void 0x0:_0x17668d['root'];if(!_0x88996e)return;const {unitId:_0x14f308,subUnitId:_0x431d3d}=_0x88996e;switch(_0x23bf23[_0x184f43(0x130)]&&this['_userService'][_0x184f43(0x12d)](_0x23bf23['user']),_0x23bf23['type']){case _0x4df7a0['Add']:break;case _0x4df7a0['Reply']:{this[_0x184f43(0x16a)][_0x184f43(0xfe)](_0x14f308,_0x431d3d,{'unitId':_0x14f308,'subUnitId':_0x431d3d,'ref':'','id':_0x23bf23[_0x184f43(0x116)],'dT':_0x40085c(+_0x23bf23[_0x184f43(0x108)]),'threadId':_0x23bf23[_0x184f43(0x13d)],'personId':(_0x29f10a=(_0x31884a=_0x23bf23[_0x184f43(0x130)])==null?void 0x0:_0x31884a['userID'])!=null?_0x29f10a:_0x23bf23[_0x184f43(0x103)],'text':JSON[_0x184f43(0x10a)](_0x23bf23[_0x184f43(0x13a)]),'parentId':_0x88996e['id']});break;}case _0x4df7a0[_0x184f43(0x16f)]:{const _0x5322c2=this[_0x184f43(0x16a)]['getComment'](_0x14f308,_0x431d3d,_0x23bf23[_0x184f43(0x116)]);_0x5322c2&&_0x5322c2['parentId']&&this[_0x184f43(0x16a)][_0x184f43(0x172)](_0x14f308,_0x431d3d,_0x23bf23[_0x184f43(0x116)]);break;}case _0x4df7a0[_0x184f43(0x16b)]:{this[_0x184f43(0x16a)]['updateComment'](_0x14f308,_0x431d3d,{'commentId':_0x23bf23['replyId'],'text':JSON[_0x184f43(0x10a)](_0x23bf23[_0x184f43(0x13a)])});break;}case _0x4df7a0[_0x184f43(0x179)]:{const _0x7f02b1=(_0x55dcad=this[_0x184f43(0x16a)][_0x184f43(0x120)](_0x23bf23[_0x184f43(0x146)])['find'](_0xf06458=>_0xf06458[_0x184f43(0x13d)]===_0x23bf23['threadId']))==null?void 0x0:_0x55dcad['root'];_0x7f02b1&&this['_threadCommentModel'][_0x184f43(0x12e)](_0x14f308,_0x431d3d,_0x7f02b1['id'],_0x23bf23[_0x184f43(0x142)]===_0x5a7e30['Solved']);break;}}}));}};_0x19f978=_0x75b723([_0xf6834f(0x0,_0x383e05[_0x161f25(0x102)](_0x1a8adc[_0x161f25(0x161)])),_0xf6834f(0x1,_0x383e05[_0x161f25(0x102)](_0x3587e2['ThreadCommentModel'])),_0xf6834f(0x2,_0x383e05['Inject'](_0x383e05['UserManagerService'])),_0xf6834f(0x3,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)]))],_0x19f978);const _0xb78c8e='thread-comment-data-source.config',_0x1be899={};var _0x1a92e3=Object['getOwnPropertyDescriptor'],_0x4657c8=(_0x189540,_0x3167d4,_0x283627,_0x46a4be)=>{const _0xa6992a=_0x161f25;for(var _0x193640=_0x46a4be>0x1?void 0x0:_0x46a4be?_0x1a92e3(_0x3167d4,_0x283627):_0x3167d4,_0x4dd968=_0x189540[_0xa6992a(0x162)]-0x1,_0x4832e2;_0x4dd968>=0x0;_0x4dd968--)(_0x4832e2=_0x189540[_0x4dd968])&&(_0x193640=_0x4832e2(_0x193640)||_0x193640);return _0x193640;},_0x1d05fe=(_0x34e74f,_0x594343)=>(_0x4f5397,_0xba05b3)=>_0x594343(_0x4f5397,_0xba05b3,_0x34e74f);function _0x483b39(_0x4ec857,_0x4f616a){const _0x420c75=_0x161f25,_0x25fd10=_0x4ec857[_0x420c75(0x131)][0x0];return{..._0x4f616a,'id':_0x25fd10[_0x420c75(0x116)],'resolved':_0x4ec857[_0x420c75(0x142)]===0x1,'dT':_0x40085c(_0x25fd10['createTimestamp']),'personId':_0x25fd10[_0x420c75(0x103)],'threadId':_0x25fd10[_0x420c75(0x13d)]};}function _0x11e7e9(_0xce931d,_0x43772e,_0x1a23b8){const _0xbeab23=_0x161f25;var _0x154852,_0x1e4b75;if(((_0x1e4b75=(_0x154852=_0xce931d==null?void 0x0:_0xce931d['replies'])==null?void 0x0:_0x154852[_0xbeab23(0x162)])!=null?_0x1e4b75:0x0)>0x0){const _0x5be567=(_0x512f60,_0x21fb42)=>({'id':_0x512f60['replyId'],'threadId':_0x512f60['threadId'],'dT':_0x40085c(_0x512f60[_0xbeab23(0x108)]),'personId':_0x512f60[_0xbeab23(0x103)],'resolved':_0xce931d[_0xbeab23(0x142)]===_0x5a7e30[_0xbeab23(0x12f)],'unitId':_0x43772e,'subUnitId':_0x1a23b8,'text':JSON[_0xbeab23(0x10a)](_0x512f60[_0xbeab23(0x13a)]),'parentId':_0x21fb42}),_0x2e381e=_0x5be567(_0xce931d[_0xbeab23(0x131)][0x0]);return{..._0x2e381e,'children':_0xce931d['replies'][_0xbeab23(0x159)](0x1)['map'](_0x4372cd=>_0x5be567(_0x4372cd,_0x2e381e['id']))};}return null;}let _0x1a6ec0=class{constructor(_0x30553e,_0x138299,_0x6e20a6,_0x60ced8){const _0x2bce5c=_0x161f25;this[_0x2bce5c(0x13f)]=_0x30553e,this[_0x2bce5c(0x13c)]=_0x138299,this[_0x2bce5c(0x115)]=_0x6e20a6,this[_0x2bce5c(0x152)]=_0x60ced8;}async[_0x161f25(0xfe)](_0x5da4a1){const _0x55afee=_0x161f25;var _0x56e4c0,_0x276f3b;const {parentId:_0x16f94e,unitId:_0x2f602f,text:_0x21aca8,threadId:_0x453526}=_0x5da4a1,_0x5f4468=(_0x276f3b=(_0x56e4c0=_0x21aca8[_0x55afee(0xfd)])==null?void 0x0:_0x56e4c0[_0x55afee(0x174)](_0x10f5d8=>_0x10f5d8[_0x55afee(0x166)]===_0x383e05[_0x55afee(0x156)][_0x55afee(0x119)])[_0x55afee(0x12c)](_0x1e4378=>_0x1e4378[_0x55afee(0x15b)]))!=null?_0x276f3b:[],_0x3557c8=JSON[_0x55afee(0x158)](_0x21aca8),_0x365a82=(await this['_sessionService'][_0x55afee(0x15a)](_0x2f602f))[_0x55afee(0x139)]();if(_0x16f94e){const _0x36aca4={'memberId':_0x365a82,'unitId':_0x2f602f,'content':_0x3557c8,'mention':_0x5f4468,'threadId':_0x453526},_0x3ffa56=(await this['_httpService'][_0x55afee(0x15f)](_0x55afee(0x14e)+_0x2f602f+'/reply',{'body':_0x36aca4}))[_0x55afee(0x137)][_0x55afee(0x141)];return{..._0x5da4a1,'id':_0x3ffa56[_0x55afee(0x116)],'dT':_0x383e05[_0x55afee(0x144)](+_0x3ffa56['createTimestamp'])[_0x55afee(0x145)](_0x55afee(0x14c)),'personId':_0x3ffa56['userId']};}else{const _0x1d17a8={'memberId':_0x365a82,'unitId':_0x2f602f,'content':_0x3557c8,'mention':_0x5f4468},_0x3a4691=await this['_httpService'][_0x55afee(0x15f)](_0x55afee(0x14e)+_0x2f602f+_0x55afee(0x13e),{'body':_0x1d17a8});return _0x483b39(_0x3a4691['body'][_0x55afee(0x14f)],_0x5da4a1);}}async['updateComment'](_0x5c0097){const _0xa847ad=_0x161f25;var _0x4b2fc4,_0x45c551;const {text:_0xff7475,unitId:_0x4d3436}=_0x5c0097,_0x4bc1e4=(_0x45c551=(_0x4b2fc4=_0xff7475[_0xa847ad(0xfd)])==null?void 0x0:_0x4b2fc4[_0xa847ad(0x174)](_0x4a7414=>_0x4a7414['rangeType']===_0x383e05[_0xa847ad(0x156)][_0xa847ad(0x119)])['map'](_0x29c931=>_0x29c931['rangeId']))!=null?_0x45c551:[],_0x7920b6=JSON[_0xa847ad(0x158)](_0xff7475),_0x330541=_0x5c0097[_0xa847ad(0x13d)],_0xb0e858=_0x5c0097['id'],_0x446224={'memberId':(await this[_0xa847ad(0x115)]['requireSession'](_0x4d3436))[_0xa847ad(0x139)](),'unitId':_0x4d3436,'threadId':_0x330541,'mention':_0x4bc1e4,'content':_0x7920b6,'replyId':_0xb0e858},_0xb9821b=await this[_0xa847ad(0x13f)]['post'](_0xa847ad(0x14e)+_0x4d3436+'/edit',{'body':_0x446224});return!_0xb9821b[_0xa847ad(0x137)]['error']||_0xb9821b[_0xa847ad(0x137)][_0xa847ad(0x101)]['code']===0x1;}async[_0x161f25(0x12e)](_0x1ac5c1){const _0x1d9859=_0x161f25,{unitId:_0x556f22}=_0x1ac5c1,_0x2ac2a9=_0x1ac5c1[_0x1d9859(0x13d)],_0x268b40={'memberId':this[_0x1d9859(0x13c)][_0x1d9859(0x112)]()[_0x1d9859(0x171)],'unitId':_0x556f22,'threadId':_0x2ac2a9,'solved':_0x1ac5c1[_0x1d9859(0x15c)]?_0x5a7e30['Solved']:_0x5a7e30[_0x1d9859(0x168)]},_0x403035=await this[_0x1d9859(0x13f)][_0x1d9859(0x15f)](_0x1d9859(0x14e)+_0x556f22+'/solved',{'body':_0x268b40});return!_0x403035['body'][_0x1d9859(0x101)]||_0x403035['body'][_0x1d9859(0x101)]['code']===0x1;}async[_0x161f25(0x172)](_0x1a6488,_0x4f063d,_0x4b5f49,_0x2cb2b1){const _0x513941=_0x161f25,_0x53b86c={'memberId':(await this['_sessionService'][_0x513941(0x15a)](_0x1a6488))['getMemberID'](),'threadId':_0x4b5f49,'replyId':_0x2cb2b1,'unitId':_0x1a6488},_0x1e8d70=await this[_0x513941(0x13f)][_0x513941(0x15f)](_0x513941(0x14e)+_0x1a6488+_0x513941(0x110),{'body':_0x53b86c});return!_0x1e8d70[_0x513941(0x137)][_0x513941(0x101)]||_0x1e8d70[_0x513941(0x137)][_0x513941(0x101)]['code']===0x1;}async['listComments'](_0x404b5f,_0x59bc4f,_0x2acad2){const _0x5af83d=_0x161f25,_0x341f98={'unitId':_0x404b5f,'threadId':_0x2acad2},_0x5d2d54=await this[_0x5af83d(0x13f)]['post'](_0x5af83d(0x14e)+_0x404b5f+'/list',{'body':_0x341f98}),_0x35bf45=_0x2acad2[_0x5af83d(0x12c)](_0x43530c=>_0x11e7e9(_0x5d2d54[_0x5af83d(0x137)][_0x5af83d(0x140)][_0x43530c],_0x404b5f,_0x59bc4f))[_0x5af83d(0x174)](Boolean);return Object[_0x5af83d(0x149)](_0x5d2d54[_0x5af83d(0x137)][_0x5af83d(0x151)])[_0x5af83d(0x132)](_0x221990=>{const _0x561ffe=_0x5af83d;this[_0x561ffe(0x13c)][_0x561ffe(0x12d)](_0x221990);}),_0x35bf45;}[_0x161f25(0x16e)](_0x3b1468){const _0x373431=_0x161f25;return{'id':_0x3b1468['id'],'threadId':_0x3b1468[_0x373431(0x13d)],'ref':_0x3b1468[_0x373431(0xfc)]};}};_0x1a6ec0=_0x4657c8([_0x1d05fe(0x0,_0x383e05['Inject'](_0x1cf243[_0x161f25(0x177)])),_0x1d05fe(0x1,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x100)])),_0x1d05fe(0x2,_0x383e05[_0x161f25(0x102)](_0x1a8adc[_0x161f25(0x150)])),_0x1d05fe(0x3,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)]))],_0x1a6ec0);var _0x594411=Object['getOwnPropertyDescriptor'],_0x2777ed=(_0x303caa,_0x1d67ee,_0x1fa75d,_0x160319)=>{const _0x37ea89=_0x161f25;for(var _0xf9ac50=_0x160319>0x1?void 0x0:_0x160319?_0x594411(_0x1d67ee,_0x1fa75d):_0x1d67ee,_0x712dbe=_0x303caa[_0x37ea89(0x162)]-0x1,_0x2f0093;_0x712dbe>=0x0;_0x712dbe--)(_0x2f0093=_0x303caa[_0x712dbe])&&(_0xf9ac50=_0x2f0093(_0xf9ac50)||_0xf9ac50);return _0xf9ac50;},_0x30e29a=(_0x29336b,_0x51c9f1)=>(_0x3b8d5f,_0x40313d)=>_0x51c9f1(_0x3b8d5f,_0x40313d,_0x29336b);let _0x53c45d=class extends _0x383e05['Disposable']{constructor(_0x453851,_0x1ad0d7){const _0x5e9948=_0x161f25;super(),this[_0x5e9948(0x133)]=_0x453851,this[_0x5e9948(0x107)]=_0x1ad0d7,this[_0x5e9948(0x105)]();}[_0x161f25(0x105)](){const _0x5cf4c2=_0x161f25;this[_0x5cf4c2(0x133)][_0x5cf4c2(0x12a)]=this['_threadCommentDataSource'],this[_0x5cf4c2(0x133)][_0x5cf4c2(0x16c)]=!0x1;}};_0x53c45d=_0x2777ed([_0x30e29a(0x0,_0x3587e2[_0x161f25(0x11c)]),_0x30e29a(0x1,_0x383e05[_0x161f25(0x102)](_0x1a6ec0))],_0x53c45d);var _0x23e2b0=Object[_0x161f25(0x117)],_0x1074aa=Object[_0x161f25(0x11d)],_0xefd8d5=(_0x1da67e,_0x21fe53,_0x2507e1)=>_0x21fe53 in _0x1da67e?_0x23e2b0(_0x1da67e,_0x21fe53,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2507e1}):_0x1da67e[_0x21fe53]=_0x2507e1,_0x1ec4a3=(_0xaeef33,_0x530bbc,_0x3b7154,_0x14232a)=>{for(var _0x3369dd=_0x14232a>0x1?void 0x0:_0x14232a?_0x1074aa(_0x530bbc,_0x3b7154):_0x530bbc,_0x321c2a=_0xaeef33['length']-0x1,_0x162e8a;_0x321c2a>=0x0;_0x321c2a--)(_0x162e8a=_0xaeef33[_0x321c2a])&&(_0x3369dd=_0x162e8a(_0x3369dd)||_0x3369dd);return _0x3369dd;},_0x3bb426=(_0x715390,_0x304e75)=>(_0x2075a9,_0x3c4c91)=>_0x304e75(_0x2075a9,_0x3c4c91,_0x715390),_0x3b36cd=(_0x9283e8,_0x471066,_0x6ece6c)=>_0xefd8d5(_0x9283e8,typeof _0x471066!='symbol'?_0x471066+'':_0x471066,_0x6ece6c);_0x5c21b9[_0x161f25(0x134)]=class extends _0x383e05[_0x161f25(0x11f)]{constructor(_0x4b8b21=_0x1be899,_0x328df4,_0xd935e4){const _0x1f206=_0x161f25;super(),this[_0x1f206(0x14d)]=_0x4b8b21,this[_0x1f206(0x152)]=_0x328df4,this['_configService']=_0xd935e4;const {..._0x393109}=_0x383e05[_0x1f206(0x125)]({},_0x1be899,this[_0x1f206(0x14d)]);this[_0x1f206(0x143)]['setConfig'](_0xb78c8e,_0x393109);}[_0x161f25(0x121)](){const _0x434961=_0x161f25;[[_0x1a6ec0],[_0x53c45d],[_0x19f978]][_0x434961(0x132)](_0x21fe9c=>{const _0x4e0fbb=_0x434961;this[_0x4e0fbb(0x152)][_0x4e0fbb(0xff)](_0x21fe9c);});}[_0x161f25(0x148)](){const _0x3c35fa=_0x161f25;this[_0x3c35fa(0x152)]['get'](_0x53c45d),this[_0x3c35fa(0x152)][_0x3c35fa(0x165)](_0x19f978);}},_0x3b36cd(_0x5c21b9[_0x161f25(0x134)],_0x161f25(0x170),_0x5bcb87),_0x3b36cd(_0x5c21b9[_0x161f25(0x134)],_0x161f25(0x128),_0x383e05['UniverInstanceType'][_0x161f25(0x14b)]),_0x5c21b9['UniverThreadCommentDataSourcePlugin']=_0x1ec4a3([_0x383e05['DependentOn'](_0x2ba6e9[_0x161f25(0x11b)],_0x1a8adc[_0x161f25(0x154)],_0x4ce85d[_0x161f25(0x175)]),_0x3bb426(0x1,_0x383e05[_0x161f25(0x102)](_0x383e05[_0x161f25(0x124)])),_0x3bb426(0x2,_0x383e05[_0x161f25(0x167)])],_0x5c21b9[_0x161f25(0x134)]),Object[_0x161f25(0x117)](_0x5c21b9,Symbol[_0x161f25(0x160)],{'value':_0x161f25(0x114)});}));function _0xd8b8(_0x47285c,_0x4d0857){const _0x5cfd8a=_0x5cfd();return _0xd8b8=function(_0xd8b827,_0x202e3f){_0xd8b827=_0xd8b827-0xfa;let _0x4c4e53=_0x5cfd8a[_0xd8b827];return _0x4c4e53;},_0xd8b8(_0x47285c,_0x4d0857);}function _0x5cfd(){const _0x413871=['_commentService','getCurrentUser','@univerjs-pro/collaboration-client','Module','_sessionService','replyId','defineProperty','UniverCore','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverThreadCommentUIPlugin','IThreadCommentDataSourceService','getOwnPropertyDescriptor','@univerjs-pro/license','Plugin','getUnit','onStarting','7AXPssr','disposeWithMe','Injector','merge','@univerjs/thread-comment-ui','@univerjs/network','type','68960DSeCKM','dataSource','rxjs','map','addUser','resolveComment','Solved','user','replies','forEach','_threadCommentDataSourceService','UniverThreadCommentDataSourcePlugin','287328oBFOch','subscribe','body','@univerjs/core','getMemberID','content','commentUpdate$','_userService','threadId','/add','_httpService','comments','reply','solved','_configService','dayjs','format','unitId','object','onReady','values','Disposable','UNIVER_UNKNOWN','YYYY/MM/DD\x20HH:mm','_config','/universer-api/comment/unit/','comment','CollaborationSessionService','users','_injector','getUser','UniverCollaborationClientPlugin','Reply','CustomRangeType','UniverNetwork','stringify','slice','requireSession','rangeId','resolved','80651adwlVh','Add','post','toStringTag','CommentService','length','find','_init','get','rangeType','IConfigService','OpenOrReOpen','805085FwnQzw','_threadCommentModel','Edit','syncUpdateMutationToColla','1253634pixIkM','saveCommentToSnapshot','Delete','pluginName','userID','deleteComment','delete','filter','UniverLicensePlugin','_initUserSync','HTTPService','@univerjs/thread-comment','Solve','UniverProCollaborationClient','UniverThreadComment','ref','customRanges','addComment','add','UserManagerService','error','Inject','userId','490oRAwUx','_initDataSource','UniverThreadCommentUi','_threadCommentDataSource','createTimestamp','3690018mGWSOX','parse','129KALhUb','function','UNRECOGNIZED','personId','payload','/delete'];_0x5cfd=function(){return _0x413871;};return _0x5cfd();}
1
+ (function(_0x5b3084,_0x44da40){const _0x36e4ff=_0x329f,_0x465471=_0x5b3084();while(!![]){try{const _0x569c8f=parseInt(_0x36e4ff(0x1e0))/0x1+-parseInt(_0x36e4ff(0x1b9))/0x2+-parseInt(_0x36e4ff(0x1b8))/0x3*(-parseInt(_0x36e4ff(0x1bf))/0x4)+-parseInt(_0x36e4ff(0x22e))/0x5+parseInt(_0x36e4ff(0x1d3))/0x6+parseInt(_0x36e4ff(0x214))/0x7+-parseInt(_0x36e4ff(0x212))/0x8;if(_0x569c8f===_0x44da40)break;else _0x465471['push'](_0x465471['shift']());}catch(_0x2f475f){_0x465471['push'](_0x465471['shift']());}}}(_0x3138,0x61e02),function(_0xb5807b,_0x198bcc){const _0xfd3852=_0x329f;typeof exports==_0xfd3852(0x22c)&&typeof module<'u'?_0x198bcc(exports,require(_0xfd3852(0x1cf)),require(_0xfd3852(0x1c6)),require(_0xfd3852(0x202)),require(_0xfd3852(0x204)),require(_0xfd3852(0x219)),require(_0xfd3852(0x210)),require(_0xfd3852(0x1e5))):typeof define==_0xfd3852(0x233)&&define[_0xfd3852(0x1f9)]?define([_0xfd3852(0x1ba),_0xfd3852(0x1cf),_0xfd3852(0x1c6),_0xfd3852(0x202),_0xfd3852(0x204),'@univerjs/thread-comment','rxjs',_0xfd3852(0x1e5)],_0x198bcc):(_0xb5807b=typeof globalThis<'u'?globalThis:_0xb5807b||self,_0x198bcc(_0xb5807b['UniverProThreadCommentDatasource']={},_0xb5807b['UniverProCollaborationClient'],_0xb5807b[_0xfd3852(0x1f6)],_0xb5807b[_0xfd3852(0x1d9)],_0xb5807b[_0xfd3852(0x209)],_0xb5807b[_0xfd3852(0x1c1)],_0xb5807b[_0xfd3852(0x210)],_0xb5807b[_0xfd3852(0x207)]));}(this,function(_0x42b55f,_0x3db436,_0x1ed23f,_0x254a2d,_0xddbfcb,_0x3621ab,_0x3d47db,_0x2ed19){'use strict';const _0xb1842c=_0x329f;const _0x3bd04f=_0xb1842c(0x1cb);var _0x8bbca6=(_0x19d295=>(_0x19d295[_0x19d295[_0xb1842c(0x20a)]=0x0]=_0xb1842c(0x20a),_0x19d295[_0x19d295['Solved']=0x1]=_0xb1842c(0x1e9),_0x19d295[_0x19d295[_0xb1842c(0x1ff)]=-0x1]=_0xb1842c(0x1ff),_0x19d295))(_0x8bbca6||{}),_0x12184c=(_0x22143e=>(_0x22143e[_0x22143e[_0xb1842c(0x1fd)]=0x0]=_0xb1842c(0x1fd),_0x22143e[_0x22143e[_0xb1842c(0x1f4)]=0x1]='Add',_0x22143e[_0x22143e['Reply']=0x2]=_0xb1842c(0x227),_0x22143e[_0x22143e[_0xb1842c(0x201)]=0x3]='Edit',_0x22143e[_0x22143e[_0xb1842c(0x218)]=0x4]='Delete',_0x22143e[_0x22143e[_0xb1842c(0x1b6)]=0x5]=_0xb1842c(0x1b6),_0x22143e[_0x22143e['UNRECOGNIZED']=-0x1]=_0xb1842c(0x1ff),_0x22143e))(_0x12184c||{});const _0xc15a92=_0x37676d=>_0x254a2d[_0xb1842c(0x234)](new Date(+_0x37676d))[_0xb1842c(0x1e6)]('YYYY/MM/DD\x20HH:mm'),_0x52a979=async(_0x396bd6,_0x174115)=>{const _0x2288ac=_0xb1842c,_0x94072b=_0x396bd6['get'](_0x254a2d['UserManagerService']),_0x406bfb=_0x396bd6[_0x2288ac(0x1cc)](_0x2ed19[_0x2288ac(0x211)]);_0x174115[_0x2288ac(0x1ea)](_0x5f1e3e=>{const _0x1931de=_0x2288ac;_0x94072b['getUser'](_0x5f1e3e)&&_0x174115[_0x1931de(0x213)](_0x5f1e3e);}),_0x174115[_0x2288ac(0x1de)]&&(await _0x406bfb[_0x2288ac(0x1cc)](_0x2288ac(0x200),{'params':{'userIDs':[..._0x174115]}}))['body']['users'][_0x2288ac(0x1ea)](_0x160078=>{const _0xcb2c3e=_0x2288ac;_0x160078&&_0x94072b[_0xcb2c3e(0x1c3)](_0x160078);});};var _0x63dfe8=Object[_0xb1842c(0x23a)],_0x825401=(_0x331127,_0x40e683,_0x2887b6,_0x385b3b)=>{const _0x2c3d41=_0xb1842c;for(var _0x5334cf=_0x385b3b>0x1?void 0x0:_0x385b3b?_0x63dfe8(_0x40e683,_0x2887b6):_0x40e683,_0x48d9f7=_0x331127[_0x2c3d41(0x1d2)]-0x1,_0x2abe8b;_0x48d9f7>=0x0;_0x48d9f7--)(_0x2abe8b=_0x331127[_0x48d9f7])&&(_0x5334cf=_0x2abe8b(_0x5334cf)||_0x5334cf);return _0x5334cf;},_0x1dc11b=(_0x500b97,_0x1d56cb)=>(_0x2c570b,_0x2279b3)=>_0x1d56cb(_0x2c570b,_0x2279b3,_0x500b97);let _0x4366cf=class extends _0x254a2d[_0xb1842c(0x206)]{constructor(_0x522e07,_0x5d76c8,_0x3bc5cf,_0x5dca5f){const _0x2a0265=_0xb1842c;super(),this['_commentService']=_0x522e07,this[_0x2a0265(0x1db)]=_0x5d76c8,this[_0x2a0265(0x22f)]=_0x3bc5cf,this[_0x2a0265(0x1e4)]=_0x5dca5f,this[_0x2a0265(0x20f)](),this['_initUserSync']();}[_0xb1842c(0x1d7)](){const _0x8130ea=_0xb1842c;this[_0x8130ea(0x1e8)](this[_0x8130ea(0x1db)]['commentUpdate$'][_0x8130ea(0x1d1)](_0x3d47db[_0x8130ea(0x1e1)](0x10))[_0x8130ea(0x1fa)](_0x5f0012=>{const _0x5d2a90=_0x8130ea,_0x2c1830=new Set();_0x5f0012[_0x5d2a90(0x1ea)](_0x4c2baa=>{const _0xb7f0a3=_0x5d2a90;switch(_0x4c2baa[_0xb7f0a3(0x205)]){case _0xb7f0a3(0x221):{const _0x1e44cc=_0x4c2baa[_0xb7f0a3(0x1c8)][_0xb7f0a3(0x239)];_0x2c1830[_0xb7f0a3(0x221)](_0x1e44cc);break;}}}),_0x52a979(this[_0x5d2a90(0x1e4)],_0x2c1830);}));}['_init'](){const _0x3bb3db=_0xb1842c;this[_0x3bb3db(0x1e8)](this['_commentService'][_0x3bb3db(0x1d6)][_0x3bb3db(0x1fa)](async _0x4fa380=>{const _0x4d1491=_0x3bb3db;var _0x55f2e6,_0x1587df,_0xda7a9f,_0x572b95;const _0x752fed=(_0x55f2e6=this[_0x4d1491(0x1db)][_0x4d1491(0x1fc)](_0x4fa380[_0x4d1491(0x1d8)])['find'](_0x4cf73a=>_0x4cf73a[_0x4d1491(0x229)]===_0x4fa380[_0x4d1491(0x229)]))==null?void 0x0:_0x55f2e6[_0x4d1491(0x22a)];if(!_0x752fed)return;const {unitId:_0x19e93f,subUnitId:_0x3ed2b5}=_0x752fed;switch(_0x4fa380[_0x4d1491(0x1ef)]&&this['_userService']['addUser'](_0x4fa380[_0x4d1491(0x1ef)]),_0x4fa380[_0x4d1491(0x205)]){case _0x12184c[_0x4d1491(0x1f4)]:break;case _0x12184c[_0x4d1491(0x227)]:{this[_0x4d1491(0x1db)][_0x4d1491(0x230)](_0x19e93f,_0x3ed2b5,{'unitId':_0x19e93f,'subUnitId':_0x3ed2b5,'ref':'','id':_0x4fa380[_0x4d1491(0x1f0)],'dT':_0xc15a92(+_0x4fa380['createTimestamp']),'threadId':_0x4fa380[_0x4d1491(0x229)],'personId':(_0xda7a9f=(_0x1587df=_0x4fa380[_0x4d1491(0x1ef)])==null?void 0x0:_0x1587df['userID'])!=null?_0xda7a9f:_0x4fa380[_0x4d1491(0x21f)],'text':JSON[_0x4d1491(0x222)](_0x4fa380[_0x4d1491(0x1dd)]),'parentId':_0x752fed['id']});break;}case _0x12184c[_0x4d1491(0x218)]:{const _0xd43a2e=this['_threadCommentModel'][_0x4d1491(0x1cd)](_0x19e93f,_0x3ed2b5,_0x4fa380['replyId']);_0xd43a2e&&_0xd43a2e[_0x4d1491(0x21e)]&&this['_threadCommentModel'][_0x4d1491(0x22d)](_0x19e93f,_0x3ed2b5,_0x4fa380[_0x4d1491(0x1f0)]);break;}case _0x12184c[_0x4d1491(0x201)]:{this[_0x4d1491(0x1db)][_0x4d1491(0x1dc)](_0x19e93f,_0x3ed2b5,{'commentId':_0x4fa380[_0x4d1491(0x1f0)],'text':JSON[_0x4d1491(0x222)](_0x4fa380[_0x4d1491(0x1dd)])});break;}case _0x12184c[_0x4d1491(0x1b6)]:{const _0x2360b2=(_0x572b95=this[_0x4d1491(0x1db)][_0x4d1491(0x1fc)](_0x4fa380['unitId'])['find'](_0x164a91=>_0x164a91[_0x4d1491(0x229)]===_0x4fa380[_0x4d1491(0x229)]))==null?void 0x0:_0x572b95[_0x4d1491(0x22a)];_0x2360b2&&this['_threadCommentModel']['resolveComment'](_0x19e93f,_0x3ed2b5,_0x2360b2['id'],_0x4fa380[_0x4d1491(0x1b5)]===_0x8bbca6[_0x4d1491(0x1e9)]);break;}}}));}};_0x4366cf=_0x825401([_0x1dc11b(0x0,_0x254a2d[_0xb1842c(0x1c4)](_0x3db436[_0xb1842c(0x215)])),_0x1dc11b(0x1,_0x254a2d[_0xb1842c(0x1c4)](_0x3621ab[_0xb1842c(0x232)])),_0x1dc11b(0x2,_0x254a2d[_0xb1842c(0x1c4)](_0x254a2d[_0xb1842c(0x224)])),_0x1dc11b(0x3,_0x254a2d[_0xb1842c(0x1c4)](_0x254a2d['Injector']))],_0x4366cf);const _0x4aa047='thread-comment-data-source.config',_0x5d8e4a={};var _0x164370=Object[_0xb1842c(0x23a)],_0x2eb92a=(_0x53b49e,_0x2d073a,_0x298617,_0x28dfc8)=>{const _0x2bd40c=_0xb1842c;for(var _0xe4656=_0x28dfc8>0x1?void 0x0:_0x28dfc8?_0x164370(_0x2d073a,_0x298617):_0x2d073a,_0x451ede=_0x53b49e[_0x2bd40c(0x1d2)]-0x1,_0xb5266e;_0x451ede>=0x0;_0x451ede--)(_0xb5266e=_0x53b49e[_0x451ede])&&(_0xe4656=_0xb5266e(_0xe4656)||_0xe4656);return _0xe4656;},_0x3ea2c0=(_0x123419,_0x360c9f)=>(_0xd6894e,_0x1042d2)=>_0x360c9f(_0xd6894e,_0x1042d2,_0x123419);function _0x5cbb3c(_0x5cd617,_0x4b2f7f){const _0x1ae76e=_0xb1842c,_0x3b0a32=_0x5cd617[_0x1ae76e(0x1bb)][0x0];return{..._0x4b2f7f,'id':_0x3b0a32[_0x1ae76e(0x1f0)],'resolved':_0x5cd617['solved']===0x1,'dT':_0xc15a92(_0x3b0a32[_0x1ae76e(0x1e2)]),'personId':_0x3b0a32[_0x1ae76e(0x21f)],'threadId':_0x3b0a32[_0x1ae76e(0x229)]};}function _0x6dcbf7(_0x33ceda,_0x3765c0,_0x3c8fb9){const _0x333af4=_0xb1842c;var _0x2c8a18,_0x336943;if(((_0x336943=(_0x2c8a18=_0x33ceda==null?void 0x0:_0x33ceda['replies'])==null?void 0x0:_0x2c8a18[_0x333af4(0x1d2)])!=null?_0x336943:0x0)>0x0){const _0x38bbbc=(_0x32a30e,_0x2d121e)=>({'id':_0x32a30e[_0x333af4(0x1f0)],'threadId':_0x32a30e[_0x333af4(0x229)],'dT':_0xc15a92(_0x32a30e[_0x333af4(0x1e2)]),'personId':_0x32a30e[_0x333af4(0x21f)],'resolved':_0x33ceda[_0x333af4(0x1b5)]===_0x8bbca6[_0x333af4(0x1e9)],'unitId':_0x3765c0,'subUnitId':_0x3c8fb9,'text':JSON[_0x333af4(0x222)](_0x32a30e[_0x333af4(0x1dd)]),'parentId':_0x2d121e}),_0x2f2212=_0x38bbbc(_0x33ceda[_0x333af4(0x1bb)][0x0]);return{..._0x2f2212,'children':_0x33ceda['replies'][_0x333af4(0x1e3)](0x1)[_0x333af4(0x20d)](_0x4dbc0a=>_0x38bbbc(_0x4dbc0a,_0x2f2212['id']))};}return null;}let _0x11dfcf=class{constructor(_0x5561c3,_0x145ca1,_0x25e170,_0x1a0121){const _0x171bce=_0xb1842c;this['_httpService']=_0x5561c3,this['_userService']=_0x145ca1,this[_0x171bce(0x1f2)]=_0x25e170,this['_injector']=_0x1a0121;}async[_0xb1842c(0x230)](_0x2b023f){const _0x43ea84=_0xb1842c;var _0x5e2f75,_0x3463fa;const {parentId:_0x45254a,unitId:_0x17f9c3,text:_0x4d985f,threadId:_0x56ea31}=_0x2b023f,_0x4c897d=(_0x3463fa=(_0x5e2f75=_0x4d985f[_0x43ea84(0x225)])==null?void 0x0:_0x5e2f75[_0x43ea84(0x1d5)](_0x43cea1=>_0x43cea1[_0x43ea84(0x220)]===_0x254a2d['CustomRangeType'][_0x43ea84(0x1c5)])['map'](_0x2aeb1b=>_0x2aeb1b[_0x43ea84(0x1d4)]))!=null?_0x3463fa:[],_0x50cc97=JSON[_0x43ea84(0x1f5)](_0x4d985f),_0x2534c1=(await this[_0x43ea84(0x1f2)][_0x43ea84(0x1c9)](_0x17f9c3))[_0x43ea84(0x20c)]();if(_0x45254a){const _0x107987={'memberId':_0x2534c1,'unitId':_0x17f9c3,'content':_0x50cc97,'mention':_0x4c897d,'threadId':_0x56ea31},_0x2db7ee=(await this[_0x43ea84(0x1f1)][_0x43ea84(0x1f7)]('/universer-api/comment/unit/'+_0x17f9c3+_0x43ea84(0x236),{'body':_0x107987}))[_0x43ea84(0x1be)][_0x43ea84(0x21b)];return{..._0x2b023f,'id':_0x2db7ee['replyId'],'dT':_0x254a2d[_0x43ea84(0x234)](+_0x2db7ee[_0x43ea84(0x1e2)])[_0x43ea84(0x1e6)](_0x43ea84(0x21c)),'personId':_0x2db7ee[_0x43ea84(0x21f)]};}else{const _0x52d139={'memberId':_0x2534c1,'unitId':_0x17f9c3,'content':_0x50cc97,'mention':_0x4c897d},_0x4e8c66=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x17f9c3+_0x43ea84(0x1ec),{'body':_0x52d139});return _0x5cbb3c(_0x4e8c66[_0x43ea84(0x1be)][_0x43ea84(0x228)],_0x2b023f);}}async[_0xb1842c(0x1dc)](_0x2a9ba3){const _0x1f4b92=_0xb1842c;var _0x4f0cb8,_0x303a41;const {text:_0x4f79c2,unitId:_0x8ded0e}=_0x2a9ba3,_0x5dd122=(_0x303a41=(_0x4f0cb8=_0x4f79c2[_0x1f4b92(0x225)])==null?void 0x0:_0x4f0cb8[_0x1f4b92(0x1d5)](_0x51f095=>_0x51f095[_0x1f4b92(0x220)]===_0x254a2d[_0x1f4b92(0x216)][_0x1f4b92(0x1c5)])[_0x1f4b92(0x20d)](_0x3c31e6=>_0x3c31e6['rangeId']))!=null?_0x303a41:[],_0x2d732c=JSON[_0x1f4b92(0x1f5)](_0x4f79c2),_0x54abfc=_0x2a9ba3['threadId'],_0x381ab1=_0x2a9ba3['id'],_0x405be6={'memberId':(await this[_0x1f4b92(0x1f2)][_0x1f4b92(0x1c9)](_0x8ded0e))['getMemberID'](),'unitId':_0x8ded0e,'threadId':_0x54abfc,'mention':_0x5dd122,'content':_0x2d732c,'replyId':_0x381ab1},_0x5a2392=await this[_0x1f4b92(0x1f1)]['post'](_0x1f4b92(0x1eb)+_0x8ded0e+_0x1f4b92(0x1ed),{'body':_0x405be6});return!_0x5a2392[_0x1f4b92(0x1be)][_0x1f4b92(0x1fe)]||_0x5a2392[_0x1f4b92(0x1be)][_0x1f4b92(0x1fe)][_0x1f4b92(0x1bd)]===0x1;}async[_0xb1842c(0x231)](_0x413d06){const _0x3ba41f=_0xb1842c,{unitId:_0xb6362}=_0x413d06,_0x484401=_0x413d06[_0x3ba41f(0x229)],_0x527930={'memberId':this['_userService']['getCurrentUser']()[_0x3ba41f(0x22b)],'unitId':_0xb6362,'threadId':_0x484401,'solved':_0x413d06[_0x3ba41f(0x1b3)]?_0x8bbca6[_0x3ba41f(0x1e9)]:_0x8bbca6[_0x3ba41f(0x20a)]},_0x4439cb=await this[_0x3ba41f(0x1f1)][_0x3ba41f(0x1f7)](_0x3ba41f(0x1eb)+_0xb6362+_0x3ba41f(0x1c2),{'body':_0x527930});return!_0x4439cb[_0x3ba41f(0x1be)][_0x3ba41f(0x1fe)]||_0x4439cb[_0x3ba41f(0x1be)][_0x3ba41f(0x1fe)][_0x3ba41f(0x1bd)]===0x1;}async[_0xb1842c(0x22d)](_0xcdb8f3,_0x9f98fa,_0x1b639e,_0x45ada2){const _0x425e4f=_0xb1842c,_0x4a6fab={'memberId':(await this['_sessionService'][_0x425e4f(0x1c9)](_0xcdb8f3))['getMemberID'](),'threadId':_0x1b639e,'replyId':_0x45ada2,'unitId':_0xcdb8f3},_0x1e14c7=await this[_0x425e4f(0x1f1)][_0x425e4f(0x1f7)](_0x425e4f(0x1eb)+_0xcdb8f3+'/delete',{'body':_0x4a6fab});return!_0x1e14c7[_0x425e4f(0x1be)][_0x425e4f(0x1fe)]||_0x1e14c7[_0x425e4f(0x1be)][_0x425e4f(0x1fe)]['code']===0x1;}async[_0xb1842c(0x1f3)](_0x337d3c,_0x479bc4,_0x2a0ed0){const _0x5a998a=_0xb1842c,_0x38f9da={'unitId':_0x337d3c,'threadId':_0x2a0ed0},_0x365190=await this[_0x5a998a(0x1f1)]['post'](_0x5a998a(0x1eb)+_0x337d3c+_0x5a998a(0x226),{'body':_0x38f9da}),_0x5c33be=_0x2a0ed0[_0x5a998a(0x20d)](_0x306e2d=>_0x6dcbf7(_0x365190[_0x5a998a(0x1be)][_0x5a998a(0x1d0)][_0x306e2d],_0x337d3c,_0x479bc4))[_0x5a998a(0x1d5)](Boolean);return Object['values'](_0x365190[_0x5a998a(0x1be)]['users'])[_0x5a998a(0x1ea)](_0x36919f=>{this['_userService']['addUser'](_0x36919f);}),_0x5c33be;}['saveCommentToSnapshot'](_0xad01fa){return{'id':_0xad01fa['id'],'threadId':_0xad01fa['threadId'],'ref':_0xad01fa['ref']};}};_0x11dfcf=_0x2eb92a([_0x3ea2c0(0x0,_0x254a2d[_0xb1842c(0x1c4)](_0x2ed19[_0xb1842c(0x211)])),_0x3ea2c0(0x1,_0x254a2d[_0xb1842c(0x1c4)](_0x254a2d[_0xb1842c(0x224)])),_0x3ea2c0(0x2,_0x254a2d[_0xb1842c(0x1c4)](_0x3db436['CollaborationSessionService'])),_0x3ea2c0(0x3,_0x254a2d[_0xb1842c(0x1c4)](_0x254a2d['Injector']))],_0x11dfcf);var _0x510d48=Object[_0xb1842c(0x23a)],_0x368c96=(_0x2c808d,_0x2b6bd2,_0x396330,_0x12346a)=>{const _0x317110=_0xb1842c;for(var _0x533f63=_0x12346a>0x1?void 0x0:_0x12346a?_0x510d48(_0x2b6bd2,_0x396330):_0x2b6bd2,_0x410852=_0x2c808d[_0x317110(0x1d2)]-0x1,_0x307c5a;_0x410852>=0x0;_0x410852--)(_0x307c5a=_0x2c808d[_0x410852])&&(_0x533f63=_0x307c5a(_0x533f63)||_0x533f63);return _0x533f63;},_0x131a1c=(_0x17e28a,_0x1b2a5f)=>(_0x5f1397,_0x1c0d0b)=>_0x1b2a5f(_0x5f1397,_0x1c0d0b,_0x17e28a);let _0x599e24=class extends _0x254a2d[_0xb1842c(0x206)]{constructor(_0x232c1c,_0x33e502){const _0x56d99e=_0xb1842c;super(),this[_0x56d99e(0x203)]=_0x232c1c,this['_threadCommentDataSource']=_0x33e502,this[_0x56d99e(0x1ca)]();}[_0xb1842c(0x1ca)](){const _0x1a04b0=_0xb1842c;this[_0x1a04b0(0x203)][_0x1a04b0(0x1bc)]=this[_0x1a04b0(0x23b)],this[_0x1a04b0(0x203)]['syncUpdateMutationToColla']=!0x1;}};_0x599e24=_0x368c96([_0x131a1c(0x0,_0x3621ab[_0xb1842c(0x1b4)]),_0x131a1c(0x1,_0x254a2d[_0xb1842c(0x1c4)](_0x11dfcf))],_0x599e24);var _0x2deb0f=Object[_0xb1842c(0x20e)],_0xcdf583=Object[_0xb1842c(0x23a)],_0x5baa64=(_0x2dee77,_0x5ec0c4,_0xce93ef)=>_0x5ec0c4 in _0x2dee77?_0x2deb0f(_0x2dee77,_0x5ec0c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xce93ef}):_0x2dee77[_0x5ec0c4]=_0xce93ef,_0xe43cce=(_0x4c536f,_0x17826d,_0x3b59d8,_0x476eef)=>{for(var _0x5c5ec5=_0x476eef>0x1?void 0x0:_0x476eef?_0xcdf583(_0x17826d,_0x3b59d8):_0x17826d,_0x10bd06=_0x4c536f['length']-0x1,_0x3abcff;_0x10bd06>=0x0;_0x10bd06--)(_0x3abcff=_0x4c536f[_0x10bd06])&&(_0x5c5ec5=_0x3abcff(_0x5c5ec5)||_0x5c5ec5);return _0x5c5ec5;},_0x2907c4=(_0x2c5009,_0x5556a0)=>(_0x1dbabc,_0x54f025)=>_0x5556a0(_0x1dbabc,_0x54f025,_0x2c5009),_0x5931b4=(_0x4021b2,_0x1968f2,_0x112c3d)=>_0x5baa64(_0x4021b2,typeof _0x1968f2!=_0xb1842c(0x21d)?_0x1968f2+'':_0x1968f2,_0x112c3d);_0x42b55f[_0xb1842c(0x1b7)]=class extends _0x254a2d[_0xb1842c(0x1c0)]{constructor(_0x19d43e=_0x5d8e4a,_0x271645,_0x3be889){const _0x3d533d=_0xb1842c;super(),this[_0x3d533d(0x237)]=_0x19d43e,this[_0x3d533d(0x1e4)]=_0x271645,this[_0x3d533d(0x235)]=_0x3be889;const {..._0x36a768}=_0x254a2d[_0x3d533d(0x1fb)]({},_0x5d8e4a,this['_config']);this[_0x3d533d(0x235)][_0x3d533d(0x21a)](_0x4aa047,_0x36a768);}[_0xb1842c(0x20b)](){const _0x1740ce=_0xb1842c;[[_0x11dfcf],[_0x599e24],[_0x4366cf]][_0x1740ce(0x1ea)](_0x3b154a=>{const _0x120514=_0x1740ce;this[_0x120514(0x1e4)][_0x120514(0x221)](_0x3b154a);});}[_0xb1842c(0x238)](){const _0x15b66b=_0xb1842c;this[_0x15b66b(0x1e4)]['get'](_0x599e24),this[_0x15b66b(0x1e4)]['get'](_0x4366cf);}},_0x5931b4(_0x42b55f[_0xb1842c(0x1b7)],_0xb1842c(0x208),_0x3bd04f),_0x5931b4(_0x42b55f['UniverThreadCommentDataSourcePlugin'],'type',_0x254a2d[_0xb1842c(0x1e7)][_0xb1842c(0x1ce)]),_0x42b55f[_0xb1842c(0x1b7)]=_0xe43cce([_0x254a2d[_0xb1842c(0x1ee)](_0xddbfcb[_0xb1842c(0x1da)],_0x3db436['UniverCollaborationClientPlugin'],_0x1ed23f[_0xb1842c(0x217)]),_0x2907c4(0x1,_0x254a2d[_0xb1842c(0x1c4)](_0x254a2d[_0xb1842c(0x1c7)])),_0x2907c4(0x2,_0x254a2d[_0xb1842c(0x1df)])],_0x42b55f[_0xb1842c(0x1b7)]),Object[_0xb1842c(0x20e)](_0x42b55f,Symbol[_0xb1842c(0x223)],{'value':_0xb1842c(0x1f8)});}));function _0x329f(_0x1e33dc,_0x461dcb){const _0x313891=_0x3138();return _0x329f=function(_0x329f79,_0x19e504){_0x329f79=_0x329f79-0x1b3;let _0x49ba4f=_0x313891[_0x329f79];return _0x49ba4f;},_0x329f(_0x1e33dc,_0x461dcb);}function _0x3138(){const _0x4e723d=['post','Module','amd','subscribe','merge','getUnit','Unknown','error','UNRECOGNIZED','/universer-api/user/list','Edit','@univerjs/core','_threadCommentDataSourceService','@univerjs/thread-comment-ui','type','Disposable','UniverNetwork','pluginName','UniverThreadCommentUi','OpenOrReOpen','onStarting','getMemberID','map','defineProperty','_init','rxjs','HTTPService','7232448zxifib','delete','5440645EpCuBL','CommentService','CustomRangeType','UniverLicensePlugin','Delete','@univerjs/thread-comment','setConfig','reply','YYYY/MM/DD\x20HH:mm','symbol','parentId','userId','rangeType','add','parse','toStringTag','UserManagerService','customRanges','/list','Reply','comment','threadId','root','userID','object','deleteComment','2749895hDbtYq','_userService','addComment','resolveComment','ThreadCommentModel','function','dayjs','_configService','/reply','_config','onReady','personId','getOwnPropertyDescriptor','_threadCommentDataSource','resolved','IThreadCommentDataSourceService','solved','Solve','UniverThreadCommentDataSourcePlugin','111YAMqNb','345230GuexZZ','exports','replies','dataSource','code','body','8428SvsVhH','Plugin','UniverThreadComment','/solved','addUser','Inject','COMMENT','@univerjs-pro/license','Injector','payload','requireSession','_initDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','getComment','UNIVER_UNKNOWN','@univerjs-pro/collaboration-client','comments','pipe','length','4231332SKtsed','rangeId','filter','commentUpdate$','_initUserSync','unitId','UniverCore','UniverThreadCommentUIPlugin','_threadCommentModel','updateComment','content','size','IConfigService','467132jerukD','bufferTime','createTimestamp','slice','_injector','@univerjs/network','format','UniverInstanceType','disposeWithMe','Solved','forEach','/universer-api/comment/unit/','/add','/edit','DependentOn','user','replyId','_httpService','_sessionService','listComments','Add','stringify','UniverProLicense'];_0x3138=function(){return _0x4e723d;};return _0x3138();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.0-nightly.202506051607",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.0-nightly.202506051607",
49
- "@univerjs-pro/license": "0.8.0-nightly.202506051607",
50
- "@univerjs/core": "0.8.0-nightly.202506051607",
48
+ "@univerjs-pro/collaboration-client": "0.8.0",
49
+ "@univerjs/core": "0.8.0",
50
+ "@univerjs-pro/license": "0.8.0",
51
+ "@univerjs/network": "0.8.0",
51
52
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.8.0-nightly.202506051607",
53
- "@univerjs/network": "0.8.0-nightly.202506051607",
54
- "@univerjs/thread-comment-ui": "0.8.0-nightly.202506051607"
53
+ "@univerjs/thread-comment": "0.8.0",
54
+ "@univerjs/thread-comment-ui": "0.8.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.2.0",
61
- "@univerjs-infra/shared": "0.8.0-beta.1"
61
+ "@univerjs-infra/shared": "0.8.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",