@univerjs-pro/thread-comment-datasource 0.10.3-nightly.202508121228 → 0.10.3-nightly.202508150623

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 _0x2d5d1c=_0x937a;(function(_0x205b06,_0x301069){const _0x534cb9=_0x937a,_0x28f668=_0x205b06();while(!![]){try{const _0x2b51aa=-parseInt(_0x534cb9(0x179))/0x1*(parseInt(_0x534cb9(0x15e))/0x2)+-parseInt(_0x534cb9(0x18a))/0x3*(parseInt(_0x534cb9(0x1a3))/0x4)+-parseInt(_0x534cb9(0x141))/0x5*(parseInt(_0x534cb9(0x135))/0x6)+-parseInt(_0x534cb9(0x130))/0x7*(-parseInt(_0x534cb9(0x13f))/0x8)+parseInt(_0x534cb9(0x129))/0x9+parseInt(_0x534cb9(0x12b))/0xa*(parseInt(_0x534cb9(0x18e))/0xb)+-parseInt(_0x534cb9(0x14c))/0xc;if(_0x2b51aa===_0x301069)break;else _0x28f668['push'](_0x28f668['shift']());}catch(_0x402bf8){_0x28f668['push'](_0x28f668['shift']());}}}(_0x9315,0xd70ca));Object['defineProperty'](exports,Symbol[_0x2d5d1c(0x172)],{'value':_0x2d5d1c(0x176)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x2d5d1c(0x19d);var I=(_0x1a1e83=>(_0x1a1e83[_0x1a1e83[_0x2d5d1c(0x13d)]=0x0]=_0x2d5d1c(0x13d),_0x1a1e83[_0x1a1e83['Solved']=0x1]='Solved',_0x1a1e83[_0x1a1e83[_0x2d5d1c(0x144)]=-0x1]=_0x2d5d1c(0x144),_0x1a1e83))(I||{}),v=(_0x38d61b=>(_0x38d61b[_0x38d61b[_0x2d5d1c(0x148)]=0x0]=_0x2d5d1c(0x148),_0x38d61b[_0x38d61b[_0x2d5d1c(0x154)]=0x1]=_0x2d5d1c(0x154),_0x38d61b[_0x38d61b['Reply']=0x2]=_0x2d5d1c(0x16e),_0x38d61b[_0x38d61b[_0x2d5d1c(0x13b)]=0x3]=_0x2d5d1c(0x13b),_0x38d61b[_0x38d61b[_0x2d5d1c(0x18c)]=0x4]=_0x2d5d1c(0x18c),_0x38d61b[_0x38d61b[_0x2d5d1c(0x132)]=0x5]=_0x2d5d1c(0x132),_0x38d61b[_0x38d61b['UNRECOGNIZED']=-0x1]=_0x2d5d1c(0x144),_0x38d61b))(v||{});const f=_0x170c03=>c[_0x2d5d1c(0x14e)](new Date(+_0x170c03))[_0x2d5d1c(0x128)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x395029,_0xf59cdf)=>{const _0x16bfdd=_0x2d5d1c,_0x1c759d=_0x395029[_0x16bfdd(0x13e)](c[_0x16bfdd(0x149)]),_0x20721b=_0x395029[_0x16bfdd(0x13e)](P[_0x16bfdd(0x193)]);_0xf59cdf[_0x16bfdd(0x1a1)](_0x4c545b=>{const _0x580127=_0x16bfdd;_0x1c759d[_0x580127(0x19a)](_0x4c545b)&&_0xf59cdf['delete'](_0x4c545b);}),_0xf59cdf[_0x16bfdd(0x198)]&&(await _0x20721b['get'](_0x16bfdd(0x19c),{'params':{'userIDs':[..._0xf59cdf]}}))[_0x16bfdd(0x17d)][_0x16bfdd(0x17b)][_0x16bfdd(0x1a1)](_0x59d036=>{_0x59d036&&_0x1c759d['addUser'](_0x59d036);});};var $=Object[_0x2d5d1c(0x177)],E=(_0x32d654,_0x45c194,_0x4ce546,_0x175c9f)=>{const _0x6bb612=_0x2d5d1c;for(var _0x4ae6c8=_0x175c9f>0x1?void 0x0:_0x175c9f?$(_0x45c194,_0x4ce546):_0x45c194,_0xb7093=_0x32d654[_0x6bb612(0x153)]-0x1,_0x26be55;_0xb7093>=0x0;_0xb7093--)(_0x26be55=_0x32d654[_0xb7093])&&(_0x4ae6c8=_0x26be55(_0x4ae6c8)||_0x4ae6c8);return _0x4ae6c8;},S=(_0x4c493a,_0x46837a)=>(_0x4c3948,_0x2ee9dc)=>_0x46837a(_0x4c3948,_0x2ee9dc,_0x4c493a);let _=class extends c[_0x2d5d1c(0x16b)]{constructor(_0x3e0c52,_0x5bedb0,_0x17f714,_0x4e9fbb){const _0x101203=_0x2d5d1c;super(),this['_commentService']=_0x3e0c52,this[_0x101203(0x185)]=_0x5bedb0,this[_0x101203(0x150)]=_0x17f714,this[_0x101203(0x159)]=_0x4e9fbb,this['_init'](),this[_0x101203(0x171)]();}[_0x2d5d1c(0x171)](){const _0x2452fe=_0x2d5d1c;this[_0x2452fe(0x1a2)](this['_threadCommentModel'][_0x2452fe(0x196)][_0x2452fe(0x183)](j[_0x2452fe(0x15a)](0x10))[_0x2452fe(0x157)](_0x40a789=>{const _0x2fce50=_0x2452fe,_0x215ba8=new Set();_0x40a789[_0x2fce50(0x1a1)](_0x1d4ff3=>{const _0x2e1fbd=_0x2fce50;switch(_0x1d4ff3[_0x2e1fbd(0x19e)]){case'add':{const _0x1db8b0=_0x1d4ff3[_0x2e1fbd(0x12c)][_0x2e1fbd(0x131)];_0x215ba8[_0x2e1fbd(0x147)](_0x1db8b0);break;}}}),R(this['_injector'],_0x215ba8);}));}['_init'](){const _0x46e4bc=_0x2d5d1c;this[_0x46e4bc(0x1a2)](this[_0x46e4bc(0x156)][_0x46e4bc(0x196)][_0x46e4bc(0x157)](async _0x21e41e=>{const _0x1cc09a=_0x46e4bc;var _0x9bd824,_0x8f5252,_0x141d00,_0x54e0a6;const _0x42b5ea=(_0x9bd824=this[_0x1cc09a(0x185)][_0x1cc09a(0x15d)](_0x21e41e[_0x1cc09a(0x16f)])[_0x1cc09a(0x18b)](_0x700372=>_0x700372[_0x1cc09a(0x136)]===_0x21e41e[_0x1cc09a(0x136)]))==null?void 0x0:_0x9bd824[_0x1cc09a(0x138)];if(!_0x42b5ea)return;const {unitId:_0x2adae9,subUnitId:_0x243641}=_0x42b5ea;switch(_0x21e41e[_0x1cc09a(0x1a0)]&&this[_0x1cc09a(0x150)]['addUser'](_0x21e41e['user']),_0x21e41e[_0x1cc09a(0x19e)]){case v[_0x1cc09a(0x154)]:break;case v[_0x1cc09a(0x16e)]:{this[_0x1cc09a(0x185)][_0x1cc09a(0x139)](_0x2adae9,_0x243641,{'unitId':_0x2adae9,'subUnitId':_0x243641,'ref':'','id':_0x21e41e[_0x1cc09a(0x197)],'dT':f(+_0x21e41e[_0x1cc09a(0x184)]),'threadId':_0x21e41e[_0x1cc09a(0x136)],'personId':(_0x141d00=(_0x8f5252=_0x21e41e[_0x1cc09a(0x1a0)])==null?void 0x0:_0x8f5252[_0x1cc09a(0x190)])!=null?_0x141d00:_0x21e41e['userId'],'text':JSON[_0x1cc09a(0x14a)](_0x21e41e[_0x1cc09a(0x12e)]),'parentId':_0x42b5ea['id']});break;}case v['Delete']:{const _0x1191ed=this[_0x1cc09a(0x185)]['getComment'](_0x2adae9,_0x243641,_0x21e41e[_0x1cc09a(0x197)]);_0x1191ed&&_0x1191ed[_0x1cc09a(0x186)]&&this['_threadCommentModel'][_0x1cc09a(0x173)](_0x2adae9,_0x243641,_0x21e41e['replyId']);break;}case v[_0x1cc09a(0x13b)]:{this[_0x1cc09a(0x185)][_0x1cc09a(0x165)](_0x2adae9,_0x243641,{'commentId':_0x21e41e['replyId'],'text':JSON[_0x1cc09a(0x14a)](_0x21e41e['content'])});break;}case v[_0x1cc09a(0x132)]:{const _0x345893=(_0x54e0a6=this[_0x1cc09a(0x185)]['getUnit'](_0x21e41e[_0x1cc09a(0x16f)])[_0x1cc09a(0x18b)](_0x4a7a9e=>_0x4a7a9e[_0x1cc09a(0x136)]===_0x21e41e['threadId']))==null?void 0x0:_0x54e0a6[_0x1cc09a(0x138)];_0x345893&&this[_0x1cc09a(0x185)][_0x1cc09a(0x17e)](_0x2adae9,_0x243641,_0x345893['id'],_0x21e41e[_0x1cc09a(0x164)]===I[_0x1cc09a(0x18f)]);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x2d5d1c(0x158)])),S(0x1,c[_0x2d5d1c(0x145)](M[_0x2d5d1c(0x143)])),S(0x2,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x149)])),S(0x3,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x195)]))],_);const q='thread-comment-data-source.config',D={};function _0x9315(){const _0x428f07=['UniverCollaborationClientPlugin','length','Add','code','_commentService','subscribe','CommentService','_injector','bufferTime','onStarting','values','getUnit','390umKcml','/edit','CollaborationSessionService','resolved','/list','setConfig','solved','updateComment','_config','_threadCommentDataSourceService','rangeId','CustomRangeType','_httpService','Disposable','/reply','post','Reply','unitId','syncUpdateMutationToColla','_initUserSync','toStringTag','deleteComment','slice','reply','Module','getOwnPropertyDescriptor','_threadCommentDataSource','955gUxXri','requireSession','users','COMMENT','body','resolveComment','stringify','error','customRanges','/solved','pipe','createTimestamp','_threadCommentModel','parentId','IThreadCommentDataSourceService','merge','/add','3859353HoxZJD','find','Delete','UniverInstanceType','2482832NVRBVx','Solved','userID','_initDataSource','listComments','HTTPService','filter','Injector','commentUpdate$','replyId','size','/universer-api/comment/unit/','getUser','Plugin','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','type','getMemberID','user','forEach','disposeWithMe','4NfITjv','_sessionService','format','12578571nDPdnP','IConfigService','70kgRTsL','payload','rangeType','content','symbol','511OcPNKu','personId','Solve','dataSource','map','69966VpKUlt','threadId','defineProperty','root','addComment','YYYY/MM/DD\x20HH:mm','Edit','DependentOn','OpenOrReOpen','get','106000uKOZMe','replies','335WpWZDS','UNIVER_UNKNOWN','ThreadCommentModel','UNRECOGNIZED','Inject','userId','add','Unknown','UserManagerService','parse','UniverLicensePlugin','9720576xxhlGg','UniverThreadCommentDataSourcePlugin','dayjs','_configService','_userService','saveCommentToSnapshot'];_0x9315=function(){return _0x428f07;};return _0x9315();}var A=Object[_0x2d5d1c(0x177)],x=(_0x277b79,_0x59a345,_0x502fbe,_0x1054b7)=>{const _0x28c313=_0x2d5d1c;for(var _0x427490=_0x1054b7>0x1?void 0x0:_0x1054b7?A(_0x59a345,_0x502fbe):_0x59a345,_0x423b99=_0x277b79[_0x28c313(0x153)]-0x1,_0x2dd47e;_0x423b99>=0x0;_0x423b99--)(_0x2dd47e=_0x277b79[_0x423b99])&&(_0x427490=_0x2dd47e(_0x427490)||_0x427490);return _0x427490;},C=(_0x42348e,_0x42dd0b)=>(_0x56d9a4,_0x25e93c)=>_0x42dd0b(_0x56d9a4,_0x25e93c,_0x42348e);function Y(_0x5cd27f,_0x12bde1){const _0x35f27e=_0x2d5d1c,_0x522f27=_0x5cd27f[_0x35f27e(0x140)][0x0];return{..._0x12bde1,'id':_0x522f27[_0x35f27e(0x197)],'resolved':_0x5cd27f[_0x35f27e(0x164)]===0x1,'dT':f(_0x522f27[_0x35f27e(0x184)]),'personId':_0x522f27[_0x35f27e(0x146)],'threadId':_0x522f27[_0x35f27e(0x136)]};}function G(_0xe2107b,_0x4ab549,_0x19c2b5){const _0x5a1f30=_0x2d5d1c;var _0x48530f,_0x1f99c7;if(((_0x1f99c7=(_0x48530f=_0xe2107b==null?void 0x0:_0xe2107b[_0x5a1f30(0x140)])==null?void 0x0:_0x48530f[_0x5a1f30(0x153)])!=null?_0x1f99c7:0x0)>0x0){const _0xe3520d=(_0x58b6e6,_0x40163a)=>({'id':_0x58b6e6[_0x5a1f30(0x197)],'threadId':_0x58b6e6[_0x5a1f30(0x136)],'dT':f(_0x58b6e6[_0x5a1f30(0x184)]),'personId':_0x58b6e6['userId'],'resolved':_0xe2107b['solved']===I['Solved'],'unitId':_0x4ab549,'subUnitId':_0x19c2b5,'text':JSON['parse'](_0x58b6e6[_0x5a1f30(0x12e)]),'parentId':_0x40163a}),_0x37880a=_0xe3520d(_0xe2107b[_0x5a1f30(0x140)][0x0]);return{..._0x37880a,'children':_0xe2107b['replies'][_0x5a1f30(0x174)](0x1)[_0x5a1f30(0x134)](_0x5acb31=>_0xe3520d(_0x5acb31,_0x37880a['id']))};}return null;}let p=class{constructor(_0x50c5e4,_0x19b8c1,_0x422898){const _0x4f9624=_0x2d5d1c;this[_0x4f9624(0x16a)]=_0x50c5e4,this['_userService']=_0x19b8c1,this['_sessionService']=_0x422898;}async[_0x2d5d1c(0x139)](_0x1e9d18){const _0x20fee9=_0x2d5d1c;var _0x3e6978,_0x47f75a;const {parentId:_0x42930f,unitId:_0x5cbf35,text:_0x26b662,threadId:_0x3b924c}=_0x1e9d18,_0x26cc07=(_0x47f75a=(_0x3e6978=_0x26b662[_0x20fee9(0x181)])==null?void 0x0:_0x3e6978[_0x20fee9(0x194)](_0x77bfa2=>_0x77bfa2[_0x20fee9(0x12d)]===c[_0x20fee9(0x169)][_0x20fee9(0x17c)])[_0x20fee9(0x134)](_0x4f2c83=>_0x4f2c83[_0x20fee9(0x168)]))!=null?_0x47f75a:[],_0x39cffe=JSON[_0x20fee9(0x17f)](_0x26b662),_0x1fb9df=(await this[_0x20fee9(0x127)][_0x20fee9(0x17a)](_0x5cbf35))[_0x20fee9(0x19f)]();if(_0x42930f){const _0x2ebcf8={'memberId':_0x1fb9df,'unitId':_0x5cbf35,'content':_0x39cffe,'mention':_0x26cc07,'threadId':_0x3b924c},_0x21f5c4=(await this[_0x20fee9(0x16a)][_0x20fee9(0x16d)](_0x20fee9(0x199)+_0x5cbf35+_0x20fee9(0x16c),{'body':_0x2ebcf8}))['body'][_0x20fee9(0x175)];return{..._0x1e9d18,'id':_0x21f5c4[_0x20fee9(0x197)],'dT':c[_0x20fee9(0x14e)](+_0x21f5c4[_0x20fee9(0x184)])[_0x20fee9(0x128)](_0x20fee9(0x13a)),'personId':_0x21f5c4[_0x20fee9(0x146)]};}else{const _0x545436={'memberId':_0x1fb9df,'unitId':_0x5cbf35,'content':_0x39cffe,'mention':_0x26cc07},_0x4503e0=await this[_0x20fee9(0x16a)][_0x20fee9(0x16d)](_0x20fee9(0x199)+_0x5cbf35+_0x20fee9(0x189),{'body':_0x545436});return Y(_0x4503e0[_0x20fee9(0x17d)]['comment'],_0x1e9d18);}}async[_0x2d5d1c(0x165)](_0x110842){const _0x14b8b5=_0x2d5d1c;var _0x4ac640,_0x189ae2;const {text:_0x5abe84,unitId:_0x58a782}=_0x110842,_0x120ac1=(_0x189ae2=(_0x4ac640=_0x5abe84[_0x14b8b5(0x181)])==null?void 0x0:_0x4ac640['filter'](_0x2cdfe0=>_0x2cdfe0[_0x14b8b5(0x12d)]===c['CustomRangeType'][_0x14b8b5(0x17c)])[_0x14b8b5(0x134)](_0x375b0f=>_0x375b0f[_0x14b8b5(0x168)]))!=null?_0x189ae2:[],_0x29f7f4=JSON[_0x14b8b5(0x17f)](_0x5abe84),_0x57e17e=_0x110842[_0x14b8b5(0x136)],_0x36319c=_0x110842['id'],_0x41933e={'memberId':(await this[_0x14b8b5(0x127)][_0x14b8b5(0x17a)](_0x58a782))[_0x14b8b5(0x19f)](),'unitId':_0x58a782,'threadId':_0x57e17e,'mention':_0x120ac1,'content':_0x29f7f4,'replyId':_0x36319c},_0x23406e=await this[_0x14b8b5(0x16a)][_0x14b8b5(0x16d)]('/universer-api/comment/unit/'+_0x58a782+_0x14b8b5(0x15f),{'body':_0x41933e});return!_0x23406e['body']['error']||_0x23406e[_0x14b8b5(0x17d)]['error']['code']===0x1;}async[_0x2d5d1c(0x17e)](_0x154eab){const _0x4c3a03=_0x2d5d1c,{unitId:_0x3dbdee}=_0x154eab,_0x9b26ab=_0x154eab[_0x4c3a03(0x136)],_0x56d362={'memberId':this[_0x4c3a03(0x150)]['getCurrentUser']()[_0x4c3a03(0x190)],'unitId':_0x3dbdee,'threadId':_0x9b26ab,'solved':_0x154eab[_0x4c3a03(0x161)]?I[_0x4c3a03(0x18f)]:I[_0x4c3a03(0x13d)]},_0x2cd5cf=await this[_0x4c3a03(0x16a)][_0x4c3a03(0x16d)]('/universer-api/comment/unit/'+_0x3dbdee+_0x4c3a03(0x182),{'body':_0x56d362});return!_0x2cd5cf[_0x4c3a03(0x17d)][_0x4c3a03(0x180)]||_0x2cd5cf[_0x4c3a03(0x17d)]['error'][_0x4c3a03(0x155)]===0x1;}async[_0x2d5d1c(0x173)](_0x346062,_0x5f2c9f,_0x58eaf3,_0x5dc8db){const _0x4667fa=_0x2d5d1c,_0x3e32ff={'memberId':(await this[_0x4667fa(0x127)][_0x4667fa(0x17a)](_0x346062))['getMemberID'](),'threadId':_0x58eaf3,'replyId':_0x5dc8db,'unitId':_0x346062},_0x28984d=await this['_httpService'][_0x4667fa(0x16d)](_0x4667fa(0x199)+_0x346062+'/delete',{'body':_0x3e32ff});return!_0x28984d[_0x4667fa(0x17d)]['error']||_0x28984d[_0x4667fa(0x17d)][_0x4667fa(0x180)]['code']===0x1;}async[_0x2d5d1c(0x192)](_0xa62426,_0x4f7f9c,_0x15ace6){const _0x16c0b1=_0x2d5d1c,_0x26a40f={'unitId':_0xa62426,'threadId':_0x15ace6},_0x25a1c5=await this[_0x16c0b1(0x16a)][_0x16c0b1(0x16d)]('/universer-api/comment/unit/'+_0xa62426+_0x16c0b1(0x162),{'body':_0x26a40f}),_0x15250c=_0x15ace6[_0x16c0b1(0x134)](_0x6cc3e9=>G(_0x25a1c5[_0x16c0b1(0x17d)]['comments'][_0x6cc3e9],_0xa62426,_0x4f7f9c))[_0x16c0b1(0x194)](Boolean);return Object[_0x16c0b1(0x15c)](_0x25a1c5[_0x16c0b1(0x17d)][_0x16c0b1(0x17b)])[_0x16c0b1(0x1a1)](_0x4a1d99=>{const _0x4402ea=_0x16c0b1;this[_0x4402ea(0x150)]['addUser'](_0x4a1d99);}),_0x15250c;}[_0x2d5d1c(0x151)](_0x4101e1){const _0x5aca04=_0x2d5d1c;return{'id':_0x4101e1['id'],'threadId':_0x4101e1[_0x5aca04(0x136)],'ref':_0x4101e1['ref']};}};p=x([C(0x0,c[_0x2d5d1c(0x145)](P['HTTPService'])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x2d5d1c(0x145)](b[_0x2d5d1c(0x160)]))],p);function _0x937a(_0x20fe46,_0x14c83a){const _0x93159c=_0x9315();return _0x937a=function(_0x937ad0,_0x12332f){_0x937ad0=_0x937ad0-0x127;let _0x2db651=_0x93159c[_0x937ad0];return _0x2db651;},_0x937a(_0x20fe46,_0x14c83a);}var H=Object[_0x2d5d1c(0x177)],J=(_0x3c09df,_0xd6ab6e,_0x5ccc3d,_0x12aa91)=>{const _0x31a8c7=_0x2d5d1c;for(var _0x33d68b=_0x12aa91>0x1?void 0x0:_0x12aa91?H(_0xd6ab6e,_0x5ccc3d):_0xd6ab6e,_0xcbf4d7=_0x3c09df[_0x31a8c7(0x153)]-0x1,_0x446b5b;_0xcbf4d7>=0x0;_0xcbf4d7--)(_0x446b5b=_0x3c09df[_0xcbf4d7])&&(_0x33d68b=_0x446b5b(_0x33d68b)||_0x33d68b);return _0x33d68b;},y=(_0x4f9159,_0x2ef317)=>(_0x50194a,_0x1f5875)=>_0x2ef317(_0x50194a,_0x1f5875,_0x4f9159);let g=class extends c[_0x2d5d1c(0x16b)]{constructor(_0x4cf0d4,_0xe80b64){const _0xe1ff4=_0x2d5d1c;super(),this[_0xe1ff4(0x167)]=_0x4cf0d4,this[_0xe1ff4(0x178)]=_0xe80b64,this[_0xe1ff4(0x191)]();}[_0x2d5d1c(0x191)](){const _0xedb93f=_0x2d5d1c;this[_0xedb93f(0x167)][_0xedb93f(0x133)]=this[_0xedb93f(0x178)],this[_0xedb93f(0x167)][_0xedb93f(0x170)]=!0x1;}};g=J([y(0x0,M[_0x2d5d1c(0x187)]),y(0x1,c[_0x2d5d1c(0x145)](p))],g);var F=Object[_0x2d5d1c(0x137)],L=Object['getOwnPropertyDescriptor'],Z=(_0x484627,_0x2ec610,_0x2103dd)=>_0x2ec610 in _0x484627?F(_0x484627,_0x2ec610,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2103dd}):_0x484627[_0x2ec610]=_0x2103dd,W=(_0xe1ff51,_0x473b52,_0x47b531,_0x1730ef)=>{const _0x1f6575=_0x2d5d1c;for(var _0x3001ed=_0x1730ef>0x1?void 0x0:_0x1730ef?L(_0x473b52,_0x47b531):_0x473b52,_0x34d78f=_0xe1ff51[_0x1f6575(0x153)]-0x1,_0x2e9ba5;_0x34d78f>=0x0;_0x34d78f--)(_0x2e9ba5=_0xe1ff51[_0x34d78f])&&(_0x3001ed=_0x2e9ba5(_0x3001ed)||_0x3001ed);return _0x3001ed;},O=(_0xce0a4e,_0x2e4960)=>(_0x28f1b4,_0x4fe557)=>_0x2e4960(_0x28f1b4,_0x4fe557,_0xce0a4e),N=(_0x31229d,_0xd6ddb2,_0x5f4bec)=>Z(_0x31229d,typeof _0xd6ddb2!=_0x2d5d1c(0x12f)?_0xd6ddb2+'':_0xd6ddb2,_0x5f4bec);exports[_0x2d5d1c(0x14d)]=class extends c[_0x2d5d1c(0x19b)]{constructor(_0x347e4a=D,_0x1b7ecb,_0x1cfd07){const _0xac400c=_0x2d5d1c;super(),this[_0xac400c(0x166)]=_0x347e4a,this[_0xac400c(0x159)]=_0x1b7ecb,this[_0xac400c(0x14f)]=_0x1cfd07;const {..._0x502bca}=c[_0xac400c(0x188)]({},D,this[_0xac400c(0x166)]);this[_0xac400c(0x14f)][_0xac400c(0x163)](q,_0x502bca);}[_0x2d5d1c(0x15b)](){const _0x53b17f=_0x2d5d1c;[[p],[g],[_]][_0x53b17f(0x1a1)](_0x406c78=>{const _0x1fce04=_0x53b17f;this['_injector'][_0x1fce04(0x147)](_0x406c78);});}['onReady'](){const _0x152638=_0x2d5d1c;this['_injector'][_0x152638(0x13e)](g),this['_injector'][_0x152638(0x13e)](_);}},N(exports[_0x2d5d1c(0x14d)],'pluginName',U),N(exports[_0x2d5d1c(0x14d)],_0x2d5d1c(0x19e),c[_0x2d5d1c(0x18d)][_0x2d5d1c(0x142)]),exports[_0x2d5d1c(0x14d)]=W([c[_0x2d5d1c(0x13c)](w['UniverThreadCommentUIPlugin'],b[_0x2d5d1c(0x152)],T[_0x2d5d1c(0x14b)]),O(0x1,c[_0x2d5d1c(0x145)](c[_0x2d5d1c(0x195)])),O(0x2,c[_0x2d5d1c(0x12a)])],exports[_0x2d5d1c(0x14d)]);
1
+ 'use strict';const _0x35a5ab=_0x7193;(function(_0x577646,_0x333f60){const _0x591d94=_0x7193,_0x59d24b=_0x577646();while(!![]){try{const _0x3b92b0=parseInt(_0x591d94(0xdc))/0x1*(parseInt(_0x591d94(0xd6))/0x2)+-parseInt(_0x591d94(0xa5))/0x3*(-parseInt(_0x591d94(0xf8))/0x4)+parseInt(_0x591d94(0xfd))/0x5+parseInt(_0x591d94(0xd2))/0x6+-parseInt(_0x591d94(0xe0))/0x7+parseInt(_0x591d94(0xb6))/0x8+parseInt(_0x591d94(0xa6))/0x9*(-parseInt(_0x591d94(0xd0))/0xa);if(_0x3b92b0===_0x333f60)break;else _0x59d24b['push'](_0x59d24b['shift']());}catch(_0x1807c0){_0x59d24b['push'](_0x59d24b['shift']());}}}(_0x33a0,0x86788));Object[_0x35a5ab(0x102)](exports,Symbol[_0x35a5ab(0xbc)],{'value':_0x35a5ab(0xd9)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x35a5ab(0xfa);var I=(_0x5e53f6=>(_0x5e53f6[_0x5e53f6[_0x35a5ab(0x101)]=0x0]=_0x35a5ab(0x101),_0x5e53f6[_0x5e53f6[_0x35a5ab(0x10a)]=0x1]='Solved',_0x5e53f6[_0x5e53f6[_0x35a5ab(0xf2)]=-0x1]=_0x35a5ab(0xf2),_0x5e53f6))(I||{}),v=(_0x45d326=>(_0x45d326[_0x45d326['Unknown']=0x0]=_0x35a5ab(0x107),_0x45d326[_0x45d326[_0x35a5ab(0xee)]=0x1]=_0x35a5ab(0xee),_0x45d326[_0x45d326[_0x35a5ab(0xc5)]=0x2]=_0x35a5ab(0xc5),_0x45d326[_0x45d326[_0x35a5ab(0x103)]=0x3]=_0x35a5ab(0x103),_0x45d326[_0x45d326[_0x35a5ab(0xda)]=0x4]=_0x35a5ab(0xda),_0x45d326[_0x45d326['Solve']=0x5]='Solve',_0x45d326[_0x45d326['UNRECOGNIZED']=-0x1]=_0x35a5ab(0xf2),_0x45d326))(v||{});const f=_0x4b37dd=>c[_0x35a5ab(0xc7)](new Date(+_0x4b37dd))[_0x35a5ab(0xd7)](_0x35a5ab(0x117)),R=async(_0x124d1e,_0x161c23)=>{const _0xb85fbc=_0x35a5ab,_0x3782d4=_0x124d1e[_0xb85fbc(0x112)](c[_0xb85fbc(0xa4)]),_0x3c3b6a=_0x124d1e[_0xb85fbc(0x112)](P['HTTPService']);_0x161c23[_0xb85fbc(0x100)](_0x4b3aff=>{const _0x4b3f38=_0xb85fbc;_0x3782d4[_0x4b3f38(0xbf)](_0x4b3aff)&&_0x161c23[_0x4b3f38(0x10d)](_0x4b3aff);}),_0x161c23[_0xb85fbc(0x10b)]&&(await _0x3c3b6a[_0xb85fbc(0x112)]('/universer-api/user/list',{'params':{'userIDs':[..._0x161c23]}}))[_0xb85fbc(0xcd)][_0xb85fbc(0x106)][_0xb85fbc(0x100)](_0x391b19=>{const _0x2aca40=_0xb85fbc;_0x391b19&&_0x3782d4[_0x2aca40(0xae)](_0x391b19);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x43576b,_0x209190,_0x3fe690,_0x49c5eb)=>{const _0x350c11=_0x35a5ab;for(var _0x1b2535=_0x49c5eb>0x1?void 0x0:_0x49c5eb?$(_0x209190,_0x3fe690):_0x209190,_0x36d554=_0x43576b[_0x350c11(0x110)]-0x1,_0x3ad588;_0x36d554>=0x0;_0x36d554--)(_0x3ad588=_0x43576b[_0x36d554])&&(_0x1b2535=_0x3ad588(_0x1b2535)||_0x1b2535);return _0x1b2535;},S=(_0x387ccc,_0x1ea3ad)=>(_0xe28f64,_0x35edb5)=>_0x1ea3ad(_0xe28f64,_0x35edb5,_0x387ccc);let _=class extends c[_0x35a5ab(0x119)]{constructor(_0x468c4f,_0x57c177,_0x2771b2,_0x1e23af){const _0x50e38e=_0x35a5ab;super(),this['_commentService']=_0x468c4f,this[_0x50e38e(0xa3)]=_0x57c177,this[_0x50e38e(0xb0)]=_0x2771b2,this[_0x50e38e(0xb8)]=_0x1e23af,this[_0x50e38e(0xc8)](),this[_0x50e38e(0xaa)]();}[_0x35a5ab(0xaa)](){const _0x3dab22=_0x35a5ab;this[_0x3dab22(0xe9)](this[_0x3dab22(0xa3)]['commentUpdate$'][_0x3dab22(0xbb)](j[_0x3dab22(0xf6)](0x10))['subscribe'](_0x591f42=>{const _0x509edd=_0x3dab22,_0x112502=new Set();_0x591f42[_0x509edd(0x100)](_0x42089c=>{const _0x553d4d=_0x509edd;switch(_0x42089c[_0x553d4d(0xf0)]){case _0x553d4d(0xaf):{const _0x5c08e3=_0x42089c[_0x553d4d(0xf3)]['personId'];_0x112502['add'](_0x5c08e3);break;}}}),R(this[_0x509edd(0xb8)],_0x112502);}));}[_0x35a5ab(0xc8)](){const _0x244c17=_0x35a5ab;this['disposeWithMe'](this[_0x244c17(0x118)][_0x244c17(0x10f)][_0x244c17(0xb7)](async _0x271c8c=>{const _0x45843c=_0x244c17;var _0x74a57e,_0x242e39,_0x14e9ab,_0x20fde0;const _0x2976fb=(_0x74a57e=this[_0x45843c(0xa3)][_0x45843c(0xc9)](_0x271c8c[_0x45843c(0x109)])[_0x45843c(0x114)](_0x3492d7=>_0x3492d7[_0x45843c(0xcf)]===_0x271c8c['threadId']))==null?void 0x0:_0x74a57e[_0x45843c(0xf5)];if(!_0x2976fb)return;const {unitId:_0x1461e8,subUnitId:_0x8af43f}=_0x2976fb;switch(_0x271c8c[_0x45843c(0xfb)]&&this[_0x45843c(0xb0)]['addUser'](_0x271c8c[_0x45843c(0xfb)]),_0x271c8c[_0x45843c(0xf0)]){case v[_0x45843c(0xee)]:break;case v[_0x45843c(0xc5)]:{this[_0x45843c(0xa3)][_0x45843c(0xe3)](_0x1461e8,_0x8af43f,{'unitId':_0x1461e8,'subUnitId':_0x8af43f,'ref':'','id':_0x271c8c[_0x45843c(0xf7)],'dT':f(+_0x271c8c[_0x45843c(0xed)]),'threadId':_0x271c8c['threadId'],'personId':(_0x14e9ab=(_0x242e39=_0x271c8c['user'])==null?void 0x0:_0x242e39['userID'])!=null?_0x14e9ab:_0x271c8c[_0x45843c(0xc4)],'text':JSON[_0x45843c(0xff)](_0x271c8c['content']),'parentId':_0x2976fb['id']});break;}case v[_0x45843c(0xda)]:{const _0xa3156e=this['_threadCommentModel'][_0x45843c(0x10c)](_0x1461e8,_0x8af43f,_0x271c8c[_0x45843c(0xf7)]);_0xa3156e&&_0xa3156e[_0x45843c(0xd3)]&&this[_0x45843c(0xa3)][_0x45843c(0x108)](_0x1461e8,_0x8af43f,_0x271c8c['replyId']);break;}case v[_0x45843c(0x103)]:{this['_threadCommentModel']['updateComment'](_0x1461e8,_0x8af43f,{'commentId':_0x271c8c[_0x45843c(0xf7)],'text':JSON[_0x45843c(0xff)](_0x271c8c[_0x45843c(0x104)])});break;}case v['Solve']:{const _0x1732e1=(_0x20fde0=this[_0x45843c(0xa3)][_0x45843c(0xc9)](_0x271c8c[_0x45843c(0x109)])['find'](_0x2b83e8=>_0x2b83e8[_0x45843c(0xcf)]===_0x271c8c[_0x45843c(0xcf)]))==null?void 0x0:_0x20fde0['root'];_0x1732e1&&this[_0x45843c(0xa3)][_0x45843c(0xd8)](_0x1461e8,_0x8af43f,_0x1732e1['id'],_0x271c8c[_0x45843c(0xfc)]===I['Solved']);break;}}}));}};_=E([S(0x0,c[_0x35a5ab(0xd1)](b[_0x35a5ab(0xad)])),S(0x1,c[_0x35a5ab(0xd1)](M[_0x35a5ab(0xde)])),S(0x2,c['Inject'](c['UserManagerService'])),S(0x3,c['Inject'](c[_0x35a5ab(0xbe)]))],_);const q=_0x35a5ab(0xb2),D={};var A=Object[_0x35a5ab(0xb3)],x=(_0xc77cb2,_0x2a9c77,_0x594138,_0x3fe1f0)=>{const _0x402de4=_0x35a5ab;for(var _0x4479a0=_0x3fe1f0>0x1?void 0x0:_0x3fe1f0?A(_0x2a9c77,_0x594138):_0x2a9c77,_0x26b670=_0xc77cb2[_0x402de4(0x110)]-0x1,_0x5bbb83;_0x26b670>=0x0;_0x26b670--)(_0x5bbb83=_0xc77cb2[_0x26b670])&&(_0x4479a0=_0x5bbb83(_0x4479a0)||_0x4479a0);return _0x4479a0;},C=(_0x195134,_0x420826)=>(_0x5d1143,_0x26bffd)=>_0x420826(_0x5d1143,_0x26bffd,_0x195134);function _0x33a0(){const _0x122e8e=['commentUpdate$','length','merge','get','UniverCollaborationClientPlugin','find','UNIVER_UNKNOWN','requireSession','YYYY/MM/DD\x20HH:mm','_commentService','Disposable','DependentOn','_threadCommentDataSource','_threadCommentModel','UserManagerService','531EwCzXH','353367YVSRAA','userID','symbol','_sessionService','_initUserSync','getCurrentUser','code','CommentService','addUser','add','_userService','_configService','thread-comment-data-source.config','getOwnPropertyDescriptor','map','stringify','3885352qOwwrV','subscribe','_injector','reply','onStarting','pipe','toStringTag','_threadCommentDataSourceService','Injector','getUser','slice','resolved','values','COMMENT','userId','Reply','replies','dayjs','_init','getUnit','syncUpdateMutationToColla','post','IConfigService','body','CustomRangeType','threadId','120tMPMzD','Inject','1778646yItcMr','parentId','rangeId','HTTPService','33290SZPyDj','format','resolveComment','Module','Delete','error','6RSUOBH','comment','ThreadCommentModel','CollaborationSessionService','5824028YpPhwa','pluginName','/solved','addComment','filter','_httpService','UniverThreadCommentDataSourcePlugin','_initDataSource','UniverThreadCommentUIPlugin','disposeWithMe','IThreadCommentDataSourceService','rangeType','saveCommentToSnapshot','createTimestamp','Add','/add','type','dataSource','UNRECOGNIZED','payload','/edit','root','bufferTime','replyId','2872ecJKdx','/universer-api/comment/unit/','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','user','solved','4224430VtSLYx','/reply','parse','forEach','OpenOrReOpen','defineProperty','Edit','content','listComments','users','Unknown','deleteComment','unitId','Solved','size','getComment','delete','setConfig'];_0x33a0=function(){return _0x122e8e;};return _0x33a0();}function Y(_0x255075,_0x445970){const _0x2d5265=_0x35a5ab,_0xe9ff8=_0x255075[_0x2d5265(0xc6)][0x0];return{..._0x445970,'id':_0xe9ff8['replyId'],'resolved':_0x255075[_0x2d5265(0xfc)]===0x1,'dT':f(_0xe9ff8[_0x2d5265(0xed)]),'personId':_0xe9ff8[_0x2d5265(0xc4)],'threadId':_0xe9ff8[_0x2d5265(0xcf)]};}function G(_0x3711bc,_0x87f31c,_0x4e87e6){const _0x44634a=_0x35a5ab;var _0x22ab5c,_0x95e655;if(((_0x95e655=(_0x22ab5c=_0x3711bc==null?void 0x0:_0x3711bc[_0x44634a(0xc6)])==null?void 0x0:_0x22ab5c[_0x44634a(0x110)])!=null?_0x95e655:0x0)>0x0){const _0x48e6aa=(_0x495104,_0x367140)=>({'id':_0x495104[_0x44634a(0xf7)],'threadId':_0x495104['threadId'],'dT':f(_0x495104[_0x44634a(0xed)]),'personId':_0x495104['userId'],'resolved':_0x3711bc[_0x44634a(0xfc)]===I[_0x44634a(0x10a)],'unitId':_0x87f31c,'subUnitId':_0x4e87e6,'text':JSON[_0x44634a(0xff)](_0x495104['content']),'parentId':_0x367140}),_0x259d66=_0x48e6aa(_0x3711bc[_0x44634a(0xc6)][0x0]);return{..._0x259d66,'children':_0x3711bc['replies'][_0x44634a(0xc0)](0x1)['map'](_0xd7edc9=>_0x48e6aa(_0xd7edc9,_0x259d66['id']))};}return null;}let p=class{constructor(_0x21e3d5,_0xd8de2c,_0x3032c7){const _0x37717d=_0x35a5ab;this[_0x37717d(0xe5)]=_0x21e3d5,this[_0x37717d(0xb0)]=_0xd8de2c,this[_0x37717d(0xa9)]=_0x3032c7;}async['addComment'](_0x5877c5){const _0x1cd50e=_0x35a5ab;var _0x30a0c,_0x5e858a;const {parentId:_0x2bda05,unitId:_0x159b35,text:_0x4122fc,threadId:_0x346d17}=_0x5877c5,_0x95a6e1=(_0x5e858a=(_0x30a0c=_0x4122fc['customRanges'])==null?void 0x0:_0x30a0c[_0x1cd50e(0xe4)](_0x1eb91d=>_0x1eb91d[_0x1cd50e(0xeb)]===c['CustomRangeType'][_0x1cd50e(0xc3)])[_0x1cd50e(0xb4)](_0x1b5915=>_0x1b5915[_0x1cd50e(0xd4)]))!=null?_0x5e858a:[],_0x2240ae=JSON['stringify'](_0x4122fc),_0x3e1971=(await this[_0x1cd50e(0xa9)][_0x1cd50e(0x116)](_0x159b35))['getMemberID']();if(_0x2bda05){const _0x481e06={'memberId':_0x3e1971,'unitId':_0x159b35,'content':_0x2240ae,'mention':_0x95a6e1,'threadId':_0x346d17},_0xc39e14=(await this[_0x1cd50e(0xe5)][_0x1cd50e(0xcb)](_0x1cd50e(0xf9)+_0x159b35+_0x1cd50e(0xfe),{'body':_0x481e06}))[_0x1cd50e(0xcd)][_0x1cd50e(0xb9)];return{..._0x5877c5,'id':_0xc39e14[_0x1cd50e(0xf7)],'dT':c['dayjs'](+_0xc39e14[_0x1cd50e(0xed)])[_0x1cd50e(0xd7)](_0x1cd50e(0x117)),'personId':_0xc39e14[_0x1cd50e(0xc4)]};}else{const _0x165d3a={'memberId':_0x3e1971,'unitId':_0x159b35,'content':_0x2240ae,'mention':_0x95a6e1},_0x3810ee=await this[_0x1cd50e(0xe5)][_0x1cd50e(0xcb)](_0x1cd50e(0xf9)+_0x159b35+_0x1cd50e(0xef),{'body':_0x165d3a});return Y(_0x3810ee[_0x1cd50e(0xcd)][_0x1cd50e(0xdd)],_0x5877c5);}}async['updateComment'](_0x221d6b){const _0x209a1a=_0x35a5ab;var _0x3cc631,_0x3db8e0;const {text:_0x3be8a6,unitId:_0x5a8f50}=_0x221d6b,_0x5cc058=(_0x3db8e0=(_0x3cc631=_0x3be8a6['customRanges'])==null?void 0x0:_0x3cc631[_0x209a1a(0xe4)](_0x780ae4=>_0x780ae4[_0x209a1a(0xeb)]===c[_0x209a1a(0xce)][_0x209a1a(0xc3)])[_0x209a1a(0xb4)](_0x72502f=>_0x72502f['rangeId']))!=null?_0x3db8e0:[],_0x2818d0=JSON[_0x209a1a(0xb5)](_0x3be8a6),_0x58a3db=_0x221d6b[_0x209a1a(0xcf)],_0x168ab8=_0x221d6b['id'],_0x204976={'memberId':(await this[_0x209a1a(0xa9)][_0x209a1a(0x116)](_0x5a8f50))['getMemberID'](),'unitId':_0x5a8f50,'threadId':_0x58a3db,'mention':_0x5cc058,'content':_0x2818d0,'replyId':_0x168ab8},_0x27278e=await this[_0x209a1a(0xe5)][_0x209a1a(0xcb)](_0x209a1a(0xf9)+_0x5a8f50+_0x209a1a(0xf4),{'body':_0x204976});return!_0x27278e[_0x209a1a(0xcd)][_0x209a1a(0xdb)]||_0x27278e['body'][_0x209a1a(0xdb)][_0x209a1a(0xac)]===0x1;}async[_0x35a5ab(0xd8)](_0x3cd459){const _0x143fae=_0x35a5ab,{unitId:_0x3a830a}=_0x3cd459,_0x375696=_0x3cd459['threadId'],_0x2bde59={'memberId':this[_0x143fae(0xb0)][_0x143fae(0xab)]()[_0x143fae(0xa7)],'unitId':_0x3a830a,'threadId':_0x375696,'solved':_0x3cd459[_0x143fae(0xc1)]?I[_0x143fae(0x10a)]:I['OpenOrReOpen']},_0x37ebce=await this['_httpService'][_0x143fae(0xcb)](_0x143fae(0xf9)+_0x3a830a+_0x143fae(0xe2),{'body':_0x2bde59});return!_0x37ebce[_0x143fae(0xcd)]['error']||_0x37ebce[_0x143fae(0xcd)][_0x143fae(0xdb)]['code']===0x1;}async['deleteComment'](_0x48c307,_0x3cc5d5,_0x32d8f2,_0x5d6b5e){const _0x220eb0=_0x35a5ab,_0x2b7aff={'memberId':(await this[_0x220eb0(0xa9)][_0x220eb0(0x116)](_0x48c307))['getMemberID'](),'threadId':_0x32d8f2,'replyId':_0x5d6b5e,'unitId':_0x48c307},_0xf7d648=await this[_0x220eb0(0xe5)][_0x220eb0(0xcb)](_0x220eb0(0xf9)+_0x48c307+'/delete',{'body':_0x2b7aff});return!_0xf7d648[_0x220eb0(0xcd)][_0x220eb0(0xdb)]||_0xf7d648[_0x220eb0(0xcd)]['error']['code']===0x1;}async[_0x35a5ab(0x105)](_0xe46b2d,_0x27482d,_0x2816a0){const _0x21a80b=_0x35a5ab,_0x50292={'unitId':_0xe46b2d,'threadId':_0x2816a0},_0x17c87e=await this['_httpService'][_0x21a80b(0xcb)](_0x21a80b(0xf9)+_0xe46b2d+'/list',{'body':_0x50292}),_0x56e53c=_0x2816a0[_0x21a80b(0xb4)](_0x15c3f1=>G(_0x17c87e[_0x21a80b(0xcd)]['comments'][_0x15c3f1],_0xe46b2d,_0x27482d))['filter'](Boolean);return Object[_0x21a80b(0xc2)](_0x17c87e[_0x21a80b(0xcd)][_0x21a80b(0x106)])[_0x21a80b(0x100)](_0x3507b0=>{const _0x16fb8e=_0x21a80b;this['_userService'][_0x16fb8e(0xae)](_0x3507b0);}),_0x56e53c;}[_0x35a5ab(0xec)](_0x3fafc3){const _0x493ee9=_0x35a5ab;return{'id':_0x3fafc3['id'],'threadId':_0x3fafc3[_0x493ee9(0xcf)],'ref':_0x3fafc3['ref']};}};p=x([C(0x0,c[_0x35a5ab(0xd1)](P[_0x35a5ab(0xd5)])),C(0x1,c['Inject'](c[_0x35a5ab(0xa4)])),C(0x2,c['Inject'](b[_0x35a5ab(0xdf)]))],p);var H=Object[_0x35a5ab(0xb3)],J=(_0x3e456f,_0x5dda8d,_0x39c102,_0x5857b0)=>{const _0x2c7a32=_0x35a5ab;for(var _0x307802=_0x5857b0>0x1?void 0x0:_0x5857b0?H(_0x5dda8d,_0x39c102):_0x5dda8d,_0x4b3619=_0x3e456f[_0x2c7a32(0x110)]-0x1,_0x2df532;_0x4b3619>=0x0;_0x4b3619--)(_0x2df532=_0x3e456f[_0x4b3619])&&(_0x307802=_0x2df532(_0x307802)||_0x307802);return _0x307802;},y=(_0x33cf02,_0x7268aa)=>(_0x2091e2,_0x226f5)=>_0x7268aa(_0x2091e2,_0x226f5,_0x33cf02);function _0x7193(_0x21d612,_0x5b4dc3){const _0x33a074=_0x33a0();return _0x7193=function(_0x719345,_0x4d9a49){_0x719345=_0x719345-0xa1;let _0x4e328a=_0x33a074[_0x719345];return _0x4e328a;},_0x7193(_0x21d612,_0x5b4dc3);}let g=class extends c[_0x35a5ab(0x119)]{constructor(_0x14840c,_0xde0d3b){const _0x5427c6=_0x35a5ab;super(),this[_0x5427c6(0xbd)]=_0x14840c,this[_0x5427c6(0xa2)]=_0xde0d3b,this[_0x5427c6(0xe7)]();}[_0x35a5ab(0xe7)](){const _0x5adaf3=_0x35a5ab;this[_0x5adaf3(0xbd)][_0x5adaf3(0xf1)]=this[_0x5adaf3(0xa2)],this['_threadCommentDataSourceService'][_0x5adaf3(0xca)]=!0x1;}};g=J([y(0x0,M[_0x35a5ab(0xea)]),y(0x1,c[_0x35a5ab(0xd1)](p))],g);var F=Object[_0x35a5ab(0x102)],L=Object[_0x35a5ab(0xb3)],Z=(_0x10b622,_0x2a6a1f,_0x483a20)=>_0x2a6a1f in _0x10b622?F(_0x10b622,_0x2a6a1f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x483a20}):_0x10b622[_0x2a6a1f]=_0x483a20,W=(_0xe2e451,_0x3275d2,_0x1bd4c2,_0x566d27)=>{const _0x43aaf6=_0x35a5ab;for(var _0x1f8cba=_0x566d27>0x1?void 0x0:_0x566d27?L(_0x3275d2,_0x1bd4c2):_0x3275d2,_0x354c49=_0xe2e451[_0x43aaf6(0x110)]-0x1,_0xf019e6;_0x354c49>=0x0;_0x354c49--)(_0xf019e6=_0xe2e451[_0x354c49])&&(_0x1f8cba=_0xf019e6(_0x1f8cba)||_0x1f8cba);return _0x1f8cba;},O=(_0x556259,_0x22386b)=>(_0x3d3c31,_0x5c9538)=>_0x22386b(_0x3d3c31,_0x5c9538,_0x556259),N=(_0x2845ab,_0x5dd455,_0x4cdc24)=>Z(_0x2845ab,typeof _0x5dd455!=_0x35a5ab(0xa8)?_0x5dd455+'':_0x5dd455,_0x4cdc24);exports[_0x35a5ab(0xe6)]=class extends c['Plugin']{constructor(_0x574cc3=D,_0x372eab,_0x4a7e7a){const _0x3d5e90=_0x35a5ab;super(),this['_config']=_0x574cc3,this[_0x3d5e90(0xb8)]=_0x372eab,this[_0x3d5e90(0xb1)]=_0x4a7e7a;const {..._0x2a5abd}=c[_0x3d5e90(0x111)]({},D,this['_config']);this['_configService'][_0x3d5e90(0x10e)](q,_0x2a5abd);}[_0x35a5ab(0xba)](){const _0x544ffa=_0x35a5ab;[[p],[g],[_]][_0x544ffa(0x100)](_0xd952d3=>{this['_injector']['add'](_0xd952d3);});}['onReady'](){const _0xa24a74=_0x35a5ab;this[_0xa24a74(0xb8)][_0xa24a74(0x112)](g),this[_0xa24a74(0xb8)]['get'](_);}},N(exports[_0x35a5ab(0xe6)],_0x35a5ab(0xe1),U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x35a5ab(0xf0),c['UniverInstanceType'][_0x35a5ab(0x115)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x35a5ab(0xa1)](w[_0x35a5ab(0xe8)],b[_0x35a5ab(0x113)],T['UniverLicensePlugin']),O(0x1,c[_0x35a5ab(0xd1)](c[_0x35a5ab(0xbe)])),O(0x2,c[_0x35a5ab(0xcc)])],exports[_0x35a5ab(0xe6)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2a0d(){const _0x5d0c5e=['getOwnPropertyDescriptor','_init','_httpService','unitId','pluginName','/add','410003ZrOwBA','getUnit','UNIVER_UNKNOWN','user','type','slice','delete','COMMENT','commentUpdate$','get','code','/delete','_userService','content','forEach','syncUpdateMutationToColla','Reply','replies','dataSource','customRanges','YYYY/MM/DD\x20HH:mm','55DxAgtR','Solved','_threadCommentDataSource','filter','setConfig','payload','subscribe','symbol','getMemberID','85196AsVuof','length','_config','840864WiteAJ','map','comment','values','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','ref','addComment','userId','/reply','_injector','OpenOrReOpen','createTimestamp','reply','Delete','thread-comment-data-source.config','find','_configService','_initUserSync','requireSession','stringify','486525wvJUtb','onReady','_threadCommentDataSourceService','post','comments','body','rangeId','/universer-api/comment/unit/','replyId','9AKoaPU','_sessionService','size','/list','3487344GtSZhE','resolved','_commentService','disposeWithMe','Add','1203642ZWZhCv','UNRECOGNIZED','getComment','rangeType','deleteComment','add','2187848SUCEhq','parse','resolveComment','error','/edit','updateComment','addUser','listComments','userID','solved','threadId','defineProperty','parentId','pipe','/solved','saveCommentToSnapshot','format','_threadCommentModel','users'];_0x2a0d=function(){return _0x5d0c5e;};return _0x2a0d();}const _0x2b3a05=_0x81a1;(function(_0x5937ad,_0x232c0a){const _0x9b48ba=_0x81a1,_0x23d8e0=_0x5937ad();while(!![]){try{const _0x328333=parseInt(_0x9b48ba(0x104))/0x1+-parseInt(_0x9b48ba(0xe5))/0x2+-parseInt(_0x9b48ba(0xd3))/0x3+-parseInt(_0x9b48ba(0xba))/0x4*(parseInt(_0x9b48ba(0xb1))/0x5)+parseInt(_0x9b48ba(0xbd))/0x6+parseInt(_0x9b48ba(0xe0))/0x7+parseInt(_0x9b48ba(0xeb))/0x8*(parseInt(_0x9b48ba(0xdc))/0x9);if(_0x328333===_0x232c0a)break;else _0x23d8e0['push'](_0x23d8e0['shift']());}catch(_0x28618b){_0x23d8e0['push'](_0x23d8e0['shift']());}}}(_0x2a0d,0x4efcf));import{CommentService as _0x57eda0,CollaborationSessionService as _0x34dfc7,UniverCollaborationClientPlugin as _0x24dfe9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2890f9}from'@univerjs-pro/license';import{dayjs as _0x8123a1,UserManagerService as _0x29389e,Inject as _0x498129,Injector as _0x4a0051,Disposable as _0x36a07e,CustomRangeType as _0x450107,UniverInstanceType as _0x5e44b5,DependentOn as _0x100038,IConfigService as _0x31db9c,Plugin as _0x1f8d6e,merge as _0x1b1ca2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa3c3d4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59939f,IThreadCommentDataSourceService as _0x4069f7}from'@univerjs/thread-comment';import{bufferTime as _0x2daf75}from'rxjs';import{HTTPService as _0x26a669}from'@univerjs/network';const W=_0x2b3a05(0xc2);var I=(_0x145428=>(_0x145428[_0x145428[_0x2b3a05(0xc9)]=0x0]='OpenOrReOpen',_0x145428[_0x145428[_0x2b3a05(0xb2)]=0x1]=_0x2b3a05(0xb2),_0x145428[_0x145428[_0x2b3a05(0xe6)]=-0x1]='UNRECOGNIZED',_0x145428))(I||{}),v=(_0x130188=>(_0x130188[_0x130188[_0x2b3a05(0xc1)]=0x0]=_0x2b3a05(0xc1),_0x130188[_0x130188[_0x2b3a05(0xe4)]=0x1]=_0x2b3a05(0xe4),_0x130188[_0x130188['Reply']=0x2]=_0x2b3a05(0xac),_0x130188[_0x130188['Edit']=0x3]=_0x2b3a05(0xc3),_0x130188[_0x130188['Delete']=0x4]=_0x2b3a05(0xcc),_0x130188[_0x130188['Solve']=0x5]='Solve',_0x130188[_0x130188[_0x2b3a05(0xe6)]=-0x1]=_0x2b3a05(0xe6),_0x130188))(v||{});const y=_0x177b1d=>_0x8123a1(new Date(+_0x177b1d))[_0x2b3a05(0xfb)](_0x2b3a05(0xb0)),B=async(_0x46cc82,_0x2ba6db)=>{const _0x9493a3=_0x2b3a05,_0x6ea9fc=_0x46cc82[_0x9493a3(0xa5)](_0x29389e),_0x152d99=_0x46cc82[_0x9493a3(0xa5)](_0x26a669);_0x2ba6db['forEach'](_0xe0a975=>{const _0x504d9e=_0x9493a3;_0x6ea9fc['getUser'](_0xe0a975)&&_0x2ba6db[_0x504d9e(0x10a)](_0xe0a975);}),_0x2ba6db[_0x9493a3(0xde)]&&(await _0x152d99['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ba6db]}}))[_0x9493a3(0xd8)][_0x9493a3(0xfd)][_0x9493a3(0xaa)](_0x4ca041=>{_0x4ca041&&_0x6ea9fc['addUser'](_0x4ca041);});};var K=Object[_0x2b3a05(0xfe)],V=(_0x3ccb97,_0x1bf184,_0x14da28,_0x2e9ef7)=>{for(var _0x1eae47=_0x2e9ef7>0x1?void 0x0:_0x2e9ef7?K(_0x1bf184,_0x14da28):_0x1bf184,_0x82114d=_0x3ccb97['length']-0x1,_0xcf1a2;_0x82114d>=0x0;_0x82114d--)(_0xcf1a2=_0x3ccb97[_0x82114d])&&(_0x1eae47=_0xcf1a2(_0x1eae47)||_0x1eae47);return _0x1eae47;},p=(_0x127bbb,_0x4ddbf6)=>(_0x3fe9ec,_0x1834e3)=>_0x4ddbf6(_0x3fe9ec,_0x1834e3,_0x127bbb);let _=class extends _0x36a07e{constructor(_0x31a92b,_0x5dbcb1,_0x24fda3,_0x49e3e8){const _0x39452e=_0x2b3a05;super(),this[_0x39452e(0xe2)]=_0x31a92b,this[_0x39452e(0xfc)]=_0x5dbcb1,this[_0x39452e(0xa8)]=_0x24fda3,this[_0x39452e(0xc8)]=_0x49e3e8,this[_0x39452e(0xff)](),this['_initUserSync']();}[_0x2b3a05(0xd0)](){const _0x38e32f=_0x2b3a05;this[_0x38e32f(0xe3)](this[_0x38e32f(0xfc)][_0x38e32f(0xa4)][_0x38e32f(0xf8)](_0x2daf75(0x10))[_0x38e32f(0xb7)](_0x3fc155=>{const _0x2153a1=_0x38e32f,_0x3abdc6=new Set();_0x3fc155[_0x2153a1(0xaa)](_0x7b70a4=>{const _0xaa0e38=_0x2153a1;switch(_0x7b70a4[_0xaa0e38(0x108)]){case _0xaa0e38(0xea):{const _0x436d90=_0x7b70a4[_0xaa0e38(0xb6)]['personId'];_0x3abdc6['add'](_0x436d90);break;}}}),B(this[_0x2153a1(0xc8)],_0x3abdc6);}));}[_0x2b3a05(0xff)](){const _0x4411d9=_0x2b3a05;this[_0x4411d9(0xe3)](this[_0x4411d9(0xe2)]['commentUpdate$'][_0x4411d9(0xb7)](async _0x2c708d=>{const _0x5c7953=_0x4411d9;var _0x4b0a00,_0x31c3e3,_0x2f3d3a,_0x2a5386;const _0x5d36f4=(_0x4b0a00=this[_0x5c7953(0xfc)][_0x5c7953(0x105)](_0x2c708d[_0x5c7953(0x101)])[_0x5c7953(0xce)](_0x69703e=>_0x69703e[_0x5c7953(0xf5)]===_0x2c708d[_0x5c7953(0xf5)]))==null?void 0x0:_0x4b0a00['root'];if(!_0x5d36f4)return;const {unitId:_0xa6e968,subUnitId:_0xa812bc}=_0x5d36f4;switch(_0x2c708d[_0x5c7953(0x107)]&&this['_userService'][_0x5c7953(0xf1)](_0x2c708d[_0x5c7953(0x107)]),_0x2c708d[_0x5c7953(0x108)]){case v[_0x5c7953(0xe4)]:break;case v[_0x5c7953(0xac)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xc5)](_0xa6e968,_0xa812bc,{'unitId':_0xa6e968,'subUnitId':_0xa812bc,'ref':'','id':_0x2c708d[_0x5c7953(0xdb)],'dT':y(+_0x2c708d[_0x5c7953(0xca)]),'threadId':_0x2c708d[_0x5c7953(0xf5)],'personId':(_0x2f3d3a=(_0x31c3e3=_0x2c708d[_0x5c7953(0x107)])==null?void 0x0:_0x31c3e3[_0x5c7953(0xf3)])!=null?_0x2f3d3a:_0x2c708d[_0x5c7953(0xc6)],'text':JSON[_0x5c7953(0xec)](_0x2c708d['content']),'parentId':_0x5d36f4['id']});break;}case v['Delete']:{const _0x13abc4=this[_0x5c7953(0xfc)][_0x5c7953(0xe7)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);_0x13abc4&&_0x13abc4[_0x5c7953(0xf7)]&&this[_0x5c7953(0xfc)][_0x5c7953(0xe9)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);break;}case v[_0x5c7953(0xc3)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xf0)](_0xa6e968,_0xa812bc,{'commentId':_0x2c708d['replyId'],'text':JSON[_0x5c7953(0xec)](_0x2c708d[_0x5c7953(0xa9)])});break;}case v['Solve']:{const _0x5f0403=(_0x2a5386=this[_0x5c7953(0xfc)]['getUnit'](_0x2c708d[_0x5c7953(0x101)])['find'](_0x346a0d=>_0x346a0d['threadId']===_0x2c708d['threadId']))==null?void 0x0:_0x2a5386['root'];_0x5f0403&&this[_0x5c7953(0xfc)][_0x5c7953(0xed)](_0xa6e968,_0xa812bc,_0x5f0403['id'],_0x2c708d['solved']===I[_0x5c7953(0xb2)]);break;}}}));}};_=V([p(0x0,_0x498129(_0x57eda0)),p(0x1,_0x498129(_0x59939f)),p(0x2,_0x498129(_0x29389e)),p(0x3,_0x498129(_0x4a0051))],_);const z=_0x2b3a05(0xcd),O={};var k=Object[_0x2b3a05(0xfe)],Q=(_0x137738,_0x58e2dd,_0x33fb3e,_0xa4184d)=>{const _0x3d3795=_0x2b3a05;for(var _0x5a0188=_0xa4184d>0x1?void 0x0:_0xa4184d?k(_0x58e2dd,_0x33fb3e):_0x58e2dd,_0x4e6697=_0x137738[_0x3d3795(0xbb)]-0x1,_0x1c6276;_0x4e6697>=0x0;_0x4e6697--)(_0x1c6276=_0x137738[_0x4e6697])&&(_0x5a0188=_0x1c6276(_0x5a0188)||_0x5a0188);return _0x5a0188;},b=(_0x58e9f7,_0x2d8fb1)=>(_0x3ef83b,_0x1f6602)=>_0x2d8fb1(_0x3ef83b,_0x1f6602,_0x58e9f7);function _0x81a1(_0x59653b,_0x3e4848){const _0x2a0d55=_0x2a0d();return _0x81a1=function(_0x81a15b,_0xae53e9){_0x81a15b=_0x81a15b-0xa3;let _0x462405=_0x2a0d55[_0x81a15b];return _0x462405;},_0x81a1(_0x59653b,_0x3e4848);}function X(_0x4c2bcc,_0x2abf67){const _0x405497=_0x2b3a05,_0x24f327=_0x4c2bcc['replies'][0x0];return{..._0x2abf67,'id':_0x24f327[_0x405497(0xdb)],'resolved':_0x4c2bcc[_0x405497(0xf4)]===0x1,'dT':y(_0x24f327[_0x405497(0xca)]),'personId':_0x24f327['userId'],'threadId':_0x24f327[_0x405497(0xf5)]};}function ee(_0x4de25f,_0x3f471b,_0x13f928){const _0x4f1039=_0x2b3a05;var _0x55fd92,_0x20976b;if(((_0x20976b=(_0x55fd92=_0x4de25f==null?void 0x0:_0x4de25f[_0x4f1039(0xad)])==null?void 0x0:_0x55fd92[_0x4f1039(0xbb)])!=null?_0x20976b:0x0)>0x0){const _0x14f233=(_0x282b42,_0x49735b)=>({'id':_0x282b42[_0x4f1039(0xdb)],'threadId':_0x282b42[_0x4f1039(0xf5)],'dT':y(_0x282b42[_0x4f1039(0xca)]),'personId':_0x282b42[_0x4f1039(0xc6)],'resolved':_0x4de25f[_0x4f1039(0xf4)]===I['Solved'],'unitId':_0x3f471b,'subUnitId':_0x13f928,'text':JSON[_0x4f1039(0xec)](_0x282b42['content']),'parentId':_0x49735b}),_0x5c74db=_0x14f233(_0x4de25f['replies'][0x0]);return{..._0x5c74db,'children':_0x4de25f[_0x4f1039(0xad)][_0x4f1039(0x109)](0x1)[_0x4f1039(0xbe)](_0x29dff8=>_0x14f233(_0x29dff8,_0x5c74db['id']))};}return null;}let S=class{constructor(_0x2ee7f3,_0x58d0cc,_0x38f933){const _0x420dcd=_0x2b3a05;this['_httpService']=_0x2ee7f3,this[_0x420dcd(0xa8)]=_0x58d0cc,this[_0x420dcd(0xdd)]=_0x38f933;}async[_0x2b3a05(0xc5)](_0x5237fe){const _0x89560a=_0x2b3a05;var _0xb05776,_0x10b74d;const {parentId:_0x5654f9,unitId:_0x972565,text:_0x37986e,threadId:_0x2e044a}=_0x5237fe,_0x54bc0c=(_0x10b74d=(_0xb05776=_0x37986e[_0x89560a(0xaf)])==null?void 0x0:_0xb05776['filter'](_0x2d2b98=>_0x2d2b98[_0x89560a(0xe8)]===_0x450107[_0x89560a(0xa3)])[_0x89560a(0xbe)](_0x4f2c7a=>_0x4f2c7a[_0x89560a(0xd9)]))!=null?_0x10b74d:[],_0x3678f9=JSON[_0x89560a(0xd2)](_0x37986e),_0x54e823=(await this[_0x89560a(0xdd)][_0x89560a(0xd1)](_0x972565))[_0x89560a(0xb9)]();if(_0x5654f9){const _0x3b95d9={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c,'threadId':_0x2e044a},_0x39c1ec=(await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0xc7),{'body':_0x3b95d9}))[_0x89560a(0xd8)][_0x89560a(0xcb)];return{..._0x5237fe,'id':_0x39c1ec[_0x89560a(0xdb)],'dT':_0x8123a1(+_0x39c1ec[_0x89560a(0xca)])[_0x89560a(0xfb)](_0x89560a(0xb0)),'personId':_0x39c1ec[_0x89560a(0xc6)]};}else{const _0x1b5d8f={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c},_0x363458=await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0x103),{'body':_0x1b5d8f});return X(_0x363458[_0x89560a(0xd8)][_0x89560a(0xbf)],_0x5237fe);}}async['updateComment'](_0x1bb80e){const _0x23c55b=_0x2b3a05;var _0x2f7f46,_0x41ebd1;const {text:_0xff9c23,unitId:_0x23fdb3}=_0x1bb80e,_0x4a016c=(_0x41ebd1=(_0x2f7f46=_0xff9c23[_0x23c55b(0xaf)])==null?void 0x0:_0x2f7f46[_0x23c55b(0xb4)](_0x46c3ae=>_0x46c3ae[_0x23c55b(0xe8)]===_0x450107[_0x23c55b(0xa3)])[_0x23c55b(0xbe)](_0x31bced=>_0x31bced[_0x23c55b(0xd9)]))!=null?_0x41ebd1:[],_0x22036a=JSON[_0x23c55b(0xd2)](_0xff9c23),_0x26e176=_0x1bb80e['threadId'],_0x37c6ef=_0x1bb80e['id'],_0x2cb86c={'memberId':(await this['_sessionService']['requireSession'](_0x23fdb3))[_0x23c55b(0xb9)](),'unitId':_0x23fdb3,'threadId':_0x26e176,'mention':_0x4a016c,'content':_0x22036a,'replyId':_0x37c6ef},_0x1267e9=await this[_0x23c55b(0x100)][_0x23c55b(0xd6)](_0x23c55b(0xda)+_0x23fdb3+_0x23c55b(0xef),{'body':_0x2cb86c});return!_0x1267e9[_0x23c55b(0xd8)][_0x23c55b(0xee)]||_0x1267e9['body'][_0x23c55b(0xee)][_0x23c55b(0xa6)]===0x1;}async['resolveComment'](_0x21f90c){const _0x4f3c95=_0x2b3a05,{unitId:_0x12ce03}=_0x21f90c,_0xbf820e=_0x21f90c[_0x4f3c95(0xf5)],_0x2f1e7e={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x12ce03,'threadId':_0xbf820e,'solved':_0x21f90c[_0x4f3c95(0xe1)]?I[_0x4f3c95(0xb2)]:I[_0x4f3c95(0xc9)]},_0x52ed40=await this[_0x4f3c95(0x100)]['post']('/universer-api/comment/unit/'+_0x12ce03+_0x4f3c95(0xf9),{'body':_0x2f1e7e});return!_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)]||_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)][_0x4f3c95(0xa6)]===0x1;}async[_0x2b3a05(0xe9)](_0x543592,_0x5ba2ac,_0x532199,_0x445b27){const _0x43d901=_0x2b3a05,_0x54e169={'memberId':(await this[_0x43d901(0xdd)][_0x43d901(0xd1)](_0x543592))[_0x43d901(0xb9)](),'threadId':_0x532199,'replyId':_0x445b27,'unitId':_0x543592},_0x4152f7=await this[_0x43d901(0x100)]['post'](_0x43d901(0xda)+_0x543592+_0x43d901(0xa7),{'body':_0x54e169});return!_0x4152f7[_0x43d901(0xd8)]['error']||_0x4152f7['body'][_0x43d901(0xee)][_0x43d901(0xa6)]===0x1;}async[_0x2b3a05(0xf2)](_0x43fb89,_0x35dfc7,_0x44ccf7){const _0xdc56a0=_0x2b3a05,_0x2bb512={'unitId':_0x43fb89,'threadId':_0x44ccf7},_0x136aa3=await this[_0xdc56a0(0x100)][_0xdc56a0(0xd6)](_0xdc56a0(0xda)+_0x43fb89+_0xdc56a0(0xdf),{'body':_0x2bb512}),_0x396b45=_0x44ccf7[_0xdc56a0(0xbe)](_0x521a42=>ee(_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xd7)][_0x521a42],_0x43fb89,_0x35dfc7))['filter'](Boolean);return Object[_0xdc56a0(0xc0)](_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xfd)])[_0xdc56a0(0xaa)](_0x51b647=>{const _0x5f17ad=_0xdc56a0;this['_userService'][_0x5f17ad(0xf1)](_0x51b647);}),_0x396b45;}[_0x2b3a05(0xfa)](_0x532809){const _0x48a49a=_0x2b3a05;return{'id':_0x532809['id'],'threadId':_0x532809[_0x48a49a(0xf5)],'ref':_0x532809[_0x48a49a(0xc4)]};}};S=Q([b(0x0,_0x498129(_0x26a669)),b(0x1,_0x498129(_0x29389e)),b(0x2,_0x498129(_0x34dfc7))],S);var re=Object[_0x2b3a05(0xfe)],te=(_0x2b6795,_0x24c0d5,_0x177188,_0x2fa035)=>{for(var _0x5313f7=_0x2fa035>0x1?void 0x0:_0x2fa035?re(_0x24c0d5,_0x177188):_0x24c0d5,_0x3135b0=_0x2b6795['length']-0x1,_0x503ffd;_0x3135b0>=0x0;_0x3135b0--)(_0x503ffd=_0x2b6795[_0x3135b0])&&(_0x5313f7=_0x503ffd(_0x5313f7)||_0x5313f7);return _0x5313f7;},M=(_0x1f5aaa,_0x5cb32c)=>(_0x16b200,_0x5c335a)=>_0x5cb32c(_0x16b200,_0x5c335a,_0x1f5aaa);let f=class extends _0x36a07e{constructor(_0x16e3b6,_0x14ab06){const _0x40106c=_0x2b3a05;super(),this[_0x40106c(0xd5)]=_0x16e3b6,this[_0x40106c(0xb3)]=_0x14ab06,this['_initDataSource']();}['_initDataSource'](){const _0x29dfc7=_0x2b3a05;this[_0x29dfc7(0xd5)][_0x29dfc7(0xae)]=this[_0x29dfc7(0xb3)],this[_0x29dfc7(0xd5)][_0x29dfc7(0xab)]=!0x1;}};f=te([M(0x0,_0x4069f7),M(0x1,_0x498129(S))],f);var se=Object[_0x2b3a05(0xf6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xf6d3f8,_0x53120e,_0x40e63d)=>_0x53120e in _0xf6d3f8?se(_0xf6d3f8,_0x53120e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40e63d}):_0xf6d3f8[_0x53120e]=_0x40e63d,ie=(_0x46d76f,_0x43b2b0,_0x52d179,_0x723148)=>{const _0x465b61=_0x2b3a05;for(var _0x1267a0=_0x723148>0x1?void 0x0:_0x723148?oe(_0x43b2b0,_0x52d179):_0x43b2b0,_0x1a5a81=_0x46d76f[_0x465b61(0xbb)]-0x1,_0x56c178;_0x1a5a81>=0x0;_0x1a5a81--)(_0x56c178=_0x46d76f[_0x1a5a81])&&(_0x1267a0=_0x56c178(_0x1267a0)||_0x1267a0);return _0x1267a0;},N=(_0x516c10,_0x34c475)=>(_0x3d8091,_0x18876d)=>_0x34c475(_0x3d8091,_0x18876d,_0x516c10),$=(_0x24957d,_0x2ce9cd,_0x54fd97)=>ne(_0x24957d,typeof _0x2ce9cd!=_0x2b3a05(0xb8)?_0x2ce9cd+'':_0x2ce9cd,_0x54fd97);let g=class extends _0x1f8d6e{constructor(_0x30ac06=O,_0x33d4ec,_0x4403be){const _0x156dfb=_0x2b3a05;super(),this[_0x156dfb(0xbc)]=_0x30ac06,this['_injector']=_0x33d4ec,this[_0x156dfb(0xcf)]=_0x4403be;const {..._0x5ddd41}=_0x1b1ca2({},O,this['_config']);this[_0x156dfb(0xcf)][_0x156dfb(0xb5)](z,_0x5ddd41);}['onStarting'](){const _0x2796d5=_0x2b3a05;[[S],[f],[_]][_0x2796d5(0xaa)](_0x42ec86=>{const _0x175418=_0x2796d5;this[_0x175418(0xc8)][_0x175418(0xea)](_0x42ec86);});}[_0x2b3a05(0xd4)](){const _0x324ca2=_0x2b3a05;this[_0x324ca2(0xc8)][_0x324ca2(0xa5)](f),this[_0x324ca2(0xc8)]['get'](_);}};$(g,_0x2b3a05(0x102),W),$(g,'type',_0x5e44b5[_0x2b3a05(0x106)]),g=ie([_0x100038(_0xa3c3d4,_0x24dfe9,_0x2890f9),N(0x1,_0x498129(_0x4a0051)),N(0x2,_0x31db9c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xf2dd0a=_0x4f80;(function(_0x5d3492,_0x139a0a){const _0x1ac33b=_0x4f80,_0x30b8ca=_0x5d3492();while(!![]){try{const _0x5da65c=parseInt(_0x1ac33b(0x14a))/0x1+parseInt(_0x1ac33b(0x177))/0x2*(parseInt(_0x1ac33b(0x12d))/0x3)+parseInt(_0x1ac33b(0x12c))/0x4*(-parseInt(_0x1ac33b(0x18d))/0x5)+parseInt(_0x1ac33b(0x188))/0x6+-parseInt(_0x1ac33b(0x132))/0x7+-parseInt(_0x1ac33b(0x15b))/0x8*(-parseInt(_0x1ac33b(0x129))/0x9)+-parseInt(_0x1ac33b(0x150))/0xa;if(_0x5da65c===_0x139a0a)break;else _0x30b8ca['push'](_0x30b8ca['shift']());}catch(_0x19890a){_0x30b8ca['push'](_0x30b8ca['shift']());}}}(_0x20b3,0xba5e8));import{CommentService as _0x27ef41,CollaborationSessionService as _0x408cc2,UniverCollaborationClientPlugin as _0x4d714d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf62078}from'@univerjs-pro/license';import{dayjs as _0x3296f5,UserManagerService as _0x1a82c8,Inject as _0x2a723d,Injector as _0x48547d,Disposable as _0x5f0700,CustomRangeType as _0x8aea36,UniverInstanceType as _0x561314,DependentOn as _0xd6cc24,IConfigService as _0x3fbe75,Plugin as _0xa37bcf,merge as _0x3de015}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55c17b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x378e1d,IThreadCommentDataSourceService as _0x2bb3bb}from'@univerjs/thread-comment';import{bufferTime as _0x2eb9bc}from'rxjs';import{HTTPService as _0x105545}from'@univerjs/network';const W=_0xf2dd0a(0x169);var I=(_0x3f38d7=>(_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x12b)]=0x0]=_0xf2dd0a(0x12b),_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x181)]=0x1]=_0xf2dd0a(0x181),_0x3f38d7[_0x3f38d7['UNRECOGNIZED']=-0x1]=_0xf2dd0a(0x18b),_0x3f38d7))(I||{}),v=(_0x74bc2e=>(_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x154)]=0x0]=_0xf2dd0a(0x154),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x161)]=0x1]=_0xf2dd0a(0x161),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x149)]=0x2]=_0xf2dd0a(0x149),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x156)]=0x3]='Edit',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x139)]=0x4]='Delete',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x158)]=0x5]=_0xf2dd0a(0x158),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x18b)]=-0x1]=_0xf2dd0a(0x18b),_0x74bc2e))(v||{});const y=_0x4ff9da=>_0x3296f5(new Date(+_0x4ff9da))[_0xf2dd0a(0x128)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x14f257,_0x1663fb)=>{const _0x2ed6f0=_0xf2dd0a,_0x60d12b=_0x14f257['get'](_0x1a82c8),_0x29195a=_0x14f257[_0x2ed6f0(0x130)](_0x105545);_0x1663fb[_0x2ed6f0(0x144)](_0x2167d6=>{const _0x2554c1=_0x2ed6f0;_0x60d12b['getUser'](_0x2167d6)&&_0x1663fb[_0x2554c1(0x14e)](_0x2167d6);}),_0x1663fb[_0x2ed6f0(0x17a)]&&(await _0x29195a['get'](_0x2ed6f0(0x141),{'params':{'userIDs':[..._0x1663fb]}}))[_0x2ed6f0(0x16c)]['users'][_0x2ed6f0(0x144)](_0x349ba6=>{const _0x328932=_0x2ed6f0;_0x349ba6&&_0x60d12b[_0x328932(0x164)](_0x349ba6);});};var K=Object[_0xf2dd0a(0x180)],V=(_0xf6bd97,_0x2acb42,_0x581d3a,_0x29947b)=>{const _0x3894b9=_0xf2dd0a;for(var _0x34f9cf=_0x29947b>0x1?void 0x0:_0x29947b?K(_0x2acb42,_0x581d3a):_0x2acb42,_0x12e167=_0xf6bd97[_0x3894b9(0x13e)]-0x1,_0x3fd1bb;_0x12e167>=0x0;_0x12e167--)(_0x3fd1bb=_0xf6bd97[_0x12e167])&&(_0x34f9cf=_0x3fd1bb(_0x34f9cf)||_0x34f9cf);return _0x34f9cf;},p=(_0x324197,_0x11351c)=>(_0x32dd4f,_0x173b14)=>_0x11351c(_0x32dd4f,_0x173b14,_0x324197);let _=class extends _0x5f0700{constructor(_0x16e83d,_0x12f3ff,_0x97344f,_0x1e96e3){const _0x4546ac=_0xf2dd0a;super(),this['_commentService']=_0x16e83d,this[_0x4546ac(0x165)]=_0x12f3ff,this[_0x4546ac(0x171)]=_0x97344f,this[_0x4546ac(0x14b)]=_0x1e96e3,this[_0x4546ac(0x138)](),this[_0x4546ac(0x17d)]();}[_0xf2dd0a(0x17d)](){const _0x354784=_0xf2dd0a;this[_0x354784(0x16b)](this[_0x354784(0x165)][_0x354784(0x187)]['pipe'](_0x2eb9bc(0x10))[_0x354784(0x145)](_0x41dd81=>{const _0x576917=_0x354784,_0x23ccf9=new Set();_0x41dd81[_0x576917(0x144)](_0x164fff=>{const _0x29e8c9=_0x576917;switch(_0x164fff[_0x29e8c9(0x137)]){case'add':{const _0x591f11=_0x164fff['payload'][_0x29e8c9(0x189)];_0x23ccf9['add'](_0x591f11);break;}}}),B(this[_0x576917(0x14b)],_0x23ccf9);}));}[_0xf2dd0a(0x138)](){const _0x40ac59=_0xf2dd0a;this[_0x40ac59(0x16b)](this[_0x40ac59(0x16a)][_0x40ac59(0x187)][_0x40ac59(0x145)](async _0xb6794c=>{const _0x3dbbcb=_0x40ac59;var _0x5a9004,_0x5d7313,_0x2f6c21,_0x514210;const _0x13ceed=(_0x5a9004=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x13d)](_0xb6794c[_0x3dbbcb(0x172)])[_0x3dbbcb(0x135)](_0x20214e=>_0x20214e['threadId']===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x5a9004[_0x3dbbcb(0x151)];if(!_0x13ceed)return;const {unitId:_0xc065bf,subUnitId:_0x425db2}=_0x13ceed;switch(_0xb6794c[_0x3dbbcb(0x17f)]&&this[_0x3dbbcb(0x171)][_0x3dbbcb(0x164)](_0xb6794c[_0x3dbbcb(0x17f)]),_0xb6794c[_0x3dbbcb(0x137)]){case v[_0x3dbbcb(0x161)]:break;case v[_0x3dbbcb(0x149)]:{this[_0x3dbbcb(0x165)]['addComment'](_0xc065bf,_0x425db2,{'unitId':_0xc065bf,'subUnitId':_0x425db2,'ref':'','id':_0xb6794c[_0x3dbbcb(0x18a)],'dT':y(+_0xb6794c['createTimestamp']),'threadId':_0xb6794c[_0x3dbbcb(0x184)],'personId':(_0x2f6c21=(_0x5d7313=_0xb6794c[_0x3dbbcb(0x17f)])==null?void 0x0:_0x5d7313[_0x3dbbcb(0x152)])!=null?_0x2f6c21:_0xb6794c['userId'],'text':JSON[_0x3dbbcb(0x18c)](_0xb6794c[_0x3dbbcb(0x143)]),'parentId':_0x13ceed['id']});break;}case v[_0x3dbbcb(0x139)]:{const _0x48c22d=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x142)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);_0x48c22d&&_0x48c22d[_0x3dbbcb(0x146)]&&this['_threadCommentModel'][_0x3dbbcb(0x13b)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);break;}case v[_0x3dbbcb(0x156)]:{this[_0x3dbbcb(0x165)][_0x3dbbcb(0x131)](_0xc065bf,_0x425db2,{'commentId':_0xb6794c[_0x3dbbcb(0x18a)],'text':JSON['parse'](_0xb6794c[_0x3dbbcb(0x143)])});break;}case v[_0x3dbbcb(0x158)]:{const _0x402136=(_0x514210=this['_threadCommentModel']['getUnit'](_0xb6794c[_0x3dbbcb(0x172)])['find'](_0x31de39=>_0x31de39[_0x3dbbcb(0x184)]===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x514210['root'];_0x402136&&this[_0x3dbbcb(0x165)][_0x3dbbcb(0x167)](_0xc065bf,_0x425db2,_0x402136['id'],_0xb6794c[_0x3dbbcb(0x14c)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x2a723d(_0x27ef41)),p(0x1,_0x2a723d(_0x378e1d)),p(0x2,_0x2a723d(_0x1a82c8)),p(0x3,_0x2a723d(_0x48547d))],_);const z=_0xf2dd0a(0x16f),O={};var k=Object[_0xf2dd0a(0x180)],Q=(_0x121ad6,_0x2099aa,_0xbb3d2b,_0x5ca734)=>{for(var _0xda0bf6=_0x5ca734>0x1?void 0x0:_0x5ca734?k(_0x2099aa,_0xbb3d2b):_0x2099aa,_0xc12bea=_0x121ad6['length']-0x1,_0x3815eb;_0xc12bea>=0x0;_0xc12bea--)(_0x3815eb=_0x121ad6[_0xc12bea])&&(_0xda0bf6=_0x3815eb(_0xda0bf6)||_0xda0bf6);return _0xda0bf6;},b=(_0x18125b,_0x4381de)=>(_0x5a6f9f,_0x387ab5)=>_0x4381de(_0x5a6f9f,_0x387ab5,_0x18125b);function _0x20b3(){const _0xc2e80c=['/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','disposeWithMe','body','UNIVER_UNKNOWN','filter','thread-comment-data-source.config','slice','_userService','unitId','_httpService','COMMENT','getCurrentUser','onStarting','2gcrWcU','/reply','_config','size','comment','_configService','_initUserSync','defineProperty','user','getOwnPropertyDescriptor','Solved','addComment','YYYY/MM/DD\x20HH:mm','threadId','/add','customRanges','commentUpdate$','6815640KPJKBg','personId','replyId','UNRECOGNIZED','parse','4170XRqfsC','_sessionService','format','2670363FDClmw','users','OpenOrReOpen','6712swSIDj','2582373JjyrMK','add','listComments','get','updateComment','9569280BVbtga','map','requireSession','find','/universer-api/comment/unit/','type','_init','Delete','rangeType','deleteComment','getMemberID','getUnit','length','syncUpdateMutationToColla','_threadCommentDataSourceService','/universer-api/user/list','getComment','content','forEach','subscribe','parentId','/list','/edit','Reply','236418JBsXCB','_injector','solved','error','delete','post','1868240HNBtQJ','root','userID','setConfig','Unknown','_threadCommentDataSource','Edit','resolved','Solve','stringify','replies','40iIaDqq','symbol','reply','userId','rangeId','dataSource','Add','_initDataSource','code','addUser','_threadCommentModel','createTimestamp','resolveComment'];_0x20b3=function(){return _0xc2e80c;};return _0x20b3();}function X(_0x36dd8f,_0x43caab){const _0x1f2558=_0xf2dd0a,_0x53c775=_0x36dd8f[_0x1f2558(0x15a)][0x0];return{..._0x43caab,'id':_0x53c775['replyId'],'resolved':_0x36dd8f[_0x1f2558(0x14c)]===0x1,'dT':y(_0x53c775[_0x1f2558(0x166)]),'personId':_0x53c775[_0x1f2558(0x15e)],'threadId':_0x53c775[_0x1f2558(0x184)]};}function ee(_0x2f6674,_0x5b0134,_0x1ad43c){const _0x398fd6=_0xf2dd0a;var _0x52f95a,_0x5d1eae;if(((_0x5d1eae=(_0x52f95a=_0x2f6674==null?void 0x0:_0x2f6674[_0x398fd6(0x15a)])==null?void 0x0:_0x52f95a[_0x398fd6(0x13e)])!=null?_0x5d1eae:0x0)>0x0){const _0x422ddf=(_0x15657c,_0x1c9cbf)=>({'id':_0x15657c[_0x398fd6(0x18a)],'threadId':_0x15657c[_0x398fd6(0x184)],'dT':y(_0x15657c[_0x398fd6(0x166)]),'personId':_0x15657c[_0x398fd6(0x15e)],'resolved':_0x2f6674[_0x398fd6(0x14c)]===I[_0x398fd6(0x181)],'unitId':_0x5b0134,'subUnitId':_0x1ad43c,'text':JSON[_0x398fd6(0x18c)](_0x15657c[_0x398fd6(0x143)]),'parentId':_0x1c9cbf}),_0x542975=_0x422ddf(_0x2f6674[_0x398fd6(0x15a)][0x0]);return{..._0x542975,'children':_0x2f6674[_0x398fd6(0x15a)][_0x398fd6(0x170)](0x1)[_0x398fd6(0x133)](_0x4ed855=>_0x422ddf(_0x4ed855,_0x542975['id']))};}return null;}let S=class{constructor(_0x501c85,_0x9778bf,_0x4a0706){const _0x488c6e=_0xf2dd0a;this['_httpService']=_0x501c85,this[_0x488c6e(0x171)]=_0x9778bf,this[_0x488c6e(0x18e)]=_0x4a0706;}async[_0xf2dd0a(0x182)](_0x22fe1d){const _0x32a6be=_0xf2dd0a;var _0x225ad7,_0x82421;const {parentId:_0x329542,unitId:_0x38cbfc,text:_0x1c6112,threadId:_0x5ebdb5}=_0x22fe1d,_0x7157e3=(_0x82421=(_0x225ad7=_0x1c6112[_0x32a6be(0x186)])==null?void 0x0:_0x225ad7[_0x32a6be(0x16e)](_0x233b9f=>_0x233b9f[_0x32a6be(0x13a)]===_0x8aea36[_0x32a6be(0x174)])[_0x32a6be(0x133)](_0x20329a=>_0x20329a['rangeId']))!=null?_0x82421:[],_0xc8c301=JSON[_0x32a6be(0x159)](_0x1c6112),_0x1196e2=(await this[_0x32a6be(0x18e)][_0x32a6be(0x134)](_0x38cbfc))[_0x32a6be(0x13c)]();if(_0x329542){const _0x1712f0={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3,'threadId':_0x5ebdb5},_0x5a8480=(await this['_httpService']['post'](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x178),{'body':_0x1712f0}))[_0x32a6be(0x16c)][_0x32a6be(0x15d)];return{..._0x22fe1d,'id':_0x5a8480[_0x32a6be(0x18a)],'dT':_0x3296f5(+_0x5a8480[_0x32a6be(0x166)])[_0x32a6be(0x128)](_0x32a6be(0x183)),'personId':_0x5a8480['userId']};}else{const _0x25f543={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3},_0x18f544=await this[_0x32a6be(0x173)][_0x32a6be(0x14f)](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x185),{'body':_0x25f543});return X(_0x18f544['body'][_0x32a6be(0x17b)],_0x22fe1d);}}async[_0xf2dd0a(0x131)](_0x2b5516){const _0x281c01=_0xf2dd0a;var _0x4c9901,_0x31daf5;const {text:_0x1eabcf,unitId:_0xf44fcc}=_0x2b5516,_0x3da96a=(_0x31daf5=(_0x4c9901=_0x1eabcf['customRanges'])==null?void 0x0:_0x4c9901['filter'](_0x34afb5=>_0x34afb5[_0x281c01(0x13a)]===_0x8aea36[_0x281c01(0x174)])[_0x281c01(0x133)](_0x45002d=>_0x45002d[_0x281c01(0x15f)]))!=null?_0x31daf5:[],_0xc320be=JSON[_0x281c01(0x159)](_0x1eabcf),_0x340380=_0x2b5516[_0x281c01(0x184)],_0x375d5b=_0x2b5516['id'],_0x431709={'memberId':(await this[_0x281c01(0x18e)]['requireSession'](_0xf44fcc))[_0x281c01(0x13c)](),'unitId':_0xf44fcc,'threadId':_0x340380,'mention':_0x3da96a,'content':_0xc320be,'replyId':_0x375d5b},_0x48a4b2=await this[_0x281c01(0x173)][_0x281c01(0x14f)]('/universer-api/comment/unit/'+_0xf44fcc+_0x281c01(0x148),{'body':_0x431709});return!_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)]||_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)][_0x281c01(0x163)]===0x1;}async[_0xf2dd0a(0x167)](_0x46894a){const _0x34faa1=_0xf2dd0a,{unitId:_0x28685f}=_0x46894a,_0x276e95=_0x46894a['threadId'],_0x1d22ef={'memberId':this[_0x34faa1(0x171)][_0x34faa1(0x175)]()[_0x34faa1(0x152)],'unitId':_0x28685f,'threadId':_0x276e95,'solved':_0x46894a[_0x34faa1(0x157)]?I[_0x34faa1(0x181)]:I[_0x34faa1(0x12b)]},_0x53a167=await this['_httpService'][_0x34faa1(0x14f)]('/universer-api/comment/unit/'+_0x28685f+'/solved',{'body':_0x1d22ef});return!_0x53a167[_0x34faa1(0x16c)][_0x34faa1(0x14d)]||_0x53a167[_0x34faa1(0x16c)]['error'][_0x34faa1(0x163)]===0x1;}async['deleteComment'](_0x5505fb,_0x2530ff,_0x581f06,_0x2ae049){const _0x208c41=_0xf2dd0a,_0x319a56={'memberId':(await this[_0x208c41(0x18e)]['requireSession'](_0x5505fb))[_0x208c41(0x13c)](),'threadId':_0x581f06,'replyId':_0x2ae049,'unitId':_0x5505fb},_0xe85e02=await this[_0x208c41(0x173)][_0x208c41(0x14f)](_0x208c41(0x136)+_0x5505fb+_0x208c41(0x168),{'body':_0x319a56});return!_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)]||_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)][_0x208c41(0x163)]===0x1;}async[_0xf2dd0a(0x12f)](_0x4e2784,_0x34788e,_0x139f5f){const _0x3cc636=_0xf2dd0a,_0x44bac9={'unitId':_0x4e2784,'threadId':_0x139f5f},_0x11cb45=await this['_httpService'][_0x3cc636(0x14f)](_0x3cc636(0x136)+_0x4e2784+_0x3cc636(0x147),{'body':_0x44bac9}),_0x4a706f=_0x139f5f[_0x3cc636(0x133)](_0x516815=>ee(_0x11cb45['body']['comments'][_0x516815],_0x4e2784,_0x34788e))['filter'](Boolean);return Object['values'](_0x11cb45[_0x3cc636(0x16c)][_0x3cc636(0x12a)])[_0x3cc636(0x144)](_0x407cfd=>{this['_userService']['addUser'](_0x407cfd);}),_0x4a706f;}['saveCommentToSnapshot'](_0x111ede){const _0x42ff2f=_0xf2dd0a;return{'id':_0x111ede['id'],'threadId':_0x111ede[_0x42ff2f(0x184)],'ref':_0x111ede['ref']};}};function _0x4f80(_0xafa963,_0x53b3ab){const _0x20b31c=_0x20b3();return _0x4f80=function(_0x4f8050,_0x2f83d0){_0x4f8050=_0x4f8050-0x128;let _0x267939=_0x20b31c[_0x4f8050];return _0x267939;},_0x4f80(_0xafa963,_0x53b3ab);}S=Q([b(0x0,_0x2a723d(_0x105545)),b(0x1,_0x2a723d(_0x1a82c8)),b(0x2,_0x2a723d(_0x408cc2))],S);var re=Object[_0xf2dd0a(0x180)],te=(_0xb5e824,_0xa391bc,_0x1e4e99,_0x394c85)=>{const _0x3d1b5b=_0xf2dd0a;for(var _0x4b4688=_0x394c85>0x1?void 0x0:_0x394c85?re(_0xa391bc,_0x1e4e99):_0xa391bc,_0x383471=_0xb5e824[_0x3d1b5b(0x13e)]-0x1,_0x4c51b7;_0x383471>=0x0;_0x383471--)(_0x4c51b7=_0xb5e824[_0x383471])&&(_0x4b4688=_0x4c51b7(_0x4b4688)||_0x4b4688);return _0x4b4688;},M=(_0x2c2d19,_0x9fcb9f)=>(_0x3620cf,_0x100100)=>_0x9fcb9f(_0x3620cf,_0x100100,_0x2c2d19);let f=class extends _0x5f0700{constructor(_0xea660f,_0x175171){const _0x12490e=_0xf2dd0a;super(),this[_0x12490e(0x140)]=_0xea660f,this[_0x12490e(0x155)]=_0x175171,this['_initDataSource']();}[_0xf2dd0a(0x162)](){const _0x1fd6d0=_0xf2dd0a;this[_0x1fd6d0(0x140)][_0x1fd6d0(0x160)]=this[_0x1fd6d0(0x155)],this['_threadCommentDataSourceService'][_0x1fd6d0(0x13f)]=!0x1;}};f=te([M(0x0,_0x2bb3bb),M(0x1,_0x2a723d(S))],f);var se=Object[_0xf2dd0a(0x17e)],oe=Object[_0xf2dd0a(0x180)],ne=(_0x5df8ae,_0x1cd5b7,_0x5911ff)=>_0x1cd5b7 in _0x5df8ae?se(_0x5df8ae,_0x1cd5b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5911ff}):_0x5df8ae[_0x1cd5b7]=_0x5911ff,ie=(_0x53b488,_0x53832f,_0x1aa73f,_0x1aa272)=>{const _0x3b3a05=_0xf2dd0a;for(var _0x132eeb=_0x1aa272>0x1?void 0x0:_0x1aa272?oe(_0x53832f,_0x1aa73f):_0x53832f,_0x5ef4a7=_0x53b488[_0x3b3a05(0x13e)]-0x1,_0x247717;_0x5ef4a7>=0x0;_0x5ef4a7--)(_0x247717=_0x53b488[_0x5ef4a7])&&(_0x132eeb=_0x247717(_0x132eeb)||_0x132eeb);return _0x132eeb;},N=(_0x2fee8f,_0x318ed6)=>(_0x37d2ba,_0x2224df)=>_0x318ed6(_0x37d2ba,_0x2224df,_0x2fee8f),$=(_0x3df332,_0x5200d7,_0xdef899)=>ne(_0x3df332,typeof _0x5200d7!=_0xf2dd0a(0x15c)?_0x5200d7+'':_0x5200d7,_0xdef899);let g=class extends _0xa37bcf{constructor(_0x12010b=O,_0x21ffe7,_0x58d343){const _0x2a10bf=_0xf2dd0a;super(),this['_config']=_0x12010b,this['_injector']=_0x21ffe7,this[_0x2a10bf(0x17c)]=_0x58d343;const {..._0x37b03a}=_0x3de015({},O,this[_0x2a10bf(0x179)]);this['_configService'][_0x2a10bf(0x153)](z,_0x37b03a);}[_0xf2dd0a(0x176)](){const _0x464609=_0xf2dd0a;[[S],[f],[_]][_0x464609(0x144)](_0x35b556=>{const _0x3912a1=_0x464609;this['_injector'][_0x3912a1(0x12e)](_0x35b556);});}['onReady'](){const _0x55e5c8=_0xf2dd0a;this[_0x55e5c8(0x14b)]['get'](f),this[_0x55e5c8(0x14b)][_0x55e5c8(0x130)](_);}};$(g,'pluginName',W),$(g,_0xf2dd0a(0x137),_0x561314[_0xf2dd0a(0x16d)]),g=ie([_0xd6cc24(_0x55c17b,_0x4d714d,_0xf62078),N(0x1,_0x2a723d(_0x48547d)),N(0x2,_0x3fbe75)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x2a0d(){const _0x5d0c5e=['getOwnPropertyDescriptor','_init','_httpService','unitId','pluginName','/add','410003ZrOwBA','getUnit','UNIVER_UNKNOWN','user','type','slice','delete','COMMENT','commentUpdate$','get','code','/delete','_userService','content','forEach','syncUpdateMutationToColla','Reply','replies','dataSource','customRanges','YYYY/MM/DD\x20HH:mm','55DxAgtR','Solved','_threadCommentDataSource','filter','setConfig','payload','subscribe','symbol','getMemberID','85196AsVuof','length','_config','840864WiteAJ','map','comment','values','Unknown','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Edit','ref','addComment','userId','/reply','_injector','OpenOrReOpen','createTimestamp','reply','Delete','thread-comment-data-source.config','find','_configService','_initUserSync','requireSession','stringify','486525wvJUtb','onReady','_threadCommentDataSourceService','post','comments','body','rangeId','/universer-api/comment/unit/','replyId','9AKoaPU','_sessionService','size','/list','3487344GtSZhE','resolved','_commentService','disposeWithMe','Add','1203642ZWZhCv','UNRECOGNIZED','getComment','rangeType','deleteComment','add','2187848SUCEhq','parse','resolveComment','error','/edit','updateComment','addUser','listComments','userID','solved','threadId','defineProperty','parentId','pipe','/solved','saveCommentToSnapshot','format','_threadCommentModel','users'];_0x2a0d=function(){return _0x5d0c5e;};return _0x2a0d();}const _0x2b3a05=_0x81a1;(function(_0x5937ad,_0x232c0a){const _0x9b48ba=_0x81a1,_0x23d8e0=_0x5937ad();while(!![]){try{const _0x328333=parseInt(_0x9b48ba(0x104))/0x1+-parseInt(_0x9b48ba(0xe5))/0x2+-parseInt(_0x9b48ba(0xd3))/0x3+-parseInt(_0x9b48ba(0xba))/0x4*(parseInt(_0x9b48ba(0xb1))/0x5)+parseInt(_0x9b48ba(0xbd))/0x6+parseInt(_0x9b48ba(0xe0))/0x7+parseInt(_0x9b48ba(0xeb))/0x8*(parseInt(_0x9b48ba(0xdc))/0x9);if(_0x328333===_0x232c0a)break;else _0x23d8e0['push'](_0x23d8e0['shift']());}catch(_0x28618b){_0x23d8e0['push'](_0x23d8e0['shift']());}}}(_0x2a0d,0x4efcf));import{CommentService as _0x57eda0,CollaborationSessionService as _0x34dfc7,UniverCollaborationClientPlugin as _0x24dfe9}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2890f9}from'@univerjs-pro/license';import{dayjs as _0x8123a1,UserManagerService as _0x29389e,Inject as _0x498129,Injector as _0x4a0051,Disposable as _0x36a07e,CustomRangeType as _0x450107,UniverInstanceType as _0x5e44b5,DependentOn as _0x100038,IConfigService as _0x31db9c,Plugin as _0x1f8d6e,merge as _0x1b1ca2}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xa3c3d4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x59939f,IThreadCommentDataSourceService as _0x4069f7}from'@univerjs/thread-comment';import{bufferTime as _0x2daf75}from'rxjs';import{HTTPService as _0x26a669}from'@univerjs/network';const W=_0x2b3a05(0xc2);var I=(_0x145428=>(_0x145428[_0x145428[_0x2b3a05(0xc9)]=0x0]='OpenOrReOpen',_0x145428[_0x145428[_0x2b3a05(0xb2)]=0x1]=_0x2b3a05(0xb2),_0x145428[_0x145428[_0x2b3a05(0xe6)]=-0x1]='UNRECOGNIZED',_0x145428))(I||{}),v=(_0x130188=>(_0x130188[_0x130188[_0x2b3a05(0xc1)]=0x0]=_0x2b3a05(0xc1),_0x130188[_0x130188[_0x2b3a05(0xe4)]=0x1]=_0x2b3a05(0xe4),_0x130188[_0x130188['Reply']=0x2]=_0x2b3a05(0xac),_0x130188[_0x130188['Edit']=0x3]=_0x2b3a05(0xc3),_0x130188[_0x130188['Delete']=0x4]=_0x2b3a05(0xcc),_0x130188[_0x130188['Solve']=0x5]='Solve',_0x130188[_0x130188[_0x2b3a05(0xe6)]=-0x1]=_0x2b3a05(0xe6),_0x130188))(v||{});const y=_0x177b1d=>_0x8123a1(new Date(+_0x177b1d))[_0x2b3a05(0xfb)](_0x2b3a05(0xb0)),B=async(_0x46cc82,_0x2ba6db)=>{const _0x9493a3=_0x2b3a05,_0x6ea9fc=_0x46cc82[_0x9493a3(0xa5)](_0x29389e),_0x152d99=_0x46cc82[_0x9493a3(0xa5)](_0x26a669);_0x2ba6db['forEach'](_0xe0a975=>{const _0x504d9e=_0x9493a3;_0x6ea9fc['getUser'](_0xe0a975)&&_0x2ba6db[_0x504d9e(0x10a)](_0xe0a975);}),_0x2ba6db[_0x9493a3(0xde)]&&(await _0x152d99['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x2ba6db]}}))[_0x9493a3(0xd8)][_0x9493a3(0xfd)][_0x9493a3(0xaa)](_0x4ca041=>{_0x4ca041&&_0x6ea9fc['addUser'](_0x4ca041);});};var K=Object[_0x2b3a05(0xfe)],V=(_0x3ccb97,_0x1bf184,_0x14da28,_0x2e9ef7)=>{for(var _0x1eae47=_0x2e9ef7>0x1?void 0x0:_0x2e9ef7?K(_0x1bf184,_0x14da28):_0x1bf184,_0x82114d=_0x3ccb97['length']-0x1,_0xcf1a2;_0x82114d>=0x0;_0x82114d--)(_0xcf1a2=_0x3ccb97[_0x82114d])&&(_0x1eae47=_0xcf1a2(_0x1eae47)||_0x1eae47);return _0x1eae47;},p=(_0x127bbb,_0x4ddbf6)=>(_0x3fe9ec,_0x1834e3)=>_0x4ddbf6(_0x3fe9ec,_0x1834e3,_0x127bbb);let _=class extends _0x36a07e{constructor(_0x31a92b,_0x5dbcb1,_0x24fda3,_0x49e3e8){const _0x39452e=_0x2b3a05;super(),this[_0x39452e(0xe2)]=_0x31a92b,this[_0x39452e(0xfc)]=_0x5dbcb1,this[_0x39452e(0xa8)]=_0x24fda3,this[_0x39452e(0xc8)]=_0x49e3e8,this[_0x39452e(0xff)](),this['_initUserSync']();}[_0x2b3a05(0xd0)](){const _0x38e32f=_0x2b3a05;this[_0x38e32f(0xe3)](this[_0x38e32f(0xfc)][_0x38e32f(0xa4)][_0x38e32f(0xf8)](_0x2daf75(0x10))[_0x38e32f(0xb7)](_0x3fc155=>{const _0x2153a1=_0x38e32f,_0x3abdc6=new Set();_0x3fc155[_0x2153a1(0xaa)](_0x7b70a4=>{const _0xaa0e38=_0x2153a1;switch(_0x7b70a4[_0xaa0e38(0x108)]){case _0xaa0e38(0xea):{const _0x436d90=_0x7b70a4[_0xaa0e38(0xb6)]['personId'];_0x3abdc6['add'](_0x436d90);break;}}}),B(this[_0x2153a1(0xc8)],_0x3abdc6);}));}[_0x2b3a05(0xff)](){const _0x4411d9=_0x2b3a05;this[_0x4411d9(0xe3)](this[_0x4411d9(0xe2)]['commentUpdate$'][_0x4411d9(0xb7)](async _0x2c708d=>{const _0x5c7953=_0x4411d9;var _0x4b0a00,_0x31c3e3,_0x2f3d3a,_0x2a5386;const _0x5d36f4=(_0x4b0a00=this[_0x5c7953(0xfc)][_0x5c7953(0x105)](_0x2c708d[_0x5c7953(0x101)])[_0x5c7953(0xce)](_0x69703e=>_0x69703e[_0x5c7953(0xf5)]===_0x2c708d[_0x5c7953(0xf5)]))==null?void 0x0:_0x4b0a00['root'];if(!_0x5d36f4)return;const {unitId:_0xa6e968,subUnitId:_0xa812bc}=_0x5d36f4;switch(_0x2c708d[_0x5c7953(0x107)]&&this['_userService'][_0x5c7953(0xf1)](_0x2c708d[_0x5c7953(0x107)]),_0x2c708d[_0x5c7953(0x108)]){case v[_0x5c7953(0xe4)]:break;case v[_0x5c7953(0xac)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xc5)](_0xa6e968,_0xa812bc,{'unitId':_0xa6e968,'subUnitId':_0xa812bc,'ref':'','id':_0x2c708d[_0x5c7953(0xdb)],'dT':y(+_0x2c708d[_0x5c7953(0xca)]),'threadId':_0x2c708d[_0x5c7953(0xf5)],'personId':(_0x2f3d3a=(_0x31c3e3=_0x2c708d[_0x5c7953(0x107)])==null?void 0x0:_0x31c3e3[_0x5c7953(0xf3)])!=null?_0x2f3d3a:_0x2c708d[_0x5c7953(0xc6)],'text':JSON[_0x5c7953(0xec)](_0x2c708d['content']),'parentId':_0x5d36f4['id']});break;}case v['Delete']:{const _0x13abc4=this[_0x5c7953(0xfc)][_0x5c7953(0xe7)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);_0x13abc4&&_0x13abc4[_0x5c7953(0xf7)]&&this[_0x5c7953(0xfc)][_0x5c7953(0xe9)](_0xa6e968,_0xa812bc,_0x2c708d['replyId']);break;}case v[_0x5c7953(0xc3)]:{this[_0x5c7953(0xfc)][_0x5c7953(0xf0)](_0xa6e968,_0xa812bc,{'commentId':_0x2c708d['replyId'],'text':JSON[_0x5c7953(0xec)](_0x2c708d[_0x5c7953(0xa9)])});break;}case v['Solve']:{const _0x5f0403=(_0x2a5386=this[_0x5c7953(0xfc)]['getUnit'](_0x2c708d[_0x5c7953(0x101)])['find'](_0x346a0d=>_0x346a0d['threadId']===_0x2c708d['threadId']))==null?void 0x0:_0x2a5386['root'];_0x5f0403&&this[_0x5c7953(0xfc)][_0x5c7953(0xed)](_0xa6e968,_0xa812bc,_0x5f0403['id'],_0x2c708d['solved']===I[_0x5c7953(0xb2)]);break;}}}));}};_=V([p(0x0,_0x498129(_0x57eda0)),p(0x1,_0x498129(_0x59939f)),p(0x2,_0x498129(_0x29389e)),p(0x3,_0x498129(_0x4a0051))],_);const z=_0x2b3a05(0xcd),O={};var k=Object[_0x2b3a05(0xfe)],Q=(_0x137738,_0x58e2dd,_0x33fb3e,_0xa4184d)=>{const _0x3d3795=_0x2b3a05;for(var _0x5a0188=_0xa4184d>0x1?void 0x0:_0xa4184d?k(_0x58e2dd,_0x33fb3e):_0x58e2dd,_0x4e6697=_0x137738[_0x3d3795(0xbb)]-0x1,_0x1c6276;_0x4e6697>=0x0;_0x4e6697--)(_0x1c6276=_0x137738[_0x4e6697])&&(_0x5a0188=_0x1c6276(_0x5a0188)||_0x5a0188);return _0x5a0188;},b=(_0x58e9f7,_0x2d8fb1)=>(_0x3ef83b,_0x1f6602)=>_0x2d8fb1(_0x3ef83b,_0x1f6602,_0x58e9f7);function _0x81a1(_0x59653b,_0x3e4848){const _0x2a0d55=_0x2a0d();return _0x81a1=function(_0x81a15b,_0xae53e9){_0x81a15b=_0x81a15b-0xa3;let _0x462405=_0x2a0d55[_0x81a15b];return _0x462405;},_0x81a1(_0x59653b,_0x3e4848);}function X(_0x4c2bcc,_0x2abf67){const _0x405497=_0x2b3a05,_0x24f327=_0x4c2bcc['replies'][0x0];return{..._0x2abf67,'id':_0x24f327[_0x405497(0xdb)],'resolved':_0x4c2bcc[_0x405497(0xf4)]===0x1,'dT':y(_0x24f327[_0x405497(0xca)]),'personId':_0x24f327['userId'],'threadId':_0x24f327[_0x405497(0xf5)]};}function ee(_0x4de25f,_0x3f471b,_0x13f928){const _0x4f1039=_0x2b3a05;var _0x55fd92,_0x20976b;if(((_0x20976b=(_0x55fd92=_0x4de25f==null?void 0x0:_0x4de25f[_0x4f1039(0xad)])==null?void 0x0:_0x55fd92[_0x4f1039(0xbb)])!=null?_0x20976b:0x0)>0x0){const _0x14f233=(_0x282b42,_0x49735b)=>({'id':_0x282b42[_0x4f1039(0xdb)],'threadId':_0x282b42[_0x4f1039(0xf5)],'dT':y(_0x282b42[_0x4f1039(0xca)]),'personId':_0x282b42[_0x4f1039(0xc6)],'resolved':_0x4de25f[_0x4f1039(0xf4)]===I['Solved'],'unitId':_0x3f471b,'subUnitId':_0x13f928,'text':JSON[_0x4f1039(0xec)](_0x282b42['content']),'parentId':_0x49735b}),_0x5c74db=_0x14f233(_0x4de25f['replies'][0x0]);return{..._0x5c74db,'children':_0x4de25f[_0x4f1039(0xad)][_0x4f1039(0x109)](0x1)[_0x4f1039(0xbe)](_0x29dff8=>_0x14f233(_0x29dff8,_0x5c74db['id']))};}return null;}let S=class{constructor(_0x2ee7f3,_0x58d0cc,_0x38f933){const _0x420dcd=_0x2b3a05;this['_httpService']=_0x2ee7f3,this[_0x420dcd(0xa8)]=_0x58d0cc,this[_0x420dcd(0xdd)]=_0x38f933;}async[_0x2b3a05(0xc5)](_0x5237fe){const _0x89560a=_0x2b3a05;var _0xb05776,_0x10b74d;const {parentId:_0x5654f9,unitId:_0x972565,text:_0x37986e,threadId:_0x2e044a}=_0x5237fe,_0x54bc0c=(_0x10b74d=(_0xb05776=_0x37986e[_0x89560a(0xaf)])==null?void 0x0:_0xb05776['filter'](_0x2d2b98=>_0x2d2b98[_0x89560a(0xe8)]===_0x450107[_0x89560a(0xa3)])[_0x89560a(0xbe)](_0x4f2c7a=>_0x4f2c7a[_0x89560a(0xd9)]))!=null?_0x10b74d:[],_0x3678f9=JSON[_0x89560a(0xd2)](_0x37986e),_0x54e823=(await this[_0x89560a(0xdd)][_0x89560a(0xd1)](_0x972565))[_0x89560a(0xb9)]();if(_0x5654f9){const _0x3b95d9={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c,'threadId':_0x2e044a},_0x39c1ec=(await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0xc7),{'body':_0x3b95d9}))[_0x89560a(0xd8)][_0x89560a(0xcb)];return{..._0x5237fe,'id':_0x39c1ec[_0x89560a(0xdb)],'dT':_0x8123a1(+_0x39c1ec[_0x89560a(0xca)])[_0x89560a(0xfb)](_0x89560a(0xb0)),'personId':_0x39c1ec[_0x89560a(0xc6)]};}else{const _0x1b5d8f={'memberId':_0x54e823,'unitId':_0x972565,'content':_0x3678f9,'mention':_0x54bc0c},_0x363458=await this[_0x89560a(0x100)]['post'](_0x89560a(0xda)+_0x972565+_0x89560a(0x103),{'body':_0x1b5d8f});return X(_0x363458[_0x89560a(0xd8)][_0x89560a(0xbf)],_0x5237fe);}}async['updateComment'](_0x1bb80e){const _0x23c55b=_0x2b3a05;var _0x2f7f46,_0x41ebd1;const {text:_0xff9c23,unitId:_0x23fdb3}=_0x1bb80e,_0x4a016c=(_0x41ebd1=(_0x2f7f46=_0xff9c23[_0x23c55b(0xaf)])==null?void 0x0:_0x2f7f46[_0x23c55b(0xb4)](_0x46c3ae=>_0x46c3ae[_0x23c55b(0xe8)]===_0x450107[_0x23c55b(0xa3)])[_0x23c55b(0xbe)](_0x31bced=>_0x31bced[_0x23c55b(0xd9)]))!=null?_0x41ebd1:[],_0x22036a=JSON[_0x23c55b(0xd2)](_0xff9c23),_0x26e176=_0x1bb80e['threadId'],_0x37c6ef=_0x1bb80e['id'],_0x2cb86c={'memberId':(await this['_sessionService']['requireSession'](_0x23fdb3))[_0x23c55b(0xb9)](),'unitId':_0x23fdb3,'threadId':_0x26e176,'mention':_0x4a016c,'content':_0x22036a,'replyId':_0x37c6ef},_0x1267e9=await this[_0x23c55b(0x100)][_0x23c55b(0xd6)](_0x23c55b(0xda)+_0x23fdb3+_0x23c55b(0xef),{'body':_0x2cb86c});return!_0x1267e9[_0x23c55b(0xd8)][_0x23c55b(0xee)]||_0x1267e9['body'][_0x23c55b(0xee)][_0x23c55b(0xa6)]===0x1;}async['resolveComment'](_0x21f90c){const _0x4f3c95=_0x2b3a05,{unitId:_0x12ce03}=_0x21f90c,_0xbf820e=_0x21f90c[_0x4f3c95(0xf5)],_0x2f1e7e={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x12ce03,'threadId':_0xbf820e,'solved':_0x21f90c[_0x4f3c95(0xe1)]?I[_0x4f3c95(0xb2)]:I[_0x4f3c95(0xc9)]},_0x52ed40=await this[_0x4f3c95(0x100)]['post']('/universer-api/comment/unit/'+_0x12ce03+_0x4f3c95(0xf9),{'body':_0x2f1e7e});return!_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)]||_0x52ed40[_0x4f3c95(0xd8)][_0x4f3c95(0xee)][_0x4f3c95(0xa6)]===0x1;}async[_0x2b3a05(0xe9)](_0x543592,_0x5ba2ac,_0x532199,_0x445b27){const _0x43d901=_0x2b3a05,_0x54e169={'memberId':(await this[_0x43d901(0xdd)][_0x43d901(0xd1)](_0x543592))[_0x43d901(0xb9)](),'threadId':_0x532199,'replyId':_0x445b27,'unitId':_0x543592},_0x4152f7=await this[_0x43d901(0x100)]['post'](_0x43d901(0xda)+_0x543592+_0x43d901(0xa7),{'body':_0x54e169});return!_0x4152f7[_0x43d901(0xd8)]['error']||_0x4152f7['body'][_0x43d901(0xee)][_0x43d901(0xa6)]===0x1;}async[_0x2b3a05(0xf2)](_0x43fb89,_0x35dfc7,_0x44ccf7){const _0xdc56a0=_0x2b3a05,_0x2bb512={'unitId':_0x43fb89,'threadId':_0x44ccf7},_0x136aa3=await this[_0xdc56a0(0x100)][_0xdc56a0(0xd6)](_0xdc56a0(0xda)+_0x43fb89+_0xdc56a0(0xdf),{'body':_0x2bb512}),_0x396b45=_0x44ccf7[_0xdc56a0(0xbe)](_0x521a42=>ee(_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xd7)][_0x521a42],_0x43fb89,_0x35dfc7))['filter'](Boolean);return Object[_0xdc56a0(0xc0)](_0x136aa3[_0xdc56a0(0xd8)][_0xdc56a0(0xfd)])[_0xdc56a0(0xaa)](_0x51b647=>{const _0x5f17ad=_0xdc56a0;this['_userService'][_0x5f17ad(0xf1)](_0x51b647);}),_0x396b45;}[_0x2b3a05(0xfa)](_0x532809){const _0x48a49a=_0x2b3a05;return{'id':_0x532809['id'],'threadId':_0x532809[_0x48a49a(0xf5)],'ref':_0x532809[_0x48a49a(0xc4)]};}};S=Q([b(0x0,_0x498129(_0x26a669)),b(0x1,_0x498129(_0x29389e)),b(0x2,_0x498129(_0x34dfc7))],S);var re=Object[_0x2b3a05(0xfe)],te=(_0x2b6795,_0x24c0d5,_0x177188,_0x2fa035)=>{for(var _0x5313f7=_0x2fa035>0x1?void 0x0:_0x2fa035?re(_0x24c0d5,_0x177188):_0x24c0d5,_0x3135b0=_0x2b6795['length']-0x1,_0x503ffd;_0x3135b0>=0x0;_0x3135b0--)(_0x503ffd=_0x2b6795[_0x3135b0])&&(_0x5313f7=_0x503ffd(_0x5313f7)||_0x5313f7);return _0x5313f7;},M=(_0x1f5aaa,_0x5cb32c)=>(_0x16b200,_0x5c335a)=>_0x5cb32c(_0x16b200,_0x5c335a,_0x1f5aaa);let f=class extends _0x36a07e{constructor(_0x16e3b6,_0x14ab06){const _0x40106c=_0x2b3a05;super(),this[_0x40106c(0xd5)]=_0x16e3b6,this[_0x40106c(0xb3)]=_0x14ab06,this['_initDataSource']();}['_initDataSource'](){const _0x29dfc7=_0x2b3a05;this[_0x29dfc7(0xd5)][_0x29dfc7(0xae)]=this[_0x29dfc7(0xb3)],this[_0x29dfc7(0xd5)][_0x29dfc7(0xab)]=!0x1;}};f=te([M(0x0,_0x4069f7),M(0x1,_0x498129(S))],f);var se=Object[_0x2b3a05(0xf6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xf6d3f8,_0x53120e,_0x40e63d)=>_0x53120e in _0xf6d3f8?se(_0xf6d3f8,_0x53120e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x40e63d}):_0xf6d3f8[_0x53120e]=_0x40e63d,ie=(_0x46d76f,_0x43b2b0,_0x52d179,_0x723148)=>{const _0x465b61=_0x2b3a05;for(var _0x1267a0=_0x723148>0x1?void 0x0:_0x723148?oe(_0x43b2b0,_0x52d179):_0x43b2b0,_0x1a5a81=_0x46d76f[_0x465b61(0xbb)]-0x1,_0x56c178;_0x1a5a81>=0x0;_0x1a5a81--)(_0x56c178=_0x46d76f[_0x1a5a81])&&(_0x1267a0=_0x56c178(_0x1267a0)||_0x1267a0);return _0x1267a0;},N=(_0x516c10,_0x34c475)=>(_0x3d8091,_0x18876d)=>_0x34c475(_0x3d8091,_0x18876d,_0x516c10),$=(_0x24957d,_0x2ce9cd,_0x54fd97)=>ne(_0x24957d,typeof _0x2ce9cd!=_0x2b3a05(0xb8)?_0x2ce9cd+'':_0x2ce9cd,_0x54fd97);let g=class extends _0x1f8d6e{constructor(_0x30ac06=O,_0x33d4ec,_0x4403be){const _0x156dfb=_0x2b3a05;super(),this[_0x156dfb(0xbc)]=_0x30ac06,this['_injector']=_0x33d4ec,this[_0x156dfb(0xcf)]=_0x4403be;const {..._0x5ddd41}=_0x1b1ca2({},O,this['_config']);this[_0x156dfb(0xcf)][_0x156dfb(0xb5)](z,_0x5ddd41);}['onStarting'](){const _0x2796d5=_0x2b3a05;[[S],[f],[_]][_0x2796d5(0xaa)](_0x42ec86=>{const _0x175418=_0x2796d5;this[_0x175418(0xc8)][_0x175418(0xea)](_0x42ec86);});}[_0x2b3a05(0xd4)](){const _0x324ca2=_0x2b3a05;this[_0x324ca2(0xc8)][_0x324ca2(0xa5)](f),this[_0x324ca2(0xc8)]['get'](_);}};$(g,_0x2b3a05(0x102),W),$(g,'type',_0x5e44b5[_0x2b3a05(0x106)]),g=ie([_0x100038(_0xa3c3d4,_0x24dfe9,_0x2890f9),N(0x1,_0x498129(_0x4a0051)),N(0x2,_0x31db9c)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0xf2dd0a=_0x4f80;(function(_0x5d3492,_0x139a0a){const _0x1ac33b=_0x4f80,_0x30b8ca=_0x5d3492();while(!![]){try{const _0x5da65c=parseInt(_0x1ac33b(0x14a))/0x1+parseInt(_0x1ac33b(0x177))/0x2*(parseInt(_0x1ac33b(0x12d))/0x3)+parseInt(_0x1ac33b(0x12c))/0x4*(-parseInt(_0x1ac33b(0x18d))/0x5)+parseInt(_0x1ac33b(0x188))/0x6+-parseInt(_0x1ac33b(0x132))/0x7+-parseInt(_0x1ac33b(0x15b))/0x8*(-parseInt(_0x1ac33b(0x129))/0x9)+-parseInt(_0x1ac33b(0x150))/0xa;if(_0x5da65c===_0x139a0a)break;else _0x30b8ca['push'](_0x30b8ca['shift']());}catch(_0x19890a){_0x30b8ca['push'](_0x30b8ca['shift']());}}}(_0x20b3,0xba5e8));import{CommentService as _0x27ef41,CollaborationSessionService as _0x408cc2,UniverCollaborationClientPlugin as _0x4d714d}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf62078}from'@univerjs-pro/license';import{dayjs as _0x3296f5,UserManagerService as _0x1a82c8,Inject as _0x2a723d,Injector as _0x48547d,Disposable as _0x5f0700,CustomRangeType as _0x8aea36,UniverInstanceType as _0x561314,DependentOn as _0xd6cc24,IConfigService as _0x3fbe75,Plugin as _0xa37bcf,merge as _0x3de015}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x55c17b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x378e1d,IThreadCommentDataSourceService as _0x2bb3bb}from'@univerjs/thread-comment';import{bufferTime as _0x2eb9bc}from'rxjs';import{HTTPService as _0x105545}from'@univerjs/network';const W=_0xf2dd0a(0x169);var I=(_0x3f38d7=>(_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x12b)]=0x0]=_0xf2dd0a(0x12b),_0x3f38d7[_0x3f38d7[_0xf2dd0a(0x181)]=0x1]=_0xf2dd0a(0x181),_0x3f38d7[_0x3f38d7['UNRECOGNIZED']=-0x1]=_0xf2dd0a(0x18b),_0x3f38d7))(I||{}),v=(_0x74bc2e=>(_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x154)]=0x0]=_0xf2dd0a(0x154),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x161)]=0x1]=_0xf2dd0a(0x161),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x149)]=0x2]=_0xf2dd0a(0x149),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x156)]=0x3]='Edit',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x139)]=0x4]='Delete',_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x158)]=0x5]=_0xf2dd0a(0x158),_0x74bc2e[_0x74bc2e[_0xf2dd0a(0x18b)]=-0x1]=_0xf2dd0a(0x18b),_0x74bc2e))(v||{});const y=_0x4ff9da=>_0x3296f5(new Date(+_0x4ff9da))[_0xf2dd0a(0x128)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x14f257,_0x1663fb)=>{const _0x2ed6f0=_0xf2dd0a,_0x60d12b=_0x14f257['get'](_0x1a82c8),_0x29195a=_0x14f257[_0x2ed6f0(0x130)](_0x105545);_0x1663fb[_0x2ed6f0(0x144)](_0x2167d6=>{const _0x2554c1=_0x2ed6f0;_0x60d12b['getUser'](_0x2167d6)&&_0x1663fb[_0x2554c1(0x14e)](_0x2167d6);}),_0x1663fb[_0x2ed6f0(0x17a)]&&(await _0x29195a['get'](_0x2ed6f0(0x141),{'params':{'userIDs':[..._0x1663fb]}}))[_0x2ed6f0(0x16c)]['users'][_0x2ed6f0(0x144)](_0x349ba6=>{const _0x328932=_0x2ed6f0;_0x349ba6&&_0x60d12b[_0x328932(0x164)](_0x349ba6);});};var K=Object[_0xf2dd0a(0x180)],V=(_0xf6bd97,_0x2acb42,_0x581d3a,_0x29947b)=>{const _0x3894b9=_0xf2dd0a;for(var _0x34f9cf=_0x29947b>0x1?void 0x0:_0x29947b?K(_0x2acb42,_0x581d3a):_0x2acb42,_0x12e167=_0xf6bd97[_0x3894b9(0x13e)]-0x1,_0x3fd1bb;_0x12e167>=0x0;_0x12e167--)(_0x3fd1bb=_0xf6bd97[_0x12e167])&&(_0x34f9cf=_0x3fd1bb(_0x34f9cf)||_0x34f9cf);return _0x34f9cf;},p=(_0x324197,_0x11351c)=>(_0x32dd4f,_0x173b14)=>_0x11351c(_0x32dd4f,_0x173b14,_0x324197);let _=class extends _0x5f0700{constructor(_0x16e83d,_0x12f3ff,_0x97344f,_0x1e96e3){const _0x4546ac=_0xf2dd0a;super(),this['_commentService']=_0x16e83d,this[_0x4546ac(0x165)]=_0x12f3ff,this[_0x4546ac(0x171)]=_0x97344f,this[_0x4546ac(0x14b)]=_0x1e96e3,this[_0x4546ac(0x138)](),this[_0x4546ac(0x17d)]();}[_0xf2dd0a(0x17d)](){const _0x354784=_0xf2dd0a;this[_0x354784(0x16b)](this[_0x354784(0x165)][_0x354784(0x187)]['pipe'](_0x2eb9bc(0x10))[_0x354784(0x145)](_0x41dd81=>{const _0x576917=_0x354784,_0x23ccf9=new Set();_0x41dd81[_0x576917(0x144)](_0x164fff=>{const _0x29e8c9=_0x576917;switch(_0x164fff[_0x29e8c9(0x137)]){case'add':{const _0x591f11=_0x164fff['payload'][_0x29e8c9(0x189)];_0x23ccf9['add'](_0x591f11);break;}}}),B(this[_0x576917(0x14b)],_0x23ccf9);}));}[_0xf2dd0a(0x138)](){const _0x40ac59=_0xf2dd0a;this[_0x40ac59(0x16b)](this[_0x40ac59(0x16a)][_0x40ac59(0x187)][_0x40ac59(0x145)](async _0xb6794c=>{const _0x3dbbcb=_0x40ac59;var _0x5a9004,_0x5d7313,_0x2f6c21,_0x514210;const _0x13ceed=(_0x5a9004=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x13d)](_0xb6794c[_0x3dbbcb(0x172)])[_0x3dbbcb(0x135)](_0x20214e=>_0x20214e['threadId']===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x5a9004[_0x3dbbcb(0x151)];if(!_0x13ceed)return;const {unitId:_0xc065bf,subUnitId:_0x425db2}=_0x13ceed;switch(_0xb6794c[_0x3dbbcb(0x17f)]&&this[_0x3dbbcb(0x171)][_0x3dbbcb(0x164)](_0xb6794c[_0x3dbbcb(0x17f)]),_0xb6794c[_0x3dbbcb(0x137)]){case v[_0x3dbbcb(0x161)]:break;case v[_0x3dbbcb(0x149)]:{this[_0x3dbbcb(0x165)]['addComment'](_0xc065bf,_0x425db2,{'unitId':_0xc065bf,'subUnitId':_0x425db2,'ref':'','id':_0xb6794c[_0x3dbbcb(0x18a)],'dT':y(+_0xb6794c['createTimestamp']),'threadId':_0xb6794c[_0x3dbbcb(0x184)],'personId':(_0x2f6c21=(_0x5d7313=_0xb6794c[_0x3dbbcb(0x17f)])==null?void 0x0:_0x5d7313[_0x3dbbcb(0x152)])!=null?_0x2f6c21:_0xb6794c['userId'],'text':JSON[_0x3dbbcb(0x18c)](_0xb6794c[_0x3dbbcb(0x143)]),'parentId':_0x13ceed['id']});break;}case v[_0x3dbbcb(0x139)]:{const _0x48c22d=this[_0x3dbbcb(0x165)][_0x3dbbcb(0x142)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);_0x48c22d&&_0x48c22d[_0x3dbbcb(0x146)]&&this['_threadCommentModel'][_0x3dbbcb(0x13b)](_0xc065bf,_0x425db2,_0xb6794c[_0x3dbbcb(0x18a)]);break;}case v[_0x3dbbcb(0x156)]:{this[_0x3dbbcb(0x165)][_0x3dbbcb(0x131)](_0xc065bf,_0x425db2,{'commentId':_0xb6794c[_0x3dbbcb(0x18a)],'text':JSON['parse'](_0xb6794c[_0x3dbbcb(0x143)])});break;}case v[_0x3dbbcb(0x158)]:{const _0x402136=(_0x514210=this['_threadCommentModel']['getUnit'](_0xb6794c[_0x3dbbcb(0x172)])['find'](_0x31de39=>_0x31de39[_0x3dbbcb(0x184)]===_0xb6794c[_0x3dbbcb(0x184)]))==null?void 0x0:_0x514210['root'];_0x402136&&this[_0x3dbbcb(0x165)][_0x3dbbcb(0x167)](_0xc065bf,_0x425db2,_0x402136['id'],_0xb6794c[_0x3dbbcb(0x14c)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x2a723d(_0x27ef41)),p(0x1,_0x2a723d(_0x378e1d)),p(0x2,_0x2a723d(_0x1a82c8)),p(0x3,_0x2a723d(_0x48547d))],_);const z=_0xf2dd0a(0x16f),O={};var k=Object[_0xf2dd0a(0x180)],Q=(_0x121ad6,_0x2099aa,_0xbb3d2b,_0x5ca734)=>{for(var _0xda0bf6=_0x5ca734>0x1?void 0x0:_0x5ca734?k(_0x2099aa,_0xbb3d2b):_0x2099aa,_0xc12bea=_0x121ad6['length']-0x1,_0x3815eb;_0xc12bea>=0x0;_0xc12bea--)(_0x3815eb=_0x121ad6[_0xc12bea])&&(_0xda0bf6=_0x3815eb(_0xda0bf6)||_0xda0bf6);return _0xda0bf6;},b=(_0x18125b,_0x4381de)=>(_0x5a6f9f,_0x387ab5)=>_0x4381de(_0x5a6f9f,_0x387ab5,_0x18125b);function _0x20b3(){const _0xc2e80c=['/delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_commentService','disposeWithMe','body','UNIVER_UNKNOWN','filter','thread-comment-data-source.config','slice','_userService','unitId','_httpService','COMMENT','getCurrentUser','onStarting','2gcrWcU','/reply','_config','size','comment','_configService','_initUserSync','defineProperty','user','getOwnPropertyDescriptor','Solved','addComment','YYYY/MM/DD\x20HH:mm','threadId','/add','customRanges','commentUpdate$','6815640KPJKBg','personId','replyId','UNRECOGNIZED','parse','4170XRqfsC','_sessionService','format','2670363FDClmw','users','OpenOrReOpen','6712swSIDj','2582373JjyrMK','add','listComments','get','updateComment','9569280BVbtga','map','requireSession','find','/universer-api/comment/unit/','type','_init','Delete','rangeType','deleteComment','getMemberID','getUnit','length','syncUpdateMutationToColla','_threadCommentDataSourceService','/universer-api/user/list','getComment','content','forEach','subscribe','parentId','/list','/edit','Reply','236418JBsXCB','_injector','solved','error','delete','post','1868240HNBtQJ','root','userID','setConfig','Unknown','_threadCommentDataSource','Edit','resolved','Solve','stringify','replies','40iIaDqq','symbol','reply','userId','rangeId','dataSource','Add','_initDataSource','code','addUser','_threadCommentModel','createTimestamp','resolveComment'];_0x20b3=function(){return _0xc2e80c;};return _0x20b3();}function X(_0x36dd8f,_0x43caab){const _0x1f2558=_0xf2dd0a,_0x53c775=_0x36dd8f[_0x1f2558(0x15a)][0x0];return{..._0x43caab,'id':_0x53c775['replyId'],'resolved':_0x36dd8f[_0x1f2558(0x14c)]===0x1,'dT':y(_0x53c775[_0x1f2558(0x166)]),'personId':_0x53c775[_0x1f2558(0x15e)],'threadId':_0x53c775[_0x1f2558(0x184)]};}function ee(_0x2f6674,_0x5b0134,_0x1ad43c){const _0x398fd6=_0xf2dd0a;var _0x52f95a,_0x5d1eae;if(((_0x5d1eae=(_0x52f95a=_0x2f6674==null?void 0x0:_0x2f6674[_0x398fd6(0x15a)])==null?void 0x0:_0x52f95a[_0x398fd6(0x13e)])!=null?_0x5d1eae:0x0)>0x0){const _0x422ddf=(_0x15657c,_0x1c9cbf)=>({'id':_0x15657c[_0x398fd6(0x18a)],'threadId':_0x15657c[_0x398fd6(0x184)],'dT':y(_0x15657c[_0x398fd6(0x166)]),'personId':_0x15657c[_0x398fd6(0x15e)],'resolved':_0x2f6674[_0x398fd6(0x14c)]===I[_0x398fd6(0x181)],'unitId':_0x5b0134,'subUnitId':_0x1ad43c,'text':JSON[_0x398fd6(0x18c)](_0x15657c[_0x398fd6(0x143)]),'parentId':_0x1c9cbf}),_0x542975=_0x422ddf(_0x2f6674[_0x398fd6(0x15a)][0x0]);return{..._0x542975,'children':_0x2f6674[_0x398fd6(0x15a)][_0x398fd6(0x170)](0x1)[_0x398fd6(0x133)](_0x4ed855=>_0x422ddf(_0x4ed855,_0x542975['id']))};}return null;}let S=class{constructor(_0x501c85,_0x9778bf,_0x4a0706){const _0x488c6e=_0xf2dd0a;this['_httpService']=_0x501c85,this[_0x488c6e(0x171)]=_0x9778bf,this[_0x488c6e(0x18e)]=_0x4a0706;}async[_0xf2dd0a(0x182)](_0x22fe1d){const _0x32a6be=_0xf2dd0a;var _0x225ad7,_0x82421;const {parentId:_0x329542,unitId:_0x38cbfc,text:_0x1c6112,threadId:_0x5ebdb5}=_0x22fe1d,_0x7157e3=(_0x82421=(_0x225ad7=_0x1c6112[_0x32a6be(0x186)])==null?void 0x0:_0x225ad7[_0x32a6be(0x16e)](_0x233b9f=>_0x233b9f[_0x32a6be(0x13a)]===_0x8aea36[_0x32a6be(0x174)])[_0x32a6be(0x133)](_0x20329a=>_0x20329a['rangeId']))!=null?_0x82421:[],_0xc8c301=JSON[_0x32a6be(0x159)](_0x1c6112),_0x1196e2=(await this[_0x32a6be(0x18e)][_0x32a6be(0x134)](_0x38cbfc))[_0x32a6be(0x13c)]();if(_0x329542){const _0x1712f0={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3,'threadId':_0x5ebdb5},_0x5a8480=(await this['_httpService']['post'](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x178),{'body':_0x1712f0}))[_0x32a6be(0x16c)][_0x32a6be(0x15d)];return{..._0x22fe1d,'id':_0x5a8480[_0x32a6be(0x18a)],'dT':_0x3296f5(+_0x5a8480[_0x32a6be(0x166)])[_0x32a6be(0x128)](_0x32a6be(0x183)),'personId':_0x5a8480['userId']};}else{const _0x25f543={'memberId':_0x1196e2,'unitId':_0x38cbfc,'content':_0xc8c301,'mention':_0x7157e3},_0x18f544=await this[_0x32a6be(0x173)][_0x32a6be(0x14f)](_0x32a6be(0x136)+_0x38cbfc+_0x32a6be(0x185),{'body':_0x25f543});return X(_0x18f544['body'][_0x32a6be(0x17b)],_0x22fe1d);}}async[_0xf2dd0a(0x131)](_0x2b5516){const _0x281c01=_0xf2dd0a;var _0x4c9901,_0x31daf5;const {text:_0x1eabcf,unitId:_0xf44fcc}=_0x2b5516,_0x3da96a=(_0x31daf5=(_0x4c9901=_0x1eabcf['customRanges'])==null?void 0x0:_0x4c9901['filter'](_0x34afb5=>_0x34afb5[_0x281c01(0x13a)]===_0x8aea36[_0x281c01(0x174)])[_0x281c01(0x133)](_0x45002d=>_0x45002d[_0x281c01(0x15f)]))!=null?_0x31daf5:[],_0xc320be=JSON[_0x281c01(0x159)](_0x1eabcf),_0x340380=_0x2b5516[_0x281c01(0x184)],_0x375d5b=_0x2b5516['id'],_0x431709={'memberId':(await this[_0x281c01(0x18e)]['requireSession'](_0xf44fcc))[_0x281c01(0x13c)](),'unitId':_0xf44fcc,'threadId':_0x340380,'mention':_0x3da96a,'content':_0xc320be,'replyId':_0x375d5b},_0x48a4b2=await this[_0x281c01(0x173)][_0x281c01(0x14f)]('/universer-api/comment/unit/'+_0xf44fcc+_0x281c01(0x148),{'body':_0x431709});return!_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)]||_0x48a4b2[_0x281c01(0x16c)][_0x281c01(0x14d)][_0x281c01(0x163)]===0x1;}async[_0xf2dd0a(0x167)](_0x46894a){const _0x34faa1=_0xf2dd0a,{unitId:_0x28685f}=_0x46894a,_0x276e95=_0x46894a['threadId'],_0x1d22ef={'memberId':this[_0x34faa1(0x171)][_0x34faa1(0x175)]()[_0x34faa1(0x152)],'unitId':_0x28685f,'threadId':_0x276e95,'solved':_0x46894a[_0x34faa1(0x157)]?I[_0x34faa1(0x181)]:I[_0x34faa1(0x12b)]},_0x53a167=await this['_httpService'][_0x34faa1(0x14f)]('/universer-api/comment/unit/'+_0x28685f+'/solved',{'body':_0x1d22ef});return!_0x53a167[_0x34faa1(0x16c)][_0x34faa1(0x14d)]||_0x53a167[_0x34faa1(0x16c)]['error'][_0x34faa1(0x163)]===0x1;}async['deleteComment'](_0x5505fb,_0x2530ff,_0x581f06,_0x2ae049){const _0x208c41=_0xf2dd0a,_0x319a56={'memberId':(await this[_0x208c41(0x18e)]['requireSession'](_0x5505fb))[_0x208c41(0x13c)](),'threadId':_0x581f06,'replyId':_0x2ae049,'unitId':_0x5505fb},_0xe85e02=await this[_0x208c41(0x173)][_0x208c41(0x14f)](_0x208c41(0x136)+_0x5505fb+_0x208c41(0x168),{'body':_0x319a56});return!_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)]||_0xe85e02[_0x208c41(0x16c)][_0x208c41(0x14d)][_0x208c41(0x163)]===0x1;}async[_0xf2dd0a(0x12f)](_0x4e2784,_0x34788e,_0x139f5f){const _0x3cc636=_0xf2dd0a,_0x44bac9={'unitId':_0x4e2784,'threadId':_0x139f5f},_0x11cb45=await this['_httpService'][_0x3cc636(0x14f)](_0x3cc636(0x136)+_0x4e2784+_0x3cc636(0x147),{'body':_0x44bac9}),_0x4a706f=_0x139f5f[_0x3cc636(0x133)](_0x516815=>ee(_0x11cb45['body']['comments'][_0x516815],_0x4e2784,_0x34788e))['filter'](Boolean);return Object['values'](_0x11cb45[_0x3cc636(0x16c)][_0x3cc636(0x12a)])[_0x3cc636(0x144)](_0x407cfd=>{this['_userService']['addUser'](_0x407cfd);}),_0x4a706f;}['saveCommentToSnapshot'](_0x111ede){const _0x42ff2f=_0xf2dd0a;return{'id':_0x111ede['id'],'threadId':_0x111ede[_0x42ff2f(0x184)],'ref':_0x111ede['ref']};}};function _0x4f80(_0xafa963,_0x53b3ab){const _0x20b31c=_0x20b3();return _0x4f80=function(_0x4f8050,_0x2f83d0){_0x4f8050=_0x4f8050-0x128;let _0x267939=_0x20b31c[_0x4f8050];return _0x267939;},_0x4f80(_0xafa963,_0x53b3ab);}S=Q([b(0x0,_0x2a723d(_0x105545)),b(0x1,_0x2a723d(_0x1a82c8)),b(0x2,_0x2a723d(_0x408cc2))],S);var re=Object[_0xf2dd0a(0x180)],te=(_0xb5e824,_0xa391bc,_0x1e4e99,_0x394c85)=>{const _0x3d1b5b=_0xf2dd0a;for(var _0x4b4688=_0x394c85>0x1?void 0x0:_0x394c85?re(_0xa391bc,_0x1e4e99):_0xa391bc,_0x383471=_0xb5e824[_0x3d1b5b(0x13e)]-0x1,_0x4c51b7;_0x383471>=0x0;_0x383471--)(_0x4c51b7=_0xb5e824[_0x383471])&&(_0x4b4688=_0x4c51b7(_0x4b4688)||_0x4b4688);return _0x4b4688;},M=(_0x2c2d19,_0x9fcb9f)=>(_0x3620cf,_0x100100)=>_0x9fcb9f(_0x3620cf,_0x100100,_0x2c2d19);let f=class extends _0x5f0700{constructor(_0xea660f,_0x175171){const _0x12490e=_0xf2dd0a;super(),this[_0x12490e(0x140)]=_0xea660f,this[_0x12490e(0x155)]=_0x175171,this['_initDataSource']();}[_0xf2dd0a(0x162)](){const _0x1fd6d0=_0xf2dd0a;this[_0x1fd6d0(0x140)][_0x1fd6d0(0x160)]=this[_0x1fd6d0(0x155)],this['_threadCommentDataSourceService'][_0x1fd6d0(0x13f)]=!0x1;}};f=te([M(0x0,_0x2bb3bb),M(0x1,_0x2a723d(S))],f);var se=Object[_0xf2dd0a(0x17e)],oe=Object[_0xf2dd0a(0x180)],ne=(_0x5df8ae,_0x1cd5b7,_0x5911ff)=>_0x1cd5b7 in _0x5df8ae?se(_0x5df8ae,_0x1cd5b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5911ff}):_0x5df8ae[_0x1cd5b7]=_0x5911ff,ie=(_0x53b488,_0x53832f,_0x1aa73f,_0x1aa272)=>{const _0x3b3a05=_0xf2dd0a;for(var _0x132eeb=_0x1aa272>0x1?void 0x0:_0x1aa272?oe(_0x53832f,_0x1aa73f):_0x53832f,_0x5ef4a7=_0x53b488[_0x3b3a05(0x13e)]-0x1,_0x247717;_0x5ef4a7>=0x0;_0x5ef4a7--)(_0x247717=_0x53b488[_0x5ef4a7])&&(_0x132eeb=_0x247717(_0x132eeb)||_0x132eeb);return _0x132eeb;},N=(_0x2fee8f,_0x318ed6)=>(_0x37d2ba,_0x2224df)=>_0x318ed6(_0x37d2ba,_0x2224df,_0x2fee8f),$=(_0x3df332,_0x5200d7,_0xdef899)=>ne(_0x3df332,typeof _0x5200d7!=_0xf2dd0a(0x15c)?_0x5200d7+'':_0x5200d7,_0xdef899);let g=class extends _0xa37bcf{constructor(_0x12010b=O,_0x21ffe7,_0x58d343){const _0x2a10bf=_0xf2dd0a;super(),this['_config']=_0x12010b,this['_injector']=_0x21ffe7,this[_0x2a10bf(0x17c)]=_0x58d343;const {..._0x37b03a}=_0x3de015({},O,this[_0x2a10bf(0x179)]);this['_configService'][_0x2a10bf(0x153)](z,_0x37b03a);}[_0xf2dd0a(0x176)](){const _0x464609=_0xf2dd0a;[[S],[f],[_]][_0x464609(0x144)](_0x35b556=>{const _0x3912a1=_0x464609;this['_injector'][_0x3912a1(0x12e)](_0x35b556);});}['onReady'](){const _0x55e5c8=_0xf2dd0a;this[_0x55e5c8(0x14b)]['get'](f),this[_0x55e5c8(0x14b)][_0x55e5c8(0x130)](_);}};$(g,'pluginName',W),$(g,_0xf2dd0a(0x137),_0x561314[_0xf2dd0a(0x16d)]),g=ie([_0xd6cc24(_0x55c17b,_0x4d714d,_0xf62078),N(0x1,_0x2a723d(_0x48547d)),N(0x2,_0x3fbe75)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0xd66fd9,_0x5c1538){const _0x426762=_0x5c50,_0xc13820=_0xd66fd9();while(!![]){try{const _0x2ba1f3=-parseInt(_0x426762(0x1b5))/0x1*(parseInt(_0x426762(0x1ce))/0x2)+-parseInt(_0x426762(0x190))/0x3*(parseInt(_0x426762(0x1d1))/0x4)+-parseInt(_0x426762(0x19d))/0x5*(parseInt(_0x426762(0x1eb))/0x6)+-parseInt(_0x426762(0x186))/0x7*(parseInt(_0x426762(0x1da))/0x8)+-parseInt(_0x426762(0x1a4))/0x9+-parseInt(_0x426762(0x1c1))/0xa*(-parseInt(_0x426762(0x1af))/0xb)+parseInt(_0x426762(0x16e))/0xc;if(_0x2ba1f3===_0x5c1538)break;else _0xc13820['push'](_0xc13820['shift']());}catch(_0x366184){_0xc13820['push'](_0xc13820['shift']());}}}(_0x1ab1,0x3e612),function(_0x16d5eb,_0x3f6ff8){const _0x5c0453=_0x5c50;typeof exports==_0x5c0453(0x1cb)&&typeof module<'u'?_0x3f6ff8(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define['amd']?define([_0x5c0453(0x1e9),_0x5c0453(0x1ee),_0x5c0453(0x1bf),_0x5c0453(0x1c8),_0x5c0453(0x1c3),_0x5c0453(0x170),'rxjs',_0x5c0453(0x1b9)],_0x3f6ff8):(_0x16d5eb=typeof globalThis<'u'?globalThis:_0x16d5eb||self,_0x3f6ff8(_0x16d5eb[_0x5c0453(0x1aa)]={},_0x16d5eb[_0x5c0453(0x1b7)],_0x16d5eb[_0x5c0453(0x1e3)],_0x16d5eb['UniverCore'],_0x16d5eb['UniverThreadCommentUi'],_0x16d5eb[_0x5c0453(0x16d)],_0x16d5eb[_0x5c0453(0x17a)],_0x16d5eb['UniverNetwork']));}(this,function(_0x2658bc,_0x42c319,_0x5c2e4c,_0x42599a,_0x6de668,_0x2b67bb,_0x590b5b,_0x11d5d9){'use strict';const _0x12b0cc=_0x5c50;const _0x2532e4=_0x12b0cc(0x19b);var _0x562e05=(_0x111521=>(_0x111521[_0x111521[_0x12b0cc(0x191)]=0x0]=_0x12b0cc(0x191),_0x111521[_0x111521[_0x12b0cc(0x18b)]=0x1]=_0x12b0cc(0x18b),_0x111521[_0x111521[_0x12b0cc(0x1cd)]=-0x1]=_0x12b0cc(0x1cd),_0x111521))(_0x562e05||{}),_0x5adc3b=(_0x4eeb23=>(_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1d5)]=0x0]=_0x12b0cc(0x1d5),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1b4)]=0x1]=_0x12b0cc(0x1b4),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1db)]=0x2]='Reply',_0x4eeb23[_0x4eeb23[_0x12b0cc(0x195)]=0x3]=_0x12b0cc(0x195),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1ab)]=0x4]=_0x12b0cc(0x1ab),_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1e6)]=0x5]='Solve',_0x4eeb23[_0x4eeb23[_0x12b0cc(0x1cd)]=-0x1]=_0x12b0cc(0x1cd),_0x4eeb23))(_0x5adc3b||{});const _0x2e9c6c=_0x37657c=>_0x42599a['dayjs'](new Date(+_0x37657c))['format'](_0x12b0cc(0x181)),_0x411cbd=async(_0x331a47,_0x3e0d0e)=>{const _0x4ad1ab=_0x12b0cc,_0x325ad9=_0x331a47[_0x4ad1ab(0x18c)](_0x42599a['UserManagerService']),_0x1a81d5=_0x331a47[_0x4ad1ab(0x18c)](_0x11d5d9[_0x4ad1ab(0x185)]);_0x3e0d0e[_0x4ad1ab(0x17f)](_0xc4a606=>{const _0x5cf849=_0x4ad1ab;_0x325ad9['getUser'](_0xc4a606)&&_0x3e0d0e[_0x5cf849(0x19e)](_0xc4a606);}),_0x3e0d0e[_0x4ad1ab(0x197)]&&(await _0x1a81d5['get'](_0x4ad1ab(0x1df),{'params':{'userIDs':[..._0x3e0d0e]}}))[_0x4ad1ab(0x1a9)]['users']['forEach'](_0x525834=>{const _0x2b68af=_0x4ad1ab;_0x525834&&_0x325ad9[_0x2b68af(0x1bc)](_0x525834);});};var _0x400d7e=Object[_0x12b0cc(0x1de)],_0x134501=(_0x296739,_0x564fdf,_0x54c7fe,_0x337a4b)=>{const _0x363097=_0x12b0cc;for(var _0x333c0f=_0x337a4b>0x1?void 0x0:_0x337a4b?_0x400d7e(_0x564fdf,_0x54c7fe):_0x564fdf,_0x1a3ef8=_0x296739[_0x363097(0x194)]-0x1,_0x9bdb8c;_0x1a3ef8>=0x0;_0x1a3ef8--)(_0x9bdb8c=_0x296739[_0x1a3ef8])&&(_0x333c0f=_0x9bdb8c(_0x333c0f)||_0x333c0f);return _0x333c0f;},_0x3d3ecb=(_0x57cbf1,_0xf3625d)=>(_0x518724,_0x51d59d)=>_0xf3625d(_0x518724,_0x51d59d,_0x57cbf1);let _0x498709=class extends _0x42599a['Disposable']{constructor(_0x4d270d,_0x4098c9,_0x4d1357,_0x822259){const _0x2239e6=_0x12b0cc;super(),this[_0x2239e6(0x1e7)]=_0x4d270d,this['_threadCommentModel']=_0x4098c9,this['_userService']=_0x4d1357,this[_0x2239e6(0x1a3)]=_0x822259,this[_0x2239e6(0x1e1)](),this[_0x2239e6(0x180)]();}[_0x12b0cc(0x180)](){const _0x309fe1=_0x12b0cc;this[_0x309fe1(0x18d)](this[_0x309fe1(0x1d8)][_0x309fe1(0x1cf)]['pipe'](_0x590b5b[_0x309fe1(0x1b0)](0x10))['subscribe'](_0x52d2a5=>{const _0x5ca46b=_0x309fe1,_0x46aff3=new Set();_0x52d2a5['forEach'](_0x161d58=>{const _0x56e8c7=_0x5c50;switch(_0x161d58['type']){case'add':{const _0x28423d=_0x161d58[_0x56e8c7(0x1d9)][_0x56e8c7(0x1be)];_0x46aff3[_0x56e8c7(0x1a0)](_0x28423d);break;}}}),_0x411cbd(this[_0x5ca46b(0x1a3)],_0x46aff3);}));}[_0x12b0cc(0x1e1)](){const _0x18493a=_0x12b0cc;this[_0x18493a(0x18d)](this[_0x18493a(0x1e7)][_0x18493a(0x1cf)][_0x18493a(0x18a)](async _0x533ede=>{const _0x3f5f80=_0x18493a;var _0x5f5b70,_0x3d3d1b,_0xfdfb6,_0x52d0d6;const _0xdb7833=(_0x5f5b70=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1a6)](_0x533ede['unitId'])[_0x3f5f80(0x1f0)](_0x361a9d=>_0x361a9d['threadId']===_0x533ede[_0x3f5f80(0x1c5)]))==null?void 0x0:_0x5f5b70['root'];if(!_0xdb7833)return;const {unitId:_0x32f55e,subUnitId:_0x2607f6}=_0xdb7833;switch(_0x533ede[_0x3f5f80(0x1e2)]&&this[_0x3f5f80(0x1ae)][_0x3f5f80(0x1bc)](_0x533ede['user']),_0x533ede[_0x3f5f80(0x1c6)]){case _0x5adc3b[_0x3f5f80(0x1b4)]:break;case _0x5adc3b[_0x3f5f80(0x1db)]:{this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1cc)](_0x32f55e,_0x2607f6,{'unitId':_0x32f55e,'subUnitId':_0x2607f6,'ref':'','id':_0x533ede[_0x3f5f80(0x16c)],'dT':_0x2e9c6c(+_0x533ede['createTimestamp']),'threadId':_0x533ede[_0x3f5f80(0x1c5)],'personId':(_0xfdfb6=(_0x3d3d1b=_0x533ede[_0x3f5f80(0x1e2)])==null?void 0x0:_0x3d3d1b['userID'])!=null?_0xfdfb6:_0x533ede['userId'],'text':JSON['parse'](_0x533ede[_0x3f5f80(0x1a2)]),'parentId':_0xdb7833['id']});break;}case _0x5adc3b['Delete']:{const _0x22ac5b=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1ad)](_0x32f55e,_0x2607f6,_0x533ede[_0x3f5f80(0x16c)]);_0x22ac5b&&_0x22ac5b[_0x3f5f80(0x1d3)]&&this['_threadCommentModel'][_0x3f5f80(0x1d2)](_0x32f55e,_0x2607f6,_0x533ede[_0x3f5f80(0x16c)]);break;}case _0x5adc3b['Edit']:{this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1ed)](_0x32f55e,_0x2607f6,{'commentId':_0x533ede[_0x3f5f80(0x16c)],'text':JSON['parse'](_0x533ede['content'])});break;}case _0x5adc3b[_0x3f5f80(0x1e6)]:{const _0x292079=(_0x52d0d6=this[_0x3f5f80(0x1d8)][_0x3f5f80(0x1a6)](_0x533ede[_0x3f5f80(0x19c)])[_0x3f5f80(0x1f0)](_0x39058c=>_0x39058c['threadId']===_0x533ede['threadId']))==null?void 0x0:_0x52d0d6[_0x3f5f80(0x19a)];_0x292079&&this['_threadCommentModel'][_0x3f5f80(0x187)](_0x32f55e,_0x2607f6,_0x292079['id'],_0x533ede['solved']===_0x562e05[_0x3f5f80(0x18b)]);break;}}}));}};_0x498709=_0x134501([_0x3d3ecb(0x0,_0x42599a[_0x12b0cc(0x1d4)](_0x42c319[_0x12b0cc(0x193)])),_0x3d3ecb(0x1,_0x42599a[_0x12b0cc(0x1d4)](_0x2b67bb['ThreadCommentModel'])),_0x3d3ecb(0x2,_0x42599a[_0x12b0cc(0x1d4)](_0x42599a[_0x12b0cc(0x1bd)])),_0x3d3ecb(0x3,_0x42599a['Inject'](_0x42599a['Injector']))],_0x498709);const _0x530a65='thread-comment-data-source.config',_0x4267d1={};var _0x335c76=Object[_0x12b0cc(0x1de)],_0x2ef107=(_0x391bd6,_0x3e81e7,_0x28d960,_0x115157)=>{const _0x5df394=_0x12b0cc;for(var _0x1fe39f=_0x115157>0x1?void 0x0:_0x115157?_0x335c76(_0x3e81e7,_0x28d960):_0x3e81e7,_0x1debf7=_0x391bd6[_0x5df394(0x194)]-0x1,_0x5a902a;_0x1debf7>=0x0;_0x1debf7--)(_0x5a902a=_0x391bd6[_0x1debf7])&&(_0x1fe39f=_0x5a902a(_0x1fe39f)||_0x1fe39f);return _0x1fe39f;},_0x396c75=(_0x486618,_0x2ed593)=>(_0x50f0b5,_0x4798de)=>_0x2ed593(_0x50f0b5,_0x4798de,_0x486618);function _0xac1cfc(_0x331678,_0x41486b){const _0x14d9c2=_0x12b0cc,_0x1b35a6=_0x331678[_0x14d9c2(0x196)][0x0];return{..._0x41486b,'id':_0x1b35a6['replyId'],'resolved':_0x331678[_0x14d9c2(0x1e4)]===0x1,'dT':_0x2e9c6c(_0x1b35a6[_0x14d9c2(0x1ca)]),'personId':_0x1b35a6[_0x14d9c2(0x17b)],'threadId':_0x1b35a6[_0x14d9c2(0x1c5)]};}function _0x297557(_0x1e3d17,_0x597c63,_0x380e2f){const _0x37664c=_0x12b0cc;var _0x500cbd,_0x5b961c;if(((_0x5b961c=(_0x500cbd=_0x1e3d17==null?void 0x0:_0x1e3d17['replies'])==null?void 0x0:_0x500cbd[_0x37664c(0x194)])!=null?_0x5b961c:0x0)>0x0){const _0x2ef7e7=(_0x101a59,_0x4bca4f)=>({'id':_0x101a59[_0x37664c(0x16c)],'threadId':_0x101a59[_0x37664c(0x1c5)],'dT':_0x2e9c6c(_0x101a59[_0x37664c(0x1ca)]),'personId':_0x101a59[_0x37664c(0x17b)],'resolved':_0x1e3d17[_0x37664c(0x1e4)]===_0x562e05['Solved'],'unitId':_0x597c63,'subUnitId':_0x380e2f,'text':JSON[_0x37664c(0x169)](_0x101a59[_0x37664c(0x1a2)]),'parentId':_0x4bca4f}),_0x40e108=_0x2ef7e7(_0x1e3d17['replies'][0x0]);return{..._0x40e108,'children':_0x1e3d17[_0x37664c(0x196)][_0x37664c(0x1ef)](0x1)[_0x37664c(0x16b)](_0x7fddef=>_0x2ef7e7(_0x7fddef,_0x40e108['id']))};}return null;}let _0x49b173=class{constructor(_0x36404d,_0x1903f6,_0x3ee212){const _0x5413b0=_0x12b0cc;this['_httpService']=_0x36404d,this[_0x5413b0(0x1ae)]=_0x1903f6,this['_sessionService']=_0x3ee212;}async[_0x12b0cc(0x1cc)](_0x3ba889){const _0x546dfb=_0x12b0cc;var _0x24cb91,_0x43ae8e;const {parentId:_0x964e25,unitId:_0x512675,text:_0x547112,threadId:_0x20ff1b}=_0x3ba889,_0x4e94c7=(_0x43ae8e=(_0x24cb91=_0x547112[_0x546dfb(0x1c7)])==null?void 0x0:_0x24cb91[_0x546dfb(0x1c2)](_0x399fcb=>_0x399fcb[_0x546dfb(0x177)]===_0x42599a[_0x546dfb(0x192)][_0x546dfb(0x1a1)])[_0x546dfb(0x16b)](_0x1918a3=>_0x1918a3[_0x546dfb(0x173)]))!=null?_0x43ae8e:[],_0x4983ba=JSON[_0x546dfb(0x1a5)](_0x547112),_0x1d5f91=(await this['_sessionService'][_0x546dfb(0x1c4)](_0x512675))[_0x546dfb(0x188)]();if(_0x964e25){const _0x35bd9a={'memberId':_0x1d5f91,'unitId':_0x512675,'content':_0x4983ba,'mention':_0x4e94c7,'threadId':_0x20ff1b},_0x2ca155=(await this[_0x546dfb(0x1bb)]['post'](_0x546dfb(0x1b2)+_0x512675+_0x546dfb(0x182),{'body':_0x35bd9a}))[_0x546dfb(0x1a9)][_0x546dfb(0x178)];return{..._0x3ba889,'id':_0x2ca155[_0x546dfb(0x16c)],'dT':_0x42599a[_0x546dfb(0x1c0)](+_0x2ca155['createTimestamp'])[_0x546dfb(0x17d)](_0x546dfb(0x181)),'personId':_0x2ca155[_0x546dfb(0x17b)]};}else{const _0x50859c={'memberId':_0x1d5f91,'unitId':_0x512675,'content':_0x4983ba,'mention':_0x4e94c7},_0x56a678=await this[_0x546dfb(0x1bb)][_0x546dfb(0x1e5)](_0x546dfb(0x1b2)+_0x512675+'/add',{'body':_0x50859c});return _0xac1cfc(_0x56a678[_0x546dfb(0x1a9)][_0x546dfb(0x179)],_0x3ba889);}}async[_0x12b0cc(0x1ed)](_0x1e1df0){const _0x29dcc9=_0x12b0cc;var _0x148477,_0x4d1d61;const {text:_0x3d9590,unitId:_0x349854}=_0x1e1df0,_0x367503=(_0x4d1d61=(_0x148477=_0x3d9590['customRanges'])==null?void 0x0:_0x148477[_0x29dcc9(0x1c2)](_0x35419c=>_0x35419c[_0x29dcc9(0x177)]===_0x42599a[_0x29dcc9(0x192)]['COMMENT'])['map'](_0x273a5a=>_0x273a5a[_0x29dcc9(0x173)]))!=null?_0x4d1d61:[],_0x3bab8c=JSON[_0x29dcc9(0x1a5)](_0x3d9590),_0x146684=_0x1e1df0[_0x29dcc9(0x1c5)],_0xf917a5=_0x1e1df0['id'],_0x4361a8={'memberId':(await this[_0x29dcc9(0x1ac)][_0x29dcc9(0x1c4)](_0x349854))[_0x29dcc9(0x188)](),'unitId':_0x349854,'threadId':_0x146684,'mention':_0x367503,'content':_0x3bab8c,'replyId':_0xf917a5},_0x2cd38f=await this[_0x29dcc9(0x1bb)][_0x29dcc9(0x1e5)]('/universer-api/comment/unit/'+_0x349854+'/edit',{'body':_0x4361a8});return!_0x2cd38f[_0x29dcc9(0x1a9)]['error']||_0x2cd38f['body'][_0x29dcc9(0x183)][_0x29dcc9(0x1c9)]===0x1;}async[_0x12b0cc(0x187)](_0x2d6db1){const _0x43e37e=_0x12b0cc,{unitId:_0x2d8c00}=_0x2d6db1,_0xd2ce70=_0x2d6db1[_0x43e37e(0x1c5)],_0x181259={'memberId':this[_0x43e37e(0x1ae)][_0x43e37e(0x184)]()[_0x43e37e(0x1a7)],'unitId':_0x2d8c00,'threadId':_0xd2ce70,'solved':_0x2d6db1[_0x43e37e(0x1dc)]?_0x562e05[_0x43e37e(0x18b)]:_0x562e05[_0x43e37e(0x191)]},_0x4a13e1=await this['_httpService'][_0x43e37e(0x1e5)](_0x43e37e(0x1b2)+_0x2d8c00+_0x43e37e(0x1b1),{'body':_0x181259});return!_0x4a13e1[_0x43e37e(0x1a9)][_0x43e37e(0x183)]||_0x4a13e1[_0x43e37e(0x1a9)][_0x43e37e(0x183)][_0x43e37e(0x1c9)]===0x1;}async['deleteComment'](_0x70537a,_0x4bdbb4,_0xce1313,_0x5d0295){const _0x548622=_0x12b0cc,_0x170bbe={'memberId':(await this['_sessionService'][_0x548622(0x1c4)](_0x70537a))['getMemberID'](),'threadId':_0xce1313,'replyId':_0x5d0295,'unitId':_0x70537a},_0x4609af=await this[_0x548622(0x1bb)]['post'](_0x548622(0x1b2)+_0x70537a+_0x548622(0x199),{'body':_0x170bbe});return!_0x4609af['body'][_0x548622(0x183)]||_0x4609af[_0x548622(0x1a9)][_0x548622(0x183)][_0x548622(0x1c9)]===0x1;}async['listComments'](_0xae0e0c,_0x248f3b,_0x54d85a){const _0x2a18b9=_0x12b0cc,_0x2dee56={'unitId':_0xae0e0c,'threadId':_0x54d85a},_0x35088d=await this[_0x2a18b9(0x1bb)][_0x2a18b9(0x1e5)]('/universer-api/comment/unit/'+_0xae0e0c+_0x2a18b9(0x1d6),{'body':_0x2dee56}),_0x435fe6=_0x54d85a[_0x2a18b9(0x16b)](_0x8d1de2=>_0x297557(_0x35088d['body']['comments'][_0x8d1de2],_0xae0e0c,_0x248f3b))[_0x2a18b9(0x1c2)](Boolean);return Object['values'](_0x35088d[_0x2a18b9(0x1a9)][_0x2a18b9(0x174)])[_0x2a18b9(0x17f)](_0x1ea756=>{this['_userService']['addUser'](_0x1ea756);}),_0x435fe6;}[_0x12b0cc(0x1ba)](_0x46b32c){const _0x4fac22=_0x12b0cc;return{'id':_0x46b32c['id'],'threadId':_0x46b32c['threadId'],'ref':_0x46b32c[_0x4fac22(0x1b6)]};}};_0x49b173=_0x2ef107([_0x396c75(0x0,_0x42599a[_0x12b0cc(0x1d4)](_0x11d5d9[_0x12b0cc(0x185)])),_0x396c75(0x1,_0x42599a['Inject'](_0x42599a[_0x12b0cc(0x1bd)])),_0x396c75(0x2,_0x42599a[_0x12b0cc(0x1d4)](_0x42c319[_0x12b0cc(0x1b8)]))],_0x49b173);var _0x500772=Object[_0x12b0cc(0x1de)],_0x55cd39=(_0x383f91,_0x1437e3,_0xd80369,_0x1a0451)=>{const _0x43e7f7=_0x12b0cc;for(var _0x17a344=_0x1a0451>0x1?void 0x0:_0x1a0451?_0x500772(_0x1437e3,_0xd80369):_0x1437e3,_0x411719=_0x383f91[_0x43e7f7(0x194)]-0x1,_0x29e18f;_0x411719>=0x0;_0x411719--)(_0x29e18f=_0x383f91[_0x411719])&&(_0x17a344=_0x29e18f(_0x17a344)||_0x17a344);return _0x17a344;},_0x4db8b2=(_0x585627,_0x2d28eb)=>(_0x1bf808,_0x372651)=>_0x2d28eb(_0x1bf808,_0x372651,_0x585627);let _0x1a4a0e=class extends _0x42599a[_0x12b0cc(0x198)]{constructor(_0x5e093e,_0x22484a){const _0x5ca96d=_0x12b0cc;super(),this['_threadCommentDataSourceService']=_0x5e093e,this[_0x5ca96d(0x1d0)]=_0x22484a,this['_initDataSource']();}['_initDataSource'](){const _0x1d3b20=_0x12b0cc;this[_0x1d3b20(0x175)][_0x1d3b20(0x1dd)]=this[_0x1d3b20(0x1d0)],this['_threadCommentDataSourceService'][_0x1d3b20(0x176)]=!0x1;}};_0x1a4a0e=_0x55cd39([_0x4db8b2(0x0,_0x2b67bb[_0x12b0cc(0x1ec)]),_0x4db8b2(0x1,_0x42599a[_0x12b0cc(0x1d4)](_0x49b173))],_0x1a4a0e);var _0x2faf6b=Object[_0x12b0cc(0x168)],_0x33d933=Object[_0x12b0cc(0x1de)],_0xee51e6=(_0x27395e,_0x34ff2e,_0x377525)=>_0x34ff2e in _0x27395e?_0x2faf6b(_0x27395e,_0x34ff2e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x377525}):_0x27395e[_0x34ff2e]=_0x377525,_0x4e0187=(_0x58d3a5,_0x3e5c32,_0x190705,_0x37f190)=>{for(var _0x52cc10=_0x37f190>0x1?void 0x0:_0x37f190?_0x33d933(_0x3e5c32,_0x190705):_0x3e5c32,_0x4a37e7=_0x58d3a5['length']-0x1,_0x2615a4;_0x4a37e7>=0x0;_0x4a37e7--)(_0x2615a4=_0x58d3a5[_0x4a37e7])&&(_0x52cc10=_0x2615a4(_0x52cc10)||_0x52cc10);return _0x52cc10;},_0x9e1a86=(_0x10dccb,_0x139477)=>(_0x3688ff,_0x15d31b)=>_0x139477(_0x3688ff,_0x15d31b,_0x10dccb),_0x505e4c=(_0x2e071e,_0x359feb,_0x1197f3)=>_0xee51e6(_0x2e071e,typeof _0x359feb!=_0x12b0cc(0x17c)?_0x359feb+'':_0x359feb,_0x1197f3);_0x2658bc[_0x12b0cc(0x1ea)]=class extends _0x42599a[_0x12b0cc(0x16f)]{constructor(_0x352107=_0x4267d1,_0x205a5f,_0x13240f){const _0x2e8403=_0x12b0cc;super(),this[_0x2e8403(0x1f1)]=_0x352107,this[_0x2e8403(0x1a3)]=_0x205a5f,this[_0x2e8403(0x19f)]=_0x13240f;const {..._0x1104c9}=_0x42599a[_0x2e8403(0x18f)]({},_0x4267d1,this[_0x2e8403(0x1f1)]);this[_0x2e8403(0x19f)]['setConfig'](_0x530a65,_0x1104c9);}[_0x12b0cc(0x171)](){const _0x212e44=_0x12b0cc;[[_0x49b173],[_0x1a4a0e],[_0x498709]][_0x212e44(0x17f)](_0x30e70f=>{const _0x51abb5=_0x212e44;this['_injector'][_0x51abb5(0x1a0)](_0x30e70f);});}['onReady'](){const _0x43fa20=_0x12b0cc;this['_injector'][_0x43fa20(0x18c)](_0x1a4a0e),this[_0x43fa20(0x1a3)][_0x43fa20(0x18c)](_0x498709);}},_0x505e4c(_0x2658bc[_0x12b0cc(0x1ea)],_0x12b0cc(0x16a),_0x2532e4),_0x505e4c(_0x2658bc[_0x12b0cc(0x1ea)],_0x12b0cc(0x1c6),_0x42599a[_0x12b0cc(0x172)][_0x12b0cc(0x1a8)]),_0x2658bc[_0x12b0cc(0x1ea)]=_0x4e0187([_0x42599a[_0x12b0cc(0x1b3)](_0x6de668[_0x12b0cc(0x1e0)],_0x42c319[_0x12b0cc(0x1d7)],_0x5c2e4c[_0x12b0cc(0x18e)]),_0x9e1a86(0x1,_0x42599a['Inject'](_0x42599a['Injector'])),_0x9e1a86(0x2,_0x42599a[_0x12b0cc(0x189)])],_0x2658bc[_0x12b0cc(0x1ea)]),Object[_0x12b0cc(0x168)](_0x2658bc,Symbol[_0x12b0cc(0x1e8)],{'value':_0x12b0cc(0x17e)});}));function _0x5c50(_0x4e1f5a,_0x1e6df2){const _0x1ab18f=_0x1ab1();return _0x5c50=function(_0x5c507c,_0x1ba68a){_0x5c507c=_0x5c507c-0x168;let _0x33689a=_0x1ab18f[_0x5c507c];return _0x33689a;},_0x5c50(_0x4e1f5a,_0x1e6df2);}function _0x1ab1(){const _0x44e7b9=['_init','user','UniverProLicense','solved','post','Solve','_commentService','toStringTag','exports','UniverThreadCommentDataSourcePlugin','24sKEDzT','IThreadCommentDataSourceService','updateComment','@univerjs-pro/collaboration-client','slice','find','_config','defineProperty','parse','pluginName','map','replyId','UniverThreadComment','16557588uevqBM','Plugin','@univerjs/thread-comment','onStarting','UniverInstanceType','rangeId','users','_threadCommentDataSourceService','syncUpdateMutationToColla','rangeType','reply','comment','rxjs','userId','symbol','format','Module','forEach','_initUserSync','YYYY/MM/DD\x20HH:mm','/reply','error','getCurrentUser','HTTPService','49ZKDkQp','resolveComment','getMemberID','IConfigService','subscribe','Solved','get','disposeWithMe','UniverLicensePlugin','merge','23151YclcaM','OpenOrReOpen','CustomRangeType','CommentService','length','Edit','replies','size','Disposable','/delete','root','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','unitId','335840WWkjtr','delete','_configService','add','COMMENT','content','_injector','2490354TLpvoM','stringify','getUnit','userID','UNIVER_UNKNOWN','body','UniverProThreadCommentDatasource','Delete','_sessionService','getComment','_userService','2596IvPQLd','bufferTime','/solved','/universer-api/comment/unit/','DependentOn','Add','221Dhmtyz','ref','UniverProCollaborationClient','CollaborationSessionService','@univerjs/network','saveCommentToSnapshot','_httpService','addUser','UserManagerService','personId','@univerjs-pro/license','dayjs','8190OFVBdH','filter','@univerjs/thread-comment-ui','requireSession','threadId','type','customRanges','@univerjs/core','code','createTimestamp','object','addComment','UNRECOGNIZED','626armHnI','commentUpdate$','_threadCommentDataSource','236rzVhlw','deleteComment','parentId','Inject','Unknown','/list','UniverCollaborationClientPlugin','_threadCommentModel','payload','283112bQkwee','Reply','resolved','dataSource','getOwnPropertyDescriptor','/universer-api/user/list','UniverThreadCommentUIPlugin'];_0x1ab1=function(){return _0x44e7b9;};return _0x1ab1();}
1
+ function _0x26eb(){const _0x384bbe=['IThreadCommentDataSourceService','size','rxjs','Disposable','UniverProCollaborationClient','IConfigService','UNRECOGNIZED','object','saveCommentToSnapshot','unitId','resolveComment','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment-ui','_init','addUser','11696900KyexYi','disposeWithMe','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','110468qWMkeQ','defineProperty','forEach','code','updateComment','_config','replyId','threadId','pipe','UniverNetwork','length','comments','requireSession','onReady','userId','listComments','error','format','UniverThreadComment','rangeType','comment','Edit','Delete','601321oFmPdo','Add','add','createTimestamp','deleteComment','@univerjs/thread-comment','_httpService','subscribe','OpenOrReOpen','3059602faIqll','onStarting','dayjs','/add','Unknown','UniverProThreadCommentDatasource','Inject','UniverInstanceType','UniverProLicense','users','COMMENT','setConfig','UniverThreadCommentUi','getMemberID','delete','Solve','_threadCommentModel','8oQyjSA','user','type','body','toStringTag','rangeId','amd','_sessionService','pluginName','getUnit','/delete','UniverLicensePlugin','commentUpdate$','dataSource','Reply','root','_initUserSync','/reply','Injector','@univerjs-pro/collaboration-client','post','_injector','@univerjs/core','getOwnPropertyDescriptor','filter','addComment','HTTPService','_userService','@univerjs-pro/license','120kvjrlH','84oUXNeg','solved','get','customRanges','personId','_configService','UserManagerService','Plugin','2674179JoeeQz','/universer-api/user/list','UNIVER_UNKNOWN','Solved','1353648kbxZdo','userID','function','thread-comment-data-source.config','198515vgKxPS','parse','CustomRangeType','/solved','_threadCommentDataSource','symbol','stringify','_initDataSource','_commentService','find','/universer-api/comment/unit/','_threadCommentDataSourceService','replies','payload','getComment','content','UniverThreadCommentDataSourcePlugin','UniverCollaborationClientPlugin','CommentService','map'];_0x26eb=function(){return _0x384bbe;};return _0x26eb();}function _0x5d93(_0x572b6c,_0x1b5639){const _0x26eb6c=_0x26eb();return _0x5d93=function(_0x5d93bc,_0x49f7b6){_0x5d93bc=_0x5d93bc-0x12d;let _0xa76e9e=_0x26eb6c[_0x5d93bc];return _0xa76e9e;},_0x5d93(_0x572b6c,_0x1b5639);}(function(_0x4b9a23,_0x360406){const _0x23a188=_0x5d93,_0x45b82a=_0x4b9a23();while(!![]){try{const _0x5bbfd9=-parseInt(_0x23a188(0x196))/0x1+parseInt(_0x23a188(0x154))/0x2+parseInt(_0x23a188(0x148))/0x3*(parseInt(_0x23a188(0x17f))/0x4)+parseInt(_0x23a188(0x158))/0x5*(-parseInt(_0x23a188(0x147))/0x6)+-parseInt(_0x23a188(0x19f))/0x7+-parseInt(_0x23a188(0x1b0))/0x8*(parseInt(_0x23a188(0x150))/0x9)+parseInt(_0x23a188(0x17b))/0xa;if(_0x5bbfd9===_0x360406)break;else _0x45b82a['push'](_0x45b82a['shift']());}catch(_0x5d4dec){_0x45b82a['push'](_0x45b82a['shift']());}}}(_0x26eb,0x77ad0),function(_0x2673ac,_0x18786b){const _0x1a072d=_0x5d93;typeof exports==_0x1a072d(0x173)&&typeof module<'u'?_0x18786b(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1a072d(0x156)&&define[_0x1a072d(0x130)]?define(['exports',_0x1a072d(0x13d),_0x1a072d(0x146),_0x1a072d(0x140),_0x1a072d(0x178),_0x1a072d(0x19b),_0x1a072d(0x16e),'@univerjs/network'],_0x18786b):(_0x2673ac=typeof globalThis<'u'?globalThis:_0x2673ac||self,_0x18786b(_0x2673ac[_0x1a072d(0x1a4)]={},_0x2673ac[_0x1a072d(0x170)],_0x2673ac[_0x1a072d(0x1a7)],_0x2673ac['UniverCore'],_0x2673ac[_0x1a072d(0x1ab)],_0x2673ac[_0x1a072d(0x191)],_0x2673ac[_0x1a072d(0x16e)],_0x2673ac[_0x1a072d(0x188)]));}(this,function(_0x3a087b,_0x323a48,_0x575afd,_0x19df08,_0x16314d,_0x421745,_0x3762e0,_0x446d9c){'use strict';const _0x52621c=_0x5d93;const _0x2f1353=_0x52621c(0x17e);var _0x48d075=(_0x2f6aea=>(_0x2f6aea[_0x2f6aea[_0x52621c(0x19e)]=0x0]='OpenOrReOpen',_0x2f6aea[_0x2f6aea[_0x52621c(0x153)]=0x1]=_0x52621c(0x153),_0x2f6aea[_0x2f6aea['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2f6aea))(_0x48d075||{}),_0x28aaad=(_0x457d9e=>(_0x457d9e[_0x457d9e[_0x52621c(0x1a3)]=0x0]=_0x52621c(0x1a3),_0x457d9e[_0x457d9e[_0x52621c(0x197)]=0x1]='Add',_0x457d9e[_0x457d9e['Reply']=0x2]=_0x52621c(0x138),_0x457d9e[_0x457d9e[_0x52621c(0x194)]=0x3]='Edit',_0x457d9e[_0x457d9e[_0x52621c(0x195)]=0x4]=_0x52621c(0x195),_0x457d9e[_0x457d9e[_0x52621c(0x1ae)]=0x5]=_0x52621c(0x1ae),_0x457d9e[_0x457d9e[_0x52621c(0x172)]=-0x1]=_0x52621c(0x172),_0x457d9e))(_0x28aaad||{});const _0x217280=_0x474528=>_0x19df08[_0x52621c(0x1a1)](new Date(+_0x474528))[_0x52621c(0x190)](_0x52621c(0x177)),_0x32d475=async(_0x30ee5c,_0x194c70)=>{const _0x3ea5a2=_0x52621c,_0x406fd7=_0x30ee5c['get'](_0x19df08[_0x3ea5a2(0x14e)]),_0x47f38f=_0x30ee5c[_0x3ea5a2(0x14a)](_0x446d9c[_0x3ea5a2(0x144)]);_0x194c70[_0x3ea5a2(0x181)](_0x4045f1=>{const _0x1aba79=_0x3ea5a2;_0x406fd7['getUser'](_0x4045f1)&&_0x194c70[_0x1aba79(0x1ad)](_0x4045f1);}),_0x194c70[_0x3ea5a2(0x16d)]&&(await _0x47f38f['get'](_0x3ea5a2(0x151),{'params':{'userIDs':[..._0x194c70]}}))[_0x3ea5a2(0x12d)][_0x3ea5a2(0x1a8)][_0x3ea5a2(0x181)](_0x23bba0=>{const _0x1cc050=_0x3ea5a2;_0x23bba0&&_0x406fd7[_0x1cc050(0x17a)](_0x23bba0);});};var _0x1dbe4d=Object[_0x52621c(0x141)],_0x254c2d=(_0x3edbce,_0xa07762,_0xb014b9,_0x3e347e)=>{const _0x373a31=_0x52621c;for(var _0x3230a0=_0x3e347e>0x1?void 0x0:_0x3e347e?_0x1dbe4d(_0xa07762,_0xb014b9):_0xa07762,_0x41ccef=_0x3edbce[_0x373a31(0x189)]-0x1,_0x5f4aa2;_0x41ccef>=0x0;_0x41ccef--)(_0x5f4aa2=_0x3edbce[_0x41ccef])&&(_0x3230a0=_0x5f4aa2(_0x3230a0)||_0x3230a0);return _0x3230a0;},_0x13ff24=(_0x187597,_0x315d76)=>(_0x26d958,_0x37e28a)=>_0x315d76(_0x26d958,_0x37e28a,_0x187597);let _0x26214a=class extends _0x19df08[_0x52621c(0x16f)]{constructor(_0x570951,_0x52a93c,_0x45f3cb,_0x59d76f){const _0x49df0e=_0x52621c;super(),this[_0x49df0e(0x160)]=_0x570951,this['_threadCommentModel']=_0x52a93c,this[_0x49df0e(0x145)]=_0x45f3cb,this[_0x49df0e(0x13f)]=_0x59d76f,this[_0x49df0e(0x179)](),this[_0x49df0e(0x13a)]();}[_0x52621c(0x13a)](){const _0x4e2eef=_0x52621c;this[_0x4e2eef(0x17c)](this[_0x4e2eef(0x1af)][_0x4e2eef(0x136)][_0x4e2eef(0x187)](_0x3762e0['bufferTime'](0x10))[_0x4e2eef(0x19d)](_0xa89dd8=>{const _0x41334b=_0x4e2eef,_0x103c44=new Set();_0xa89dd8[_0x41334b(0x181)](_0x6f78c8=>{const _0x270579=_0x41334b;switch(_0x6f78c8['type']){case _0x270579(0x198):{const _0x5e0f48=_0x6f78c8[_0x270579(0x165)][_0x270579(0x14c)];_0x103c44[_0x270579(0x198)](_0x5e0f48);break;}}}),_0x32d475(this[_0x41334b(0x13f)],_0x103c44);}));}[_0x52621c(0x179)](){const _0x10fab2=_0x52621c;this[_0x10fab2(0x17c)](this[_0x10fab2(0x160)][_0x10fab2(0x136)][_0x10fab2(0x19d)](async _0x5d8010=>{const _0x7ea267=_0x10fab2;var _0x2497a6,_0x87ec51,_0x16548f,_0x3dd121;const _0x256206=(_0x2497a6=this[_0x7ea267(0x1af)][_0x7ea267(0x133)](_0x5d8010[_0x7ea267(0x175)])[_0x7ea267(0x161)](_0x534e25=>_0x534e25[_0x7ea267(0x186)]===_0x5d8010['threadId']))==null?void 0x0:_0x2497a6[_0x7ea267(0x139)];if(!_0x256206)return;const {unitId:_0x358949,subUnitId:_0x31f582}=_0x256206;switch(_0x5d8010[_0x7ea267(0x1b1)]&&this[_0x7ea267(0x145)][_0x7ea267(0x17a)](_0x5d8010[_0x7ea267(0x1b1)]),_0x5d8010[_0x7ea267(0x1b2)]){case _0x28aaad[_0x7ea267(0x197)]:break;case _0x28aaad[_0x7ea267(0x138)]:{this[_0x7ea267(0x1af)][_0x7ea267(0x143)](_0x358949,_0x31f582,{'unitId':_0x358949,'subUnitId':_0x31f582,'ref':'','id':_0x5d8010[_0x7ea267(0x185)],'dT':_0x217280(+_0x5d8010['createTimestamp']),'threadId':_0x5d8010['threadId'],'personId':(_0x16548f=(_0x87ec51=_0x5d8010[_0x7ea267(0x1b1)])==null?void 0x0:_0x87ec51[_0x7ea267(0x155)])!=null?_0x16548f:_0x5d8010['userId'],'text':JSON[_0x7ea267(0x159)](_0x5d8010[_0x7ea267(0x167)]),'parentId':_0x256206['id']});break;}case _0x28aaad[_0x7ea267(0x195)]:{const _0x56107e=this[_0x7ea267(0x1af)][_0x7ea267(0x166)](_0x358949,_0x31f582,_0x5d8010[_0x7ea267(0x185)]);_0x56107e&&_0x56107e[_0x7ea267(0x17d)]&&this['_threadCommentModel'][_0x7ea267(0x19a)](_0x358949,_0x31f582,_0x5d8010[_0x7ea267(0x185)]);break;}case _0x28aaad[_0x7ea267(0x194)]:{this['_threadCommentModel'][_0x7ea267(0x183)](_0x358949,_0x31f582,{'commentId':_0x5d8010['replyId'],'text':JSON[_0x7ea267(0x159)](_0x5d8010[_0x7ea267(0x167)])});break;}case _0x28aaad[_0x7ea267(0x1ae)]:{const _0x58eaae=(_0x3dd121=this[_0x7ea267(0x1af)][_0x7ea267(0x133)](_0x5d8010[_0x7ea267(0x175)])['find'](_0x5d04c2=>_0x5d04c2[_0x7ea267(0x186)]===_0x5d8010[_0x7ea267(0x186)]))==null?void 0x0:_0x3dd121[_0x7ea267(0x139)];_0x58eaae&&this[_0x7ea267(0x1af)][_0x7ea267(0x176)](_0x358949,_0x31f582,_0x58eaae['id'],_0x5d8010[_0x7ea267(0x149)]===_0x48d075[_0x7ea267(0x153)]);break;}}}));}};_0x26214a=_0x254c2d([_0x13ff24(0x0,_0x19df08[_0x52621c(0x1a5)](_0x323a48[_0x52621c(0x16a)])),_0x13ff24(0x1,_0x19df08[_0x52621c(0x1a5)](_0x421745['ThreadCommentModel'])),_0x13ff24(0x2,_0x19df08[_0x52621c(0x1a5)](_0x19df08[_0x52621c(0x14e)])),_0x13ff24(0x3,_0x19df08['Inject'](_0x19df08[_0x52621c(0x13c)]))],_0x26214a);const _0x4b3d2e=_0x52621c(0x157),_0x2d7ec7={};var _0x20ab17=Object[_0x52621c(0x141)],_0x2b26b3=(_0x1406d3,_0x5635b0,_0x562926,_0x432411)=>{const _0x51ad3e=_0x52621c;for(var _0x13ae4b=_0x432411>0x1?void 0x0:_0x432411?_0x20ab17(_0x5635b0,_0x562926):_0x5635b0,_0x2a4a82=_0x1406d3[_0x51ad3e(0x189)]-0x1,_0x5663e9;_0x2a4a82>=0x0;_0x2a4a82--)(_0x5663e9=_0x1406d3[_0x2a4a82])&&(_0x13ae4b=_0x5663e9(_0x13ae4b)||_0x13ae4b);return _0x13ae4b;},_0xd97f5e=(_0x15a147,_0x3a4e9b)=>(_0x512065,_0x49724b)=>_0x3a4e9b(_0x512065,_0x49724b,_0x15a147);function _0x5183c8(_0x1be41b,_0x3de3b6){const _0x1b42bb=_0x52621c,_0x26c5e9=_0x1be41b[_0x1b42bb(0x164)][0x0];return{..._0x3de3b6,'id':_0x26c5e9[_0x1b42bb(0x185)],'resolved':_0x1be41b[_0x1b42bb(0x149)]===0x1,'dT':_0x217280(_0x26c5e9[_0x1b42bb(0x199)]),'personId':_0x26c5e9[_0x1b42bb(0x18d)],'threadId':_0x26c5e9[_0x1b42bb(0x186)]};}function _0x3ab341(_0x25c4dd,_0x498fec,_0x2cb424){const _0x1010d0=_0x52621c;var _0x36f90d,_0x33ebf0;if(((_0x33ebf0=(_0x36f90d=_0x25c4dd==null?void 0x0:_0x25c4dd['replies'])==null?void 0x0:_0x36f90d[_0x1010d0(0x189)])!=null?_0x33ebf0:0x0)>0x0){const _0x11f92d=(_0x20d4a4,_0x44be6e)=>({'id':_0x20d4a4['replyId'],'threadId':_0x20d4a4['threadId'],'dT':_0x217280(_0x20d4a4[_0x1010d0(0x199)]),'personId':_0x20d4a4[_0x1010d0(0x18d)],'resolved':_0x25c4dd[_0x1010d0(0x149)]===_0x48d075['Solved'],'unitId':_0x498fec,'subUnitId':_0x2cb424,'text':JSON[_0x1010d0(0x159)](_0x20d4a4[_0x1010d0(0x167)]),'parentId':_0x44be6e}),_0x5f1f47=_0x11f92d(_0x25c4dd[_0x1010d0(0x164)][0x0]);return{..._0x5f1f47,'children':_0x25c4dd[_0x1010d0(0x164)]['slice'](0x1)[_0x1010d0(0x16b)](_0x3aa11c=>_0x11f92d(_0x3aa11c,_0x5f1f47['id']))};}return null;}let _0x2e7e20=class{constructor(_0x3d78b9,_0x1db7dd,_0x5cd356){const _0x439ff4=_0x52621c;this[_0x439ff4(0x19c)]=_0x3d78b9,this[_0x439ff4(0x145)]=_0x1db7dd,this[_0x439ff4(0x131)]=_0x5cd356;}async[_0x52621c(0x143)](_0x1e2f31){const _0x5a3be3=_0x52621c;var _0x4b2ee0,_0x17f2fa;const {parentId:_0x1241fb,unitId:_0x13b7ee,text:_0x47abb2,threadId:_0x2b1a5d}=_0x1e2f31,_0x35d0a3=(_0x17f2fa=(_0x4b2ee0=_0x47abb2[_0x5a3be3(0x14b)])==null?void 0x0:_0x4b2ee0['filter'](_0x461fed=>_0x461fed[_0x5a3be3(0x192)]===_0x19df08[_0x5a3be3(0x15a)][_0x5a3be3(0x1a9)])[_0x5a3be3(0x16b)](_0x3bc4de=>_0x3bc4de[_0x5a3be3(0x12f)]))!=null?_0x17f2fa:[],_0x50e493=JSON[_0x5a3be3(0x15e)](_0x47abb2),_0x449137=(await this[_0x5a3be3(0x131)][_0x5a3be3(0x18b)](_0x13b7ee))['getMemberID']();if(_0x1241fb){const _0x4c020c={'memberId':_0x449137,'unitId':_0x13b7ee,'content':_0x50e493,'mention':_0x35d0a3,'threadId':_0x2b1a5d},_0x5e5051=(await this[_0x5a3be3(0x19c)][_0x5a3be3(0x13e)](_0x5a3be3(0x162)+_0x13b7ee+_0x5a3be3(0x13b),{'body':_0x4c020c}))['body']['reply'];return{..._0x1e2f31,'id':_0x5e5051[_0x5a3be3(0x185)],'dT':_0x19df08[_0x5a3be3(0x1a1)](+_0x5e5051[_0x5a3be3(0x199)])[_0x5a3be3(0x190)](_0x5a3be3(0x177)),'personId':_0x5e5051['userId']};}else{const _0x56b19e={'memberId':_0x449137,'unitId':_0x13b7ee,'content':_0x50e493,'mention':_0x35d0a3},_0x24606f=await this[_0x5a3be3(0x19c)][_0x5a3be3(0x13e)](_0x5a3be3(0x162)+_0x13b7ee+_0x5a3be3(0x1a2),{'body':_0x56b19e});return _0x5183c8(_0x24606f[_0x5a3be3(0x12d)][_0x5a3be3(0x193)],_0x1e2f31);}}async['updateComment'](_0x339b14){const _0x12df87=_0x52621c;var _0x14cb54,_0x3bfb85;const {text:_0x3b8059,unitId:_0x1e867d}=_0x339b14,_0x18b0e2=(_0x3bfb85=(_0x14cb54=_0x3b8059[_0x12df87(0x14b)])==null?void 0x0:_0x14cb54[_0x12df87(0x142)](_0x3d7025=>_0x3d7025[_0x12df87(0x192)]===_0x19df08[_0x12df87(0x15a)]['COMMENT'])[_0x12df87(0x16b)](_0x178d84=>_0x178d84['rangeId']))!=null?_0x3bfb85:[],_0xc6fb10=JSON['stringify'](_0x3b8059),_0x815b9f=_0x339b14[_0x12df87(0x186)],_0x1d98cc=_0x339b14['id'],_0x4a5116={'memberId':(await this[_0x12df87(0x131)][_0x12df87(0x18b)](_0x1e867d))[_0x12df87(0x1ac)](),'unitId':_0x1e867d,'threadId':_0x815b9f,'mention':_0x18b0e2,'content':_0xc6fb10,'replyId':_0x1d98cc},_0x15a7bf=await this[_0x12df87(0x19c)][_0x12df87(0x13e)](_0x12df87(0x162)+_0x1e867d+'/edit',{'body':_0x4a5116});return!_0x15a7bf[_0x12df87(0x12d)][_0x12df87(0x18f)]||_0x15a7bf['body']['error'][_0x12df87(0x182)]===0x1;}async['resolveComment'](_0x178e51){const _0xc45704=_0x52621c,{unitId:_0x48a285}=_0x178e51,_0x5474f5=_0x178e51[_0xc45704(0x186)],_0x3f3a0f={'memberId':this[_0xc45704(0x145)]['getCurrentUser']()[_0xc45704(0x155)],'unitId':_0x48a285,'threadId':_0x5474f5,'solved':_0x178e51['resolved']?_0x48d075[_0xc45704(0x153)]:_0x48d075[_0xc45704(0x19e)]},_0x588aa8=await this['_httpService']['post'](_0xc45704(0x162)+_0x48a285+_0xc45704(0x15b),{'body':_0x3f3a0f});return!_0x588aa8[_0xc45704(0x12d)][_0xc45704(0x18f)]||_0x588aa8[_0xc45704(0x12d)]['error'][_0xc45704(0x182)]===0x1;}async[_0x52621c(0x19a)](_0x3ffa4f,_0x3d8a84,_0x4a1078,_0x2dde06){const _0x10e3a9=_0x52621c,_0xa1019f={'memberId':(await this[_0x10e3a9(0x131)][_0x10e3a9(0x18b)](_0x3ffa4f))[_0x10e3a9(0x1ac)](),'threadId':_0x4a1078,'replyId':_0x2dde06,'unitId':_0x3ffa4f},_0xb4896b=await this[_0x10e3a9(0x19c)][_0x10e3a9(0x13e)](_0x10e3a9(0x162)+_0x3ffa4f+_0x10e3a9(0x134),{'body':_0xa1019f});return!_0xb4896b['body'][_0x10e3a9(0x18f)]||_0xb4896b[_0x10e3a9(0x12d)]['error']['code']===0x1;}async[_0x52621c(0x18e)](_0x373ef7,_0x3fc767,_0x3c4035){const _0x290ec2=_0x52621c,_0x4f23a0={'unitId':_0x373ef7,'threadId':_0x3c4035},_0x59f2a4=await this['_httpService'][_0x290ec2(0x13e)](_0x290ec2(0x162)+_0x373ef7+'/list',{'body':_0x4f23a0}),_0x25f204=_0x3c4035[_0x290ec2(0x16b)](_0x4ddbfd=>_0x3ab341(_0x59f2a4[_0x290ec2(0x12d)][_0x290ec2(0x18a)][_0x4ddbfd],_0x373ef7,_0x3fc767))[_0x290ec2(0x142)](Boolean);return Object['values'](_0x59f2a4['body'][_0x290ec2(0x1a8)])[_0x290ec2(0x181)](_0x26214c=>{this['_userService']['addUser'](_0x26214c);}),_0x25f204;}[_0x52621c(0x174)](_0x327c0c){const _0x331c13=_0x52621c;return{'id':_0x327c0c['id'],'threadId':_0x327c0c[_0x331c13(0x186)],'ref':_0x327c0c['ref']};}};_0x2e7e20=_0x2b26b3([_0xd97f5e(0x0,_0x19df08[_0x52621c(0x1a5)](_0x446d9c[_0x52621c(0x144)])),_0xd97f5e(0x1,_0x19df08[_0x52621c(0x1a5)](_0x19df08[_0x52621c(0x14e)])),_0xd97f5e(0x2,_0x19df08[_0x52621c(0x1a5)](_0x323a48['CollaborationSessionService']))],_0x2e7e20);var _0x42232d=Object[_0x52621c(0x141)],_0x3836f6=(_0x14f681,_0x2bd2a4,_0x2c8c66,_0x5b68bb)=>{for(var _0x2c6340=_0x5b68bb>0x1?void 0x0:_0x5b68bb?_0x42232d(_0x2bd2a4,_0x2c8c66):_0x2bd2a4,_0x50b346=_0x14f681['length']-0x1,_0x565f3c;_0x50b346>=0x0;_0x50b346--)(_0x565f3c=_0x14f681[_0x50b346])&&(_0x2c6340=_0x565f3c(_0x2c6340)||_0x2c6340);return _0x2c6340;},_0x4ab953=(_0x5c6fb7,_0x254208)=>(_0x25a362,_0x2a4a1b)=>_0x254208(_0x25a362,_0x2a4a1b,_0x5c6fb7);let _0x5ec874=class extends _0x19df08[_0x52621c(0x16f)]{constructor(_0x8cb54e,_0x5de5f0){const _0x425452=_0x52621c;super(),this['_threadCommentDataSourceService']=_0x8cb54e,this[_0x425452(0x15c)]=_0x5de5f0,this[_0x425452(0x15f)]();}['_initDataSource'](){const _0x5348e1=_0x52621c;this['_threadCommentDataSourceService'][_0x5348e1(0x137)]=this['_threadCommentDataSource'],this[_0x5348e1(0x163)]['syncUpdateMutationToColla']=!0x1;}};_0x5ec874=_0x3836f6([_0x4ab953(0x0,_0x421745[_0x52621c(0x16c)]),_0x4ab953(0x1,_0x19df08[_0x52621c(0x1a5)](_0x2e7e20))],_0x5ec874);var _0x4c04c5=Object[_0x52621c(0x180)],_0x3e63bb=Object['getOwnPropertyDescriptor'],_0x1f131f=(_0x38f7ab,_0x38fb0c,_0xc45e0)=>_0x38fb0c in _0x38f7ab?_0x4c04c5(_0x38f7ab,_0x38fb0c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xc45e0}):_0x38f7ab[_0x38fb0c]=_0xc45e0,_0x17f52f=(_0xe783a7,_0x2ab9b0,_0xb2df55,_0x47a416)=>{const _0x19cee6=_0x52621c;for(var _0xd845e4=_0x47a416>0x1?void 0x0:_0x47a416?_0x3e63bb(_0x2ab9b0,_0xb2df55):_0x2ab9b0,_0x5e2687=_0xe783a7[_0x19cee6(0x189)]-0x1,_0x12e7a4;_0x5e2687>=0x0;_0x5e2687--)(_0x12e7a4=_0xe783a7[_0x5e2687])&&(_0xd845e4=_0x12e7a4(_0xd845e4)||_0xd845e4);return _0xd845e4;},_0x1b8b4d=(_0x7c6f04,_0x38886f)=>(_0x569c23,_0x32b914)=>_0x38886f(_0x569c23,_0x32b914,_0x7c6f04),_0x4130b6=(_0x44c847,_0x5990de,_0xf325f5)=>_0x1f131f(_0x44c847,typeof _0x5990de!=_0x52621c(0x15d)?_0x5990de+'':_0x5990de,_0xf325f5);_0x3a087b[_0x52621c(0x168)]=class extends _0x19df08[_0x52621c(0x14f)]{constructor(_0x4608b7=_0x2d7ec7,_0x30aa3e,_0x48a0fd){const _0x3e544d=_0x52621c;super(),this[_0x3e544d(0x184)]=_0x4608b7,this[_0x3e544d(0x13f)]=_0x30aa3e,this[_0x3e544d(0x14d)]=_0x48a0fd;const {..._0x59b1d8}=_0x19df08['merge']({},_0x2d7ec7,this[_0x3e544d(0x184)]);this[_0x3e544d(0x14d)][_0x3e544d(0x1aa)](_0x4b3d2e,_0x59b1d8);}[_0x52621c(0x1a0)](){const _0xd64399=_0x52621c;[[_0x2e7e20],[_0x5ec874],[_0x26214a]][_0xd64399(0x181)](_0x19ff3c=>{const _0x41296d=_0xd64399;this['_injector'][_0x41296d(0x198)](_0x19ff3c);});}[_0x52621c(0x18c)](){const _0xed3f3c=_0x52621c;this[_0xed3f3c(0x13f)]['get'](_0x5ec874),this[_0xed3f3c(0x13f)][_0xed3f3c(0x14a)](_0x26214a);}},_0x4130b6(_0x3a087b[_0x52621c(0x168)],_0x52621c(0x132),_0x2f1353),_0x4130b6(_0x3a087b['UniverThreadCommentDataSourcePlugin'],_0x52621c(0x1b2),_0x19df08[_0x52621c(0x1a6)][_0x52621c(0x152)]),_0x3a087b[_0x52621c(0x168)]=_0x17f52f([_0x19df08['DependentOn'](_0x16314d['UniverThreadCommentUIPlugin'],_0x323a48[_0x52621c(0x169)],_0x575afd[_0x52621c(0x135)]),_0x1b8b4d(0x1,_0x19df08['Inject'](_0x19df08[_0x52621c(0x13c)])),_0x1b8b4d(0x2,_0x19df08[_0x52621c(0x171)])],_0x3a087b['UniverThreadCommentDataSourcePlugin']),Object[_0x52621c(0x180)](_0x3a087b,Symbol[_0x52621c(0x12e)],{'value':'Module'});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.3-nightly.202508121228",
3
+ "version": "0.10.3-nightly.202508150623",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.10.3-nightly.202508121228",
49
- "@univerjs-pro/collaboration-client": "0.10.3-nightly.202508121228",
50
- "@univerjs/network": "0.10.3-nightly.202508121228",
48
+ "@univerjs-pro/collaboration-client": "0.10.3-nightly.202508150623",
49
+ "@univerjs-pro/license": "0.10.3-nightly.202508150623",
50
+ "@univerjs/network": "0.10.3-nightly.202508150623",
51
51
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/core": "0.10.3-nightly.202508121228",
53
- "@univerjs/thread-comment-ui": "0.10.3-nightly.202508121228",
54
- "@univerjs/thread-comment": "0.10.3-nightly.202508121228"
52
+ "@univerjs/thread-comment-ui": "0.10.3-nightly.202508150623",
53
+ "@univerjs/thread-comment": "0.10.3-nightly.202508150623",
54
+ "@univerjs/core": "0.10.3-nightly.202508150623"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",