@univerjs-pro/thread-comment-datasource 0.6.9-experimental.20250408-da421ca → 0.6.9-experimental.20250409-e08c696

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 _0xfb6c80=_0x9813;(function(_0x1bcd11,_0x3effa1){const _0x5b696c=_0x9813,_0x726b0c=_0x1bcd11();while(!![]){try{const _0x5212f9=-parseInt(_0x5b696c(0x161))/0x1+-parseInt(_0x5b696c(0xf2))/0x2*(-parseInt(_0x5b696c(0x129))/0x3)+parseInt(_0x5b696c(0x121))/0x4+parseInt(_0x5b696c(0x159))/0x5*(-parseInt(_0x5b696c(0x14f))/0x6)+parseInt(_0x5b696c(0x12e))/0x7*(-parseInt(_0x5b696c(0x122))/0x8)+-parseInt(_0x5b696c(0x14d))/0x9*(parseInt(_0x5b696c(0x140))/0xa)+-parseInt(_0x5b696c(0xf9))/0xb*(-parseInt(_0x5b696c(0x115))/0xc);if(_0x5212f9===_0x3effa1)break;else _0x726b0c['push'](_0x726b0c['shift']());}catch(_0x4de51a){_0x726b0c['push'](_0x726b0c['shift']());}}}(_0x1793,0xeaf8f));Object[_0xfb6c80(0x125)](exports,Symbol[_0xfb6c80(0x113)],{'value':_0xfb6c80(0xfe)});const b=require(_0xfb6c80(0x10b)),T=require(_0xfb6c80(0x131)),c=require(_0xfb6c80(0x154)),j=require(_0xfb6c80(0x117)),M=require('@univerjs/thread-comment'),w=require(_0xfb6c80(0x11f)),P=require(_0xfb6c80(0x171)),U=_0xfb6c80(0xfb);var I=(_0x2a84ec=>(_0x2a84ec[_0x2a84ec[_0xfb6c80(0x13a)]=0x0]=_0xfb6c80(0x13a),_0x2a84ec[_0x2a84ec[_0xfb6c80(0x105)]=0x1]=_0xfb6c80(0x105),_0x2a84ec[_0x2a84ec[_0xfb6c80(0x14b)]=-0x1]=_0xfb6c80(0x14b),_0x2a84ec))(I||{}),v=(_0xa63362=>(_0xa63362[_0xa63362[_0xfb6c80(0x10c)]=0x0]=_0xfb6c80(0x10c),_0xa63362[_0xa63362['Add']=0x1]='Add',_0xa63362[_0xa63362[_0xfb6c80(0xf1)]=0x2]=_0xfb6c80(0xf1),_0xa63362[_0xa63362[_0xfb6c80(0x109)]=0x3]='Edit',_0xa63362[_0xa63362['Delete']=0x4]=_0xfb6c80(0x116),_0xa63362[_0xa63362[_0xfb6c80(0x144)]=0x5]=_0xfb6c80(0x144),_0xa63362[_0xa63362[_0xfb6c80(0x14b)]=-0x1]='UNRECOGNIZED',_0xa63362))(v||{});const f=_0x29421e=>c[_0xfb6c80(0x163)](new Date(+_0x29421e))[_0xfb6c80(0x11d)](_0xfb6c80(0x104)),R=async(_0x43efc9,_0x219c06)=>{const _0x533567=_0xfb6c80,_0x40a561=_0x43efc9[_0x533567(0x126)](c['UserManagerService']),_0xa982dc=_0x43efc9[_0x533567(0x126)](P[_0x533567(0x166)]);_0x219c06['forEach'](_0xc4df08=>{const _0x6fe01f=_0x533567;_0x40a561[_0x6fe01f(0x16f)](_0xc4df08)&&_0x219c06[_0x6fe01f(0x107)](_0xc4df08);}),_0x219c06['size']&&(await _0xa982dc[_0x533567(0x126)](_0x533567(0x158),{'params':{'userIDs':[..._0x219c06]}}))[_0x533567(0x108)][_0x533567(0x12d)][_0x533567(0x16e)](_0x445075=>{const _0x29e2ec=_0x533567;_0x445075&&_0x40a561[_0x29e2ec(0x148)](_0x445075);});};var $=Object[_0xfb6c80(0x152)],E=(_0x34ac96,_0x3d17f6,_0xb06d43,_0x1f9e0f)=>{const _0x20337f=_0xfb6c80;for(var _0x1c83ff=_0x1f9e0f>0x1?void 0x0:_0x1f9e0f?$(_0x3d17f6,_0xb06d43):_0x3d17f6,_0x1794e1=_0x34ac96[_0x20337f(0xf6)]-0x1,_0x51b00e;_0x1794e1>=0x0;_0x1794e1--)(_0x51b00e=_0x34ac96[_0x1794e1])&&(_0x1c83ff=_0x51b00e(_0x1c83ff)||_0x1c83ff);return _0x1c83ff;},S=(_0x432e08,_0x299f07)=>(_0x165bfd,_0x4f95f6)=>_0x299f07(_0x165bfd,_0x4f95f6,_0x432e08);let p=class extends c['Disposable']{constructor(_0x1fcf84,_0xcb8cbc,_0x5a3681,_0x7e0dfd){const _0x344502=_0xfb6c80;super(),this[_0x344502(0x155)]=_0x1fcf84,this[_0x344502(0xf3)]=_0xcb8cbc,this['_userService']=_0x5a3681,this[_0x344502(0x101)]=_0x7e0dfd,this[_0x344502(0x124)](),this['_initUserSync']();}['_initUserSync'](){const _0x4ca73b=_0xfb6c80;this[_0x4ca73b(0x11e)](this[_0x4ca73b(0xf3)][_0x4ca73b(0x10d)]['pipe'](w[_0x4ca73b(0x135)](0x10))[_0x4ca73b(0x12b)](_0x2cfbd0=>{const _0xd6664a=_0x4ca73b,_0x4d1e3c=new Set();_0x2cfbd0['forEach'](_0x1fa91b=>{const _0x1c5d76=_0x9813;switch(_0x1fa91b[_0x1c5d76(0x145)]){case'add':{const _0x4ead73=_0x1fa91b[_0x1c5d76(0x130)][_0x1c5d76(0x14a)];_0x4d1e3c[_0x1c5d76(0x15c)](_0x4ead73);break;}}}),R(this[_0xd6664a(0x101)],_0x4d1e3c);}));}[_0xfb6c80(0x124)](){const _0x387d48=_0xfb6c80;this[_0x387d48(0x11e)](this[_0x387d48(0x155)][_0x387d48(0x10d)][_0x387d48(0x12b)](async _0x5ee7aa=>{const _0x3cfaa7=_0x387d48;var _0xb258b8,_0x291072,_0x470deb,_0x3978ab;const _0x592254=(_0xb258b8=this[_0x3cfaa7(0xf3)][_0x3cfaa7(0x156)](_0x5ee7aa[_0x3cfaa7(0x139)])[_0x3cfaa7(0x10a)](_0x497a4d=>_0x497a4d[_0x3cfaa7(0x12f)]===_0x5ee7aa[_0x3cfaa7(0x12f)]))==null?void 0x0:_0xb258b8[_0x3cfaa7(0x11c)];if(!_0x592254)return;const {unitId:_0x360564,subUnitId:_0x19e14}=_0x592254;switch(_0x5ee7aa[_0x3cfaa7(0x132)]&&this['_userService'][_0x3cfaa7(0x148)](_0x5ee7aa[_0x3cfaa7(0x132)]),_0x5ee7aa[_0x3cfaa7(0x145)]){case v['Add']:break;case v['Reply']:{this[_0x3cfaa7(0xf3)][_0x3cfaa7(0x143)](_0x360564,_0x19e14,{'unitId':_0x360564,'subUnitId':_0x19e14,'ref':'','id':_0x5ee7aa[_0x3cfaa7(0x123)],'dT':f(+_0x5ee7aa[_0x3cfaa7(0x160)]),'threadId':_0x5ee7aa[_0x3cfaa7(0x12f)],'personId':(_0x470deb=(_0x291072=_0x5ee7aa[_0x3cfaa7(0x132)])==null?void 0x0:_0x291072[_0x3cfaa7(0x153)])!=null?_0x470deb:_0x5ee7aa[_0x3cfaa7(0x112)],'text':JSON['parse'](_0x5ee7aa[_0x3cfaa7(0xf8)]),'parentId':_0x592254['id']});break;}case v[_0x3cfaa7(0x116)]:{const _0x139c2f=this['_threadCommentModel'][_0x3cfaa7(0x128)](_0x360564,_0x19e14,_0x5ee7aa[_0x3cfaa7(0x123)]);_0x139c2f&&_0x139c2f[_0x3cfaa7(0x13d)]&&this['_threadCommentModel']['deleteComment'](_0x360564,_0x19e14,_0x5ee7aa['replyId']);break;}case v[_0x3cfaa7(0x109)]:{this[_0x3cfaa7(0xf3)][_0x3cfaa7(0x16a)](_0x360564,_0x19e14,{'commentId':_0x5ee7aa[_0x3cfaa7(0x123)],'text':JSON[_0x3cfaa7(0x150)](_0x5ee7aa[_0x3cfaa7(0xf8)])});break;}case v['Solve']:{const _0xfc9aad=(_0x3978ab=this[_0x3cfaa7(0xf3)][_0x3cfaa7(0x156)](_0x5ee7aa[_0x3cfaa7(0x139)])['find'](_0x53fc09=>_0x53fc09[_0x3cfaa7(0x12f)]===_0x5ee7aa[_0x3cfaa7(0x12f)]))==null?void 0x0:_0x3978ab[_0x3cfaa7(0x11c)];_0xfc9aad&&this['_threadCommentModel']['resolveComment'](_0x360564,_0x19e14,_0xfc9aad['id'],_0x5ee7aa[_0x3cfaa7(0x141)]===I[_0x3cfaa7(0x105)]);break;}}}));}};p=E([S(0x0,c[_0xfb6c80(0x172)](b[_0xfb6c80(0x164)])),S(0x1,c['Inject'](M[_0xfb6c80(0x147)])),S(0x2,c[_0xfb6c80(0x172)](c[_0xfb6c80(0x10f)])),S(0x3,c[_0xfb6c80(0x172)](c[_0xfb6c80(0x169)]))],p);const q=_0xfb6c80(0x149),D={};var A=Object[_0xfb6c80(0x152)],x=(_0x8a69fd,_0x54c7b6,_0x16aaa6,_0x36968c)=>{const _0x44c273=_0xfb6c80;for(var _0x58eab8=_0x36968c>0x1?void 0x0:_0x36968c?A(_0x54c7b6,_0x16aaa6):_0x54c7b6,_0x3044ef=_0x8a69fd[_0x44c273(0xf6)]-0x1,_0x7c0c0f;_0x3044ef>=0x0;_0x3044ef--)(_0x7c0c0f=_0x8a69fd[_0x3044ef])&&(_0x58eab8=_0x7c0c0f(_0x58eab8)||_0x58eab8);return _0x58eab8;},_=(_0x2c4438,_0x1b7202)=>(_0x2c8a5d,_0x39e51b)=>_0x1b7202(_0x2c8a5d,_0x39e51b,_0x2c4438);function Y(_0x50b430,_0x2bf0d7){const _0x6f460d=_0xfb6c80,_0xe03bd5=_0x50b430[_0x6f460d(0x11a)][0x0];return{..._0x2bf0d7,'id':_0xe03bd5[_0x6f460d(0x123)],'resolved':_0x50b430[_0x6f460d(0x141)]===0x1,'dT':f(_0xe03bd5['createTimestamp']),'personId':_0xe03bd5[_0x6f460d(0x112)],'threadId':_0xe03bd5[_0x6f460d(0x12f)]};}function _0x9813(_0x24af07,_0x3024b6){const _0x179347=_0x1793();return _0x9813=function(_0x98133f,_0x33f27b){_0x98133f=_0x98133f-0xf1;let _0x233137=_0x179347[_0x98133f];return _0x233137;},_0x9813(_0x24af07,_0x3024b6);}function G(_0x4c7efd,_0x23cd74,_0x46326d){const _0x384b3c=_0xfb6c80;var _0x184fe,_0x751c94;if(((_0x751c94=(_0x184fe=_0x4c7efd==null?void 0x0:_0x4c7efd['replies'])==null?void 0x0:_0x184fe[_0x384b3c(0xf6)])!=null?_0x751c94:0x0)>0x0){const _0x258a67=(_0x59aa16,_0x5a1930)=>({'id':_0x59aa16[_0x384b3c(0x123)],'threadId':_0x59aa16[_0x384b3c(0x12f)],'dT':f(_0x59aa16[_0x384b3c(0x160)]),'personId':_0x59aa16[_0x384b3c(0x112)],'resolved':_0x4c7efd[_0x384b3c(0x141)]===I[_0x384b3c(0x105)],'unitId':_0x23cd74,'subUnitId':_0x46326d,'text':JSON[_0x384b3c(0x150)](_0x59aa16[_0x384b3c(0xf8)]),'parentId':_0x5a1930}),_0x4563e1=_0x258a67(_0x4c7efd[_0x384b3c(0x11a)][0x0]);return{..._0x4563e1,'children':_0x4c7efd[_0x384b3c(0x11a)][_0x384b3c(0x146)](0x1)[_0x384b3c(0x157)](_0x517a4a=>_0x258a67(_0x517a4a,_0x4563e1['id']))};}return null;}let g=class{constructor(_0x7cd318,_0x5b18e4,_0x4022c3,_0x3e98b1){const _0x3da861=_0xfb6c80;this['_httpService']=_0x7cd318,this[_0x3da861(0x173)]=_0x5b18e4,this[_0x3da861(0x142)]=_0x4022c3,this['_injector']=_0x3e98b1;}async[_0xfb6c80(0x143)](_0x21b1e8){const _0x37040b=_0xfb6c80;var _0x544249,_0x46ffec;const {parentId:_0x100e43,unitId:_0x1ab66d,text:_0x46d8b3,threadId:_0x1e49bd}=_0x21b1e8,_0x11494b=(_0x46ffec=(_0x544249=_0x46d8b3[_0x37040b(0x13c)])==null?void 0x0:_0x544249['filter'](_0x6c43c7=>_0x6c43c7['rangeType']===c[_0x37040b(0x175)][_0x37040b(0x13b)])[_0x37040b(0x157)](_0x1b6580=>_0x1b6580['rangeId']))!=null?_0x46ffec:[],_0x2f5901=JSON[_0x37040b(0x162)](_0x46d8b3),_0x518ff1=(await this['_sessionService'][_0x37040b(0x16c)](_0x1ab66d))[_0x37040b(0x100)]();if(_0x100e43){const _0xe8284c={'memberId':_0x518ff1,'unitId':_0x1ab66d,'content':_0x2f5901,'mention':_0x11494b,'threadId':_0x1e49bd},_0x57fc23=(await this[_0x37040b(0x10e)]['post']('/universer-api/comment/unit/'+_0x1ab66d+_0x37040b(0x106),{'body':_0xe8284c}))[_0x37040b(0x108)][_0x37040b(0x119)];return{..._0x21b1e8,'id':_0x57fc23[_0x37040b(0x123)],'dT':c[_0x37040b(0x163)](+_0x57fc23[_0x37040b(0x160)])['format'](_0x37040b(0x104)),'personId':_0x57fc23[_0x37040b(0x112)]};}else{const _0x37c890={'memberId':_0x518ff1,'unitId':_0x1ab66d,'content':_0x2f5901,'mention':_0x11494b},_0x1e18ca=await this[_0x37040b(0x10e)][_0x37040b(0x137)](_0x37040b(0x127)+_0x1ab66d+'/add',{'body':_0x37c890});return Y(_0x1e18ca[_0x37040b(0x108)][_0x37040b(0x114)],_0x21b1e8);}}async[_0xfb6c80(0x16a)](_0x3e94ee){const _0x5136ec=_0xfb6c80;var _0x3b707f,_0x371566;const {text:_0x4ce123,unitId:_0x56aa8d}=_0x3e94ee,_0x1886c0=(_0x371566=(_0x3b707f=_0x4ce123[_0x5136ec(0x13c)])==null?void 0x0:_0x3b707f[_0x5136ec(0x102)](_0x44c342=>_0x44c342[_0x5136ec(0x111)]===c[_0x5136ec(0x175)]['COMMENT'])[_0x5136ec(0x157)](_0x4093d1=>_0x4093d1['rangeId']))!=null?_0x371566:[],_0x56f638=JSON[_0x5136ec(0x162)](_0x4ce123),_0x4e8666=_0x3e94ee[_0x5136ec(0x12f)],_0x168566=_0x3e94ee['id'],_0x582c1f={'memberId':(await this[_0x5136ec(0x142)][_0x5136ec(0x16c)](_0x56aa8d))['getMemberID'](),'unitId':_0x56aa8d,'threadId':_0x4e8666,'mention':_0x1886c0,'content':_0x56f638,'replyId':_0x168566},_0x355319=await this[_0x5136ec(0x10e)]['post'](_0x5136ec(0x127)+_0x56aa8d+_0x5136ec(0x110),{'body':_0x582c1f});return!_0x355319[_0x5136ec(0x108)][_0x5136ec(0xff)]||_0x355319[_0x5136ec(0x108)][_0x5136ec(0xff)][_0x5136ec(0x118)]===0x1;}async['resolveComment'](_0x304cf8){const _0x15a12d=_0xfb6c80,{unitId:_0x371d1c}=_0x304cf8,_0x1ab120=_0x304cf8['threadId'],_0x33b8b5={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x371d1c,'threadId':_0x1ab120,'solved':_0x304cf8[_0x15a12d(0xf4)]?I[_0x15a12d(0x105)]:I['OpenOrReOpen']},_0x93f3c6=await this['_httpService'][_0x15a12d(0x137)](_0x15a12d(0x127)+_0x371d1c+_0x15a12d(0x15a),{'body':_0x33b8b5});return!_0x93f3c6[_0x15a12d(0x108)][_0x15a12d(0xff)]||_0x93f3c6[_0x15a12d(0x108)]['error'][_0x15a12d(0x118)]===0x1;}async[_0xfb6c80(0x13f)](_0x2a53e0,_0x101c4f,_0x466a75,_0x2dbf7c){const _0xe8f7b6=_0xfb6c80,_0x34268b={'memberId':(await this['_sessionService'][_0xe8f7b6(0x16c)](_0x2a53e0))[_0xe8f7b6(0x100)](),'threadId':_0x466a75,'replyId':_0x2dbf7c,'unitId':_0x2a53e0},_0x557a3b=await this[_0xe8f7b6(0x10e)][_0xe8f7b6(0x137)](_0xe8f7b6(0x127)+_0x2a53e0+_0xe8f7b6(0x13e),{'body':_0x34268b});return!_0x557a3b[_0xe8f7b6(0x108)][_0xe8f7b6(0xff)]||_0x557a3b['body']['error'][_0xe8f7b6(0x118)]===0x1;}async[_0xfb6c80(0x15d)](_0x290d19,_0x51d66b,_0x299cab){const _0x17fdf5=_0xfb6c80,_0x4e8323={'unitId':_0x290d19,'threadId':_0x299cab},_0x52e940=await this['_httpService'][_0x17fdf5(0x137)](_0x17fdf5(0x127)+_0x290d19+_0x17fdf5(0x15e),{'body':_0x4e8323}),_0x4290eb=_0x299cab['map'](_0x593bd3=>G(_0x52e940[_0x17fdf5(0x108)][_0x17fdf5(0x170)][_0x593bd3],_0x290d19,_0x51d66b))[_0x17fdf5(0x102)](Boolean);return Object[_0x17fdf5(0x165)](_0x52e940['body'][_0x17fdf5(0x12d)])[_0x17fdf5(0x16e)](_0x3bc0b6=>{const _0x3e8f0c=_0x17fdf5;this[_0x3e8f0c(0x173)][_0x3e8f0c(0x148)](_0x3bc0b6);}),_0x4290eb;}[_0xfb6c80(0x133)](_0x22f65d){const _0x361802=_0xfb6c80;return{'id':_0x22f65d['id'],'threadId':_0x22f65d[_0x361802(0x12f)],'ref':_0x22f65d[_0x361802(0x103)]};}};function _0x1793(){const _0x38905a=['users','21UuaKHJ','threadId','payload','@univerjs-pro/license','user','saveCommentToSnapshot','dataSource','bufferTime','merge','post','symbol','unitId','OpenOrReOpen','COMMENT','customRanges','parentId','/delete','deleteComment','40fkIZuw','solved','_sessionService','addComment','Solve','type','slice','ThreadCommentModel','addUser','thread-comment-data-source.config','personId','UNRECOGNIZED','IThreadCommentDataSourceService','2300724CFEDLi','_config','60qiAXsZ','parse','_threadCommentDataSource','getOwnPropertyDescriptor','userID','@univerjs/core','_commentService','getUnit','map','/universer-api/user/list','149315YdvTKN','/solved','Plugin','add','listComments','/list','syncUpdateMutationToColla','createTimestamp','324203vWYyKm','stringify','dayjs','CommentService','values','HTTPService','UniverThreadCommentDataSourcePlugin','pluginName','Injector','updateComment','onReady','requireSession','_configService','forEach','getUser','comments','@univerjs/network','Inject','_userService','CollaborationSessionService','CustomRangeType','Reply','420586WatWiC','_threadCommentModel','resolved','UniverThreadCommentUIPlugin','length','UniverInstanceType','content','10545832eHqrTh','UniverLicensePlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentDataSourceService','DependentOn','Module','error','getMemberID','_injector','filter','ref','YYYY/MM/DD\x20HH:mm','Solved','/reply','delete','body','Edit','find','@univerjs-pro/collaboration-client','Unknown','commentUpdate$','_httpService','UserManagerService','/edit','rangeType','userId','toStringTag','comment','36sDgXwj','Delete','@univerjs/thread-comment-ui','code','reply','replies','_initDataSource','root','format','disposeWithMe','rxjs','Disposable','2409528DlsOaD','2882632kgxfSi','replyId','_init','defineProperty','get','/universer-api/comment/unit/','getComment','3hEPJlS','UniverCollaborationClientPlugin','subscribe','setConfig'];_0x1793=function(){return _0x38905a;};return _0x1793();}g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0xfb6c80(0x172)](c[_0xfb6c80(0x10f)])),_(0x2,c[_0xfb6c80(0x172)](b[_0xfb6c80(0x174)])),_(0x3,c['Inject'](c[_0xfb6c80(0x169)]))],g);var H=Object[_0xfb6c80(0x152)],J=(_0x34d63b,_0x9118c0,_0x28efdd,_0x26235d)=>{const _0x323047=_0xfb6c80;for(var _0x128fa8=_0x26235d>0x1?void 0x0:_0x26235d?H(_0x9118c0,_0x28efdd):_0x9118c0,_0x3605be=_0x34d63b[_0x323047(0xf6)]-0x1,_0x4d1130;_0x3605be>=0x0;_0x3605be--)(_0x4d1130=_0x34d63b[_0x3605be])&&(_0x128fa8=_0x4d1130(_0x128fa8)||_0x128fa8);return _0x128fa8;},y=(_0x27a7e4,_0x3a4f3b)=>(_0xe359c5,_0x4bce24)=>_0x3a4f3b(_0xe359c5,_0x4bce24,_0x27a7e4);let C=class extends c[_0xfb6c80(0x120)]{constructor(_0x1b77ee,_0x384404){super(),this['_threadCommentDataSourceService']=_0x1b77ee,this['_threadCommentDataSource']=_0x384404,this['_initDataSource']();}[_0xfb6c80(0x11b)](){const _0xde0492=_0xfb6c80;this['_threadCommentDataSourceService'][_0xde0492(0x134)]=this[_0xde0492(0x151)],this[_0xde0492(0xfc)][_0xde0492(0x15f)]=!0x1;}};C=J([y(0x0,M[_0xfb6c80(0x14c)]),y(0x1,c['Inject'](g))],C);var F=Object[_0xfb6c80(0x125)],L=Object[_0xfb6c80(0x152)],Z=(_0x836e21,_0x13a052,_0x801066)=>_0x13a052 in _0x836e21?F(_0x836e21,_0x13a052,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x801066}):_0x836e21[_0x13a052]=_0x801066,W=(_0x13c769,_0x562a35,_0x31dbb2,_0x498e4c)=>{const _0x24df10=_0xfb6c80;for(var _0x20f266=_0x498e4c>0x1?void 0x0:_0x498e4c?L(_0x562a35,_0x31dbb2):_0x562a35,_0x4808bf=_0x13c769[_0x24df10(0xf6)]-0x1,_0x18685d;_0x4808bf>=0x0;_0x4808bf--)(_0x18685d=_0x13c769[_0x4808bf])&&(_0x20f266=_0x18685d(_0x20f266)||_0x20f266);return _0x20f266;},O=(_0x53f729,_0x4a6f35)=>(_0xd7d87a,_0x3cb7ea)=>_0x4a6f35(_0xd7d87a,_0x3cb7ea,_0x53f729),N=(_0x49bec2,_0x571fc9,_0x19269c)=>Z(_0x49bec2,typeof _0x571fc9!=_0xfb6c80(0x138)?_0x571fc9+'':_0x571fc9,_0x19269c);exports[_0xfb6c80(0x167)]=class extends c[_0xfb6c80(0x15b)]{constructor(_0x5b337e=D,_0x251b97,_0x28ff9b){const _0x587a71=_0xfb6c80;super(),this[_0x587a71(0x14e)]=_0x5b337e,this[_0x587a71(0x101)]=_0x251b97,this[_0x587a71(0x16d)]=_0x28ff9b;const {..._0x4ced59}=c[_0x587a71(0x136)]({},D,this[_0x587a71(0x14e)]);this[_0x587a71(0x16d)][_0x587a71(0x12c)](q,_0x4ced59);}['onStarting'](){const _0x207d0d=_0xfb6c80;[[g],[C],[p]][_0x207d0d(0x16e)](_0x1c76a2=>{const _0x28ea50=_0x207d0d;this['_injector'][_0x28ea50(0x15c)](_0x1c76a2);});}[_0xfb6c80(0x16b)](){const _0x2754ec=_0xfb6c80;this[_0x2754ec(0x101)][_0x2754ec(0x126)](C),this['_injector'][_0x2754ec(0x126)](p);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0xfb6c80(0x168),U),N(exports['UniverThreadCommentDataSourcePlugin'],'type',c[_0xfb6c80(0xf7)]['UNIVER_UNKNOWN']),exports[_0xfb6c80(0x167)]=W([c[_0xfb6c80(0xfd)](j[_0xfb6c80(0xf5)],b[_0xfb6c80(0x12a)],T[_0xfb6c80(0xfa)]),O(0x1,c[_0xfb6c80(0x172)](c[_0xfb6c80(0x169)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x3c1c0b=_0x3853;(function(_0x1c385c,_0x2abe09){const _0x3c64cc=_0x3853,_0xe56bfa=_0x1c385c();while(!![]){try{const _0x108232=-parseInt(_0x3c64cc(0x152))/0x1+-parseInt(_0x3c64cc(0x133))/0x2*(-parseInt(_0x3c64cc(0x136))/0x3)+-parseInt(_0x3c64cc(0x14a))/0x4+parseInt(_0x3c64cc(0x176))/0x5+parseInt(_0x3c64cc(0x168))/0x6*(-parseInt(_0x3c64cc(0x12a))/0x7)+parseInt(_0x3c64cc(0x11e))/0x8+-parseInt(_0x3c64cc(0x181))/0x9*(parseInt(_0x3c64cc(0x16b))/0xa);if(_0x108232===_0x2abe09)break;else _0xe56bfa['push'](_0xe56bfa['shift']());}catch(_0x4176ec){_0xe56bfa['push'](_0xe56bfa['shift']());}}}(_0x35b9,0x54d4a));Object[_0x3c1c0b(0x175)](exports,Symbol[_0x3c1c0b(0x167)],{'value':_0x3c1c0b(0x113)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x3c1c0b(0x12d)),c=require(_0x3c1c0b(0x135)),j=require(_0x3c1c0b(0x156)),M=require('@univerjs/thread-comment'),w=require(_0x3c1c0b(0x157)),P=require(_0x3c1c0b(0x144)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x112cbb=>(_0x112cbb[_0x112cbb['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x112cbb[_0x112cbb[_0x3c1c0b(0x158)]=0x1]=_0x3c1c0b(0x158),_0x112cbb[_0x112cbb['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x112cbb))(I||{}),v=(_0x4db106=>(_0x4db106[_0x4db106['Unknown']=0x0]=_0x3c1c0b(0x11f),_0x4db106[_0x4db106[_0x3c1c0b(0x10b)]=0x1]=_0x3c1c0b(0x10b),_0x4db106[_0x4db106[_0x3c1c0b(0x12b)]=0x2]='Reply',_0x4db106[_0x4db106[_0x3c1c0b(0x12f)]=0x3]=_0x3c1c0b(0x12f),_0x4db106[_0x4db106[_0x3c1c0b(0x10c)]=0x4]=_0x3c1c0b(0x10c),_0x4db106[_0x4db106[_0x3c1c0b(0x149)]=0x5]=_0x3c1c0b(0x149),_0x4db106[_0x4db106[_0x3c1c0b(0x132)]=-0x1]=_0x3c1c0b(0x132),_0x4db106))(v||{});const f=_0x3d6dbd=>c[_0x3c1c0b(0x17c)](new Date(+_0x3d6dbd))[_0x3c1c0b(0x128)](_0x3c1c0b(0x145)),R=async(_0x425db9,_0x2e5e69)=>{const _0x23b318=_0x3c1c0b,_0x1d4634=_0x425db9['get'](c[_0x23b318(0x122)]),_0x3b5d4b=_0x425db9[_0x23b318(0x160)](P[_0x23b318(0x159)]);_0x2e5e69[_0x23b318(0x17e)](_0x2e2853=>{const _0x2f7c04=_0x23b318;_0x1d4634[_0x2f7c04(0x174)](_0x2e2853)&&_0x2e5e69[_0x2f7c04(0x169)](_0x2e2853);}),_0x2e5e69[_0x23b318(0x13e)]&&(await _0x3b5d4b[_0x23b318(0x160)](_0x23b318(0x125),{'params':{'userIDs':[..._0x2e5e69]}}))[_0x23b318(0x16e)][_0x23b318(0x17d)]['forEach'](_0x1cadfa=>{_0x1cadfa&&_0x1d4634['addUser'](_0x1cadfa);});};var $=Object[_0x3c1c0b(0x126)],E=(_0x1e625f,_0x248ac1,_0x516a08,_0x1a6763)=>{const _0xe15b3f=_0x3c1c0b;for(var _0x280658=_0x1a6763>0x1?void 0x0:_0x1a6763?$(_0x248ac1,_0x516a08):_0x248ac1,_0x291f7c=_0x1e625f[_0xe15b3f(0x182)]-0x1,_0x726f37;_0x291f7c>=0x0;_0x291f7c--)(_0x726f37=_0x1e625f[_0x291f7c])&&(_0x280658=_0x726f37(_0x280658)||_0x280658);return _0x280658;},S=(_0x10a0a8,_0x21f565)=>(_0x48102c,_0x42fc55)=>_0x21f565(_0x48102c,_0x42fc55,_0x10a0a8);let p=class extends c['Disposable']{constructor(_0x406cbe,_0x479d93,_0xe81488,_0xb7041d){const _0x2ae140=_0x3c1c0b;super(),this[_0x2ae140(0x15e)]=_0x406cbe,this[_0x2ae140(0x12e)]=_0x479d93,this[_0x2ae140(0x15c)]=_0xe81488,this['_injector']=_0xb7041d,this[_0x2ae140(0x11b)](),this[_0x2ae140(0x112)]();}[_0x3c1c0b(0x112)](){const _0x739868=_0x3c1c0b;this[_0x739868(0x10d)](this[_0x739868(0x12e)]['commentUpdate$'][_0x739868(0x114)](w[_0x739868(0x11a)](0x10))[_0x739868(0x116)](_0x4a1ff0=>{const _0x54b5c3=_0x739868,_0x4b32d2=new Set();_0x4a1ff0['forEach'](_0x366e21=>{const _0x44b48b=_0x3853;switch(_0x366e21[_0x44b48b(0x15a)]){case _0x44b48b(0x179):{const _0x4d5048=_0x366e21['payload'][_0x44b48b(0x166)];_0x4b32d2[_0x44b48b(0x179)](_0x4d5048);break;}}}),R(this[_0x54b5c3(0x121)],_0x4b32d2);}));}['_init'](){const _0x1d7df0=_0x3c1c0b;this[_0x1d7df0(0x10d)](this[_0x1d7df0(0x15e)][_0x1d7df0(0x109)]['subscribe'](async _0x33115c=>{const _0x59c5f7=_0x1d7df0;var _0x4cdd20,_0x10d9e1,_0x103930,_0x22c095;const _0x5b5ccf=(_0x4cdd20=this[_0x59c5f7(0x12e)][_0x59c5f7(0x142)](_0x33115c['unitId'])[_0x59c5f7(0x146)](_0x31d887=>_0x31d887[_0x59c5f7(0x180)]===_0x33115c[_0x59c5f7(0x180)]))==null?void 0x0:_0x4cdd20[_0x59c5f7(0x12c)];if(!_0x5b5ccf)return;const {unitId:_0x428fc8,subUnitId:_0x2914a5}=_0x5b5ccf;switch(_0x33115c[_0x59c5f7(0x118)]&&this[_0x59c5f7(0x15c)][_0x59c5f7(0x139)](_0x33115c[_0x59c5f7(0x118)]),_0x33115c['type']){case v[_0x59c5f7(0x10b)]:break;case v[_0x59c5f7(0x12b)]:{this['_threadCommentModel'][_0x59c5f7(0x16f)](_0x428fc8,_0x2914a5,{'unitId':_0x428fc8,'subUnitId':_0x2914a5,'ref':'','id':_0x33115c['replyId'],'dT':f(+_0x33115c['createTimestamp']),'threadId':_0x33115c[_0x59c5f7(0x180)],'personId':(_0x103930=(_0x10d9e1=_0x33115c[_0x59c5f7(0x118)])==null?void 0x0:_0x10d9e1[_0x59c5f7(0x13f)])!=null?_0x103930:_0x33115c[_0x59c5f7(0x163)],'text':JSON[_0x59c5f7(0x15b)](_0x33115c['content']),'parentId':_0x5b5ccf['id']});break;}case v[_0x59c5f7(0x10c)]:{const _0x4e5d1b=this['_threadCommentModel'][_0x59c5f7(0x137)](_0x428fc8,_0x2914a5,_0x33115c[_0x59c5f7(0x131)]);_0x4e5d1b&&_0x4e5d1b[_0x59c5f7(0x13d)]&&this[_0x59c5f7(0x12e)][_0x59c5f7(0x13b)](_0x428fc8,_0x2914a5,_0x33115c[_0x59c5f7(0x131)]);break;}case v[_0x59c5f7(0x12f)]:{this['_threadCommentModel']['updateComment'](_0x428fc8,_0x2914a5,{'commentId':_0x33115c[_0x59c5f7(0x131)],'text':JSON[_0x59c5f7(0x15b)](_0x33115c[_0x59c5f7(0x170)])});break;}case v[_0x59c5f7(0x149)]:{const _0x1f05ba=(_0x22c095=this[_0x59c5f7(0x12e)][_0x59c5f7(0x142)](_0x33115c[_0x59c5f7(0x107)])['find'](_0x4260c1=>_0x4260c1[_0x59c5f7(0x180)]===_0x33115c[_0x59c5f7(0x180)]))==null?void 0x0:_0x22c095[_0x59c5f7(0x12c)];_0x1f05ba&&this[_0x59c5f7(0x12e)][_0x59c5f7(0x151)](_0x428fc8,_0x2914a5,_0x1f05ba['id'],_0x33115c[_0x59c5f7(0x15d)]===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x3c1c0b(0x143)](b['CommentService'])),S(0x1,c[_0x3c1c0b(0x143)](M[_0x3c1c0b(0x183)])),S(0x2,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x122)])),S(0x3,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x138)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3c1c0b(0x126)],x=(_0x21977a,_0x532695,_0x4a7c5b,_0x4a9c58)=>{const _0x1a4f8b=_0x3c1c0b;for(var _0x32fd9d=_0x4a9c58>0x1?void 0x0:_0x4a9c58?A(_0x532695,_0x4a7c5b):_0x532695,_0x13d365=_0x21977a[_0x1a4f8b(0x182)]-0x1,_0x3488b6;_0x13d365>=0x0;_0x13d365--)(_0x3488b6=_0x21977a[_0x13d365])&&(_0x32fd9d=_0x3488b6(_0x32fd9d)||_0x32fd9d);return _0x32fd9d;},_=(_0x3b9deb,_0x454ac8)=>(_0x30accf,_0x5d63e8)=>_0x454ac8(_0x30accf,_0x5d63e8,_0x3b9deb);function Y(_0x48b9a5,_0xc65269){const _0x2254ce=_0x3c1c0b,_0x1bc505=_0x48b9a5[_0x2254ce(0x14d)][0x0];return{..._0xc65269,'id':_0x1bc505[_0x2254ce(0x131)],'resolved':_0x48b9a5[_0x2254ce(0x15d)]===0x1,'dT':f(_0x1bc505[_0x2254ce(0x148)]),'personId':_0x1bc505[_0x2254ce(0x163)],'threadId':_0x1bc505[_0x2254ce(0x180)]};}function G(_0x287fb5,_0x24bdd8,_0x3bd5cc){const _0x5656c2=_0x3c1c0b;var _0x5dc4cb,_0x1f1c3c;if(((_0x1f1c3c=(_0x5dc4cb=_0x287fb5==null?void 0x0:_0x287fb5['replies'])==null?void 0x0:_0x5dc4cb[_0x5656c2(0x182)])!=null?_0x1f1c3c:0x0)>0x0){const _0x519296=(_0x3abadb,_0x185e72)=>({'id':_0x3abadb[_0x5656c2(0x131)],'threadId':_0x3abadb['threadId'],'dT':f(_0x3abadb[_0x5656c2(0x148)]),'personId':_0x3abadb[_0x5656c2(0x163)],'resolved':_0x287fb5[_0x5656c2(0x15d)]===I[_0x5656c2(0x158)],'unitId':_0x24bdd8,'subUnitId':_0x3bd5cc,'text':JSON['parse'](_0x3abadb[_0x5656c2(0x170)]),'parentId':_0x185e72}),_0x59ac3b=_0x519296(_0x287fb5[_0x5656c2(0x14d)][0x0]);return{..._0x59ac3b,'children':_0x287fb5[_0x5656c2(0x14d)][_0x5656c2(0x17b)](0x1)[_0x5656c2(0x129)](_0x2d2001=>_0x519296(_0x2d2001,_0x59ac3b['id']))};}return null;}function _0x3853(_0x372652,_0x2a9d62){const _0x35b979=_0x35b9();return _0x3853=function(_0x385366,_0x24875b){_0x385366=_0x385366-0x106;let _0x11c5c7=_0x35b979[_0x385366];return _0x11c5c7;},_0x3853(_0x372652,_0x2a9d62);}let g=class{constructor(_0x284c23,_0x4a1309,_0x175d3e,_0x4215ad){const _0x3c477f=_0x3c1c0b;this[_0x3c477f(0x110)]=_0x284c23,this[_0x3c477f(0x15c)]=_0x4a1309,this[_0x3c477f(0x140)]=_0x175d3e,this[_0x3c477f(0x121)]=_0x4215ad;}async['addComment'](_0x5f1a3d){const _0x4595a8=_0x3c1c0b;var _0x1df8c4,_0x309517;const {parentId:_0x3f70e5,unitId:_0x30333a,text:_0x5902de,threadId:_0x28e4e1}=_0x5f1a3d,_0x2f8142=(_0x309517=(_0x1df8c4=_0x5902de[_0x4595a8(0x153)])==null?void 0x0:_0x1df8c4[_0x4595a8(0x10a)](_0x14cbef=>_0x14cbef[_0x4595a8(0x123)]===c['CustomRangeType'][_0x4595a8(0x111)])[_0x4595a8(0x129)](_0x3c6a50=>_0x3c6a50['rangeId']))!=null?_0x309517:[],_0x29e3ba=JSON[_0x4595a8(0x11c)](_0x5902de),_0x5251f0=(await this['_sessionService'][_0x4595a8(0x16d)](_0x30333a))[_0x4595a8(0x14e)]();if(_0x3f70e5){const _0x500cde={'memberId':_0x5251f0,'unitId':_0x30333a,'content':_0x29e3ba,'mention':_0x2f8142,'threadId':_0x28e4e1},_0x5dc134=(await this['_httpService'][_0x4595a8(0x171)](_0x4595a8(0x117)+_0x30333a+_0x4595a8(0x17f),{'body':_0x500cde}))[_0x4595a8(0x16e)][_0x4595a8(0x13c)];return{..._0x5f1a3d,'id':_0x5dc134[_0x4595a8(0x131)],'dT':c[_0x4595a8(0x17c)](+_0x5dc134[_0x4595a8(0x148)])[_0x4595a8(0x128)](_0x4595a8(0x145)),'personId':_0x5dc134[_0x4595a8(0x163)]};}else{const _0x2e96dd={'memberId':_0x5251f0,'unitId':_0x30333a,'content':_0x29e3ba,'mention':_0x2f8142},_0x3d878d=await this[_0x4595a8(0x110)][_0x4595a8(0x171)](_0x4595a8(0x117)+_0x30333a+_0x4595a8(0x11d),{'body':_0x2e96dd});return Y(_0x3d878d[_0x4595a8(0x16e)][_0x4595a8(0x16a)],_0x5f1a3d);}}async[_0x3c1c0b(0x130)](_0x507f20){const _0xb16cd5=_0x3c1c0b;var _0x1a2184,_0x3dabea;const {text:_0x35ed2c,unitId:_0x320e7a}=_0x507f20,_0x166275=(_0x3dabea=(_0x1a2184=_0x35ed2c[_0xb16cd5(0x153)])==null?void 0x0:_0x1a2184['filter'](_0x26a441=>_0x26a441[_0xb16cd5(0x123)]===c[_0xb16cd5(0x119)]['COMMENT'])['map'](_0x4af9be=>_0x4af9be['rangeId']))!=null?_0x3dabea:[],_0x14e044=JSON[_0xb16cd5(0x11c)](_0x35ed2c),_0x4baf30=_0x507f20[_0xb16cd5(0x180)],_0x54d8ba=_0x507f20['id'],_0x846a5e={'memberId':(await this[_0xb16cd5(0x140)][_0xb16cd5(0x16d)](_0x320e7a))[_0xb16cd5(0x14e)](),'unitId':_0x320e7a,'threadId':_0x4baf30,'mention':_0x166275,'content':_0x14e044,'replyId':_0x54d8ba},_0x529680=await this[_0xb16cd5(0x110)][_0xb16cd5(0x171)]('/universer-api/comment/unit/'+_0x320e7a+_0xb16cd5(0x154),{'body':_0x846a5e});return!_0x529680[_0xb16cd5(0x16e)][_0xb16cd5(0x164)]||_0x529680[_0xb16cd5(0x16e)][_0xb16cd5(0x164)][_0xb16cd5(0x134)]===0x1;}async['resolveComment'](_0x361866){const _0x5d962f=_0x3c1c0b,{unitId:_0x460a54}=_0x361866,_0x3c0a0d=_0x361866[_0x5d962f(0x180)],_0x253627={'memberId':this[_0x5d962f(0x15c)][_0x5d962f(0x14f)]()['userID'],'unitId':_0x460a54,'threadId':_0x3c0a0d,'solved':_0x361866['resolved']?I[_0x5d962f(0x158)]:I[_0x5d962f(0x16c)]},_0x1ad817=await this[_0x5d962f(0x110)]['post']('/universer-api/comment/unit/'+_0x460a54+_0x5d962f(0x184),{'body':_0x253627});return!_0x1ad817[_0x5d962f(0x16e)][_0x5d962f(0x164)]||_0x1ad817['body'][_0x5d962f(0x164)][_0x5d962f(0x134)]===0x1;}async[_0x3c1c0b(0x13b)](_0x417b95,_0x557579,_0x489254,_0x4df585){const _0xec9c52=_0x3c1c0b,_0x38fb9f={'memberId':(await this[_0xec9c52(0x140)]['requireSession'](_0x417b95))[_0xec9c52(0x14e)](),'threadId':_0x489254,'replyId':_0x4df585,'unitId':_0x417b95},_0x1573d4=await this[_0xec9c52(0x110)][_0xec9c52(0x171)](_0xec9c52(0x117)+_0x417b95+_0xec9c52(0x165),{'body':_0x38fb9f});return!_0x1573d4['body']['error']||_0x1573d4[_0xec9c52(0x16e)][_0xec9c52(0x164)][_0xec9c52(0x134)]===0x1;}async['listComments'](_0x12dce1,_0x5cb7ee,_0x41e634){const _0x22fa62=_0x3c1c0b,_0x225906={'unitId':_0x12dce1,'threadId':_0x41e634},_0x753232=await this[_0x22fa62(0x110)][_0x22fa62(0x171)](_0x22fa62(0x117)+_0x12dce1+'/list',{'body':_0x225906}),_0xe780c9=_0x41e634[_0x22fa62(0x129)](_0x35145c=>G(_0x753232[_0x22fa62(0x16e)][_0x22fa62(0x147)][_0x35145c],_0x12dce1,_0x5cb7ee))[_0x22fa62(0x10a)](Boolean);return Object[_0x22fa62(0x178)](_0x753232[_0x22fa62(0x16e)]['users'])[_0x22fa62(0x17e)](_0x38a398=>{const _0x8a0251=_0x22fa62;this[_0x8a0251(0x15c)]['addUser'](_0x38a398);}),_0xe780c9;}[_0x3c1c0b(0x161)](_0x5a82ca){const _0x4a5906=_0x3c1c0b;return{'id':_0x5a82ca['id'],'threadId':_0x5a82ca['threadId'],'ref':_0x5a82ca[_0x4a5906(0x150)]};}};g=x([_(0x0,c[_0x3c1c0b(0x143)](P[_0x3c1c0b(0x159)])),_(0x1,c[_0x3c1c0b(0x143)](c[_0x3c1c0b(0x122)])),_(0x2,c[_0x3c1c0b(0x143)](b[_0x3c1c0b(0x10f)])),_(0x3,c[_0x3c1c0b(0x143)](c['Injector']))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x521a71,_0x74da72,_0x4b5abf,_0x12e1e8)=>{const _0x235af0=_0x3c1c0b;for(var _0xf5e6f=_0x12e1e8>0x1?void 0x0:_0x12e1e8?H(_0x74da72,_0x4b5abf):_0x74da72,_0x29feea=_0x521a71[_0x235af0(0x182)]-0x1,_0x29553d;_0x29feea>=0x0;_0x29feea--)(_0x29553d=_0x521a71[_0x29feea])&&(_0xf5e6f=_0x29553d(_0xf5e6f)||_0xf5e6f);return _0xf5e6f;},y=(_0x3b19bd,_0x14bae8)=>(_0x2ee740,_0x35b8c8)=>_0x14bae8(_0x2ee740,_0x35b8c8,_0x3b19bd);let C=class extends c[_0x3c1c0b(0x14c)]{constructor(_0x50d258,_0x26ab8c){const _0x26cd84=_0x3c1c0b;super(),this[_0x26cd84(0x10e)]=_0x50d258,this[_0x26cd84(0x177)]=_0x26ab8c,this['_initDataSource']();}[_0x3c1c0b(0x115)](){const _0x4a4ee5=_0x3c1c0b;this[_0x4a4ee5(0x10e)][_0x4a4ee5(0x17a)]=this[_0x4a4ee5(0x177)],this['_threadCommentDataSourceService'][_0x4a4ee5(0x14b)]=!0x1;}};C=J([y(0x0,M[_0x3c1c0b(0x186)]),y(0x1,c[_0x3c1c0b(0x143)](g))],C);var F=Object[_0x3c1c0b(0x175)],L=Object[_0x3c1c0b(0x126)],Z=(_0x4613e4,_0x2fe8eb,_0x444d16)=>_0x2fe8eb in _0x4613e4?F(_0x4613e4,_0x2fe8eb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x444d16}):_0x4613e4[_0x2fe8eb]=_0x444d16,W=(_0x25f354,_0xf95aba,_0x3d952b,_0x2dbfc1)=>{const _0x5c25b3=_0x3c1c0b;for(var _0xd358bd=_0x2dbfc1>0x1?void 0x0:_0x2dbfc1?L(_0xf95aba,_0x3d952b):_0xf95aba,_0x44b20c=_0x25f354[_0x5c25b3(0x182)]-0x1,_0x79f05a;_0x44b20c>=0x0;_0x44b20c--)(_0x79f05a=_0x25f354[_0x44b20c])&&(_0xd358bd=_0x79f05a(_0xd358bd)||_0xd358bd);return _0xd358bd;},O=(_0x553026,_0x5c9f3e)=>(_0x27b9d6,_0x131bd4)=>_0x5c9f3e(_0x27b9d6,_0x131bd4,_0x553026),N=(_0x26c779,_0x55bb92,_0x348030)=>Z(_0x26c779,typeof _0x55bb92!=_0x3c1c0b(0x155)?_0x55bb92+'':_0x55bb92,_0x348030);function _0x35b9(){const _0xd84d4e=['subscribe','/universer-api/comment/unit/','user','CustomRangeType','bufferTime','_init','stringify','/add','5299840qPEuBx','Unknown','onReady','_injector','UserManagerService','rangeType','setConfig','/universer-api/user/list','getOwnPropertyDescriptor','_configService','format','map','7ZZkoKu','Reply','root','@univerjs-pro/license','_threadCommentModel','Edit','updateComment','replyId','UNRECOGNIZED','342368feUaSo','code','@univerjs/core','12uevjox','getComment','Injector','addUser','UniverLicensePlugin','deleteComment','reply','parentId','size','userID','_sessionService','UniverThreadCommentDataSourcePlugin','getUnit','Inject','@univerjs/network','YYYY/MM/DD\x20HH:mm','find','comments','createTimestamp','Solve','1228280CTKwmJ','syncUpdateMutationToColla','Disposable','replies','getMemberID','getCurrentUser','ref','resolveComment','515019LONVRh','customRanges','/edit','symbol','@univerjs/thread-comment-ui','rxjs','Solved','HTTPService','type','parse','_userService','solved','_commentService','merge','get','saveCommentToSnapshot','_config','userId','error','/delete','personId','toStringTag','1709358TtzHss','delete','comment','328010uVpjKb','OpenOrReOpen','requireSession','body','addComment','content','post','Plugin','onStarting','getUser','defineProperty','700165zopvJh','_threadCommentDataSource','values','add','dataSource','slice','dayjs','users','forEach','/reply','threadId','9EFyQyF','length','ThreadCommentModel','/solved','IConfigService','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','unitId','DependentOn','commentUpdate$','filter','Add','Delete','disposeWithMe','_threadCommentDataSourceService','CollaborationSessionService','_httpService','COMMENT','_initUserSync','Module','pipe','_initDataSource'];_0x35b9=function(){return _0xd84d4e;};return _0x35b9();}exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x3c1c0b(0x172)]{constructor(_0x234a08=D,_0x53ad79,_0x4511ee){const _0x33096a=_0x3c1c0b;super(),this[_0x33096a(0x162)]=_0x234a08,this[_0x33096a(0x121)]=_0x53ad79,this[_0x33096a(0x127)]=_0x4511ee;const {..._0x247870}=c[_0x33096a(0x15f)]({},D,this['_config']);this[_0x33096a(0x127)][_0x33096a(0x124)](q,_0x247870);}[_0x3c1c0b(0x173)](){const _0x977ebf=_0x3c1c0b;[[g],[C],[p]][_0x977ebf(0x17e)](_0x2b6a83=>{const _0x2af999=_0x977ebf;this['_injector'][_0x2af999(0x179)](_0x2b6a83);});}[_0x3c1c0b(0x120)](){const _0x5849c3=_0x3c1c0b;this['_injector'][_0x5849c3(0x160)](C),this[_0x5849c3(0x121)]['get'](p);}},N(exports[_0x3c1c0b(0x141)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x3c1c0b(0x15a),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x3c1c0b(0x108)](j[_0x3c1c0b(0x106)],b['UniverCollaborationClientPlugin'],T[_0x3c1c0b(0x13a)]),O(0x1,c[_0x3c1c0b(0x143)](c['Injector'])),O(0x2,c[_0x3c1c0b(0x185)])],exports[_0x3c1c0b(0x141)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x111ef8=_0x40ac;(function(_0x2a22c9,_0x1902d4){const _0x57437b=_0x40ac,_0x343186=_0x2a22c9();while(!![]){try{const _0x5ac478=parseInt(_0x57437b(0x211))/0x1+parseInt(_0x57437b(0x1fc))/0x2*(-parseInt(_0x57437b(0x1fb))/0x3)+parseInt(_0x57437b(0x1c5))/0x4+-parseInt(_0x57437b(0x1f5))/0x5+parseInt(_0x57437b(0x1ff))/0x6*(parseInt(_0x57437b(0x228))/0x7)+parseInt(_0x57437b(0x1d1))/0x8+-parseInt(_0x57437b(0x1ee))/0x9*(-parseInt(_0x57437b(0x1f2))/0xa);if(_0x5ac478===_0x1902d4)break;else _0x343186['push'](_0x343186['shift']());}catch(_0x56ce1d){_0x343186['push'](_0x343186['shift']());}}}(_0x4c95,0x4ec8d));import{CommentService as _0x145aa8,CollaborationSessionService as _0x4162e7,UniverCollaborationClientPlugin as _0x1b522a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x474023}from'@univerjs-pro/license';import{dayjs as _0x278344,UserManagerService as _0x3c56b0,Inject as _0x3e7a72,Injector as _0x1656f9,Disposable as _0x134f84,CustomRangeType as _0x100cd8,UniverInstanceType as _0xf3ca23,DependentOn as _0x5df789,IConfigService as _0x2ace32,Plugin as _0x56df68,merge as _0x4b99cf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x26e11c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x14b3ba,IThreadCommentDataSourceService as _0x5da8fd}from'@univerjs/thread-comment';import{bufferTime as _0x5e5bab}from'rxjs';import{HTTPService as _0x1ca467}from'@univerjs/network';const W=_0x111ef8(0x224);var I=(_0x3f96e3=>(_0x3f96e3[_0x3f96e3[_0x111ef8(0x1e7)]=0x0]=_0x111ef8(0x1e7),_0x3f96e3[_0x3f96e3[_0x111ef8(0x20b)]=0x1]='Solved',_0x3f96e3[_0x3f96e3[_0x111ef8(0x1e6)]=-0x1]=_0x111ef8(0x1e6),_0x3f96e3))(I||{}),v=(_0x85f333=>(_0x85f333[_0x85f333['Unknown']=0x0]=_0x111ef8(0x1df),_0x85f333[_0x85f333[_0x111ef8(0x1d9)]=0x1]=_0x111ef8(0x1d9),_0x85f333[_0x85f333[_0x111ef8(0x208)]=0x2]=_0x111ef8(0x208),_0x85f333[_0x85f333[_0x111ef8(0x1f7)]=0x3]='Edit',_0x85f333[_0x85f333[_0x111ef8(0x21d)]=0x4]=_0x111ef8(0x21d),_0x85f333[_0x85f333[_0x111ef8(0x1fd)]=0x5]=_0x111ef8(0x1fd),_0x85f333[_0x85f333[_0x111ef8(0x1e6)]=-0x1]='UNRECOGNIZED',_0x85f333))(v||{});function _0x40ac(_0x39b5b6,_0x1bc55e){const _0x4c95a0=_0x4c95();return _0x40ac=function(_0x40ac06,_0x401b21){_0x40ac06=_0x40ac06-0x1c5;let _0x200125=_0x4c95a0[_0x40ac06];return _0x200125;},_0x40ac(_0x39b5b6,_0x1bc55e);}const D=_0xa06bba=>_0x278344(new Date(+_0xa06bba))[_0x111ef8(0x1fe)](_0x111ef8(0x201)),B=async(_0x560fab,_0x4f5511)=>{const _0x20f461=_0x111ef8,_0x3bcc39=_0x560fab['get'](_0x3c56b0),_0x1722c8=_0x560fab[_0x20f461(0x216)](_0x1ca467);_0x4f5511[_0x20f461(0x223)](_0x112343=>{_0x3bcc39['getUser'](_0x112343)&&_0x4f5511['delete'](_0x112343);}),_0x4f5511[_0x20f461(0x1f3)]&&(await _0x1722c8[_0x20f461(0x216)](_0x20f461(0x1d2),{'params':{'userIDs':[..._0x4f5511]}}))[_0x20f461(0x1da)][_0x20f461(0x206)][_0x20f461(0x223)](_0x328850=>{const _0x58778a=_0x20f461;_0x328850&&_0x3bcc39[_0x58778a(0x1dc)](_0x328850);});};var K=Object[_0x111ef8(0x1cd)],V=(_0x1c240a,_0x322168,_0xe43a1f,_0x191b48)=>{const _0x1f3997=_0x111ef8;for(var _0x33955f=_0x191b48>0x1?void 0x0:_0x191b48?K(_0x322168,_0xe43a1f):_0x322168,_0x5b0b44=_0x1c240a[_0x1f3997(0x1cb)]-0x1,_0x346b49;_0x5b0b44>=0x0;_0x5b0b44--)(_0x346b49=_0x1c240a[_0x5b0b44])&&(_0x33955f=_0x346b49(_0x33955f)||_0x33955f);return _0x33955f;},p=(_0x525a27,_0x23cbd8)=>(_0x6caa3e,_0x1ec775)=>_0x23cbd8(_0x6caa3e,_0x1ec775,_0x525a27);let S=class extends _0x134f84{constructor(_0xb79073,_0xfc41e6,_0x90350e,_0x513b3b){const _0x2ad601=_0x111ef8;super(),this[_0x2ad601(0x20d)]=_0xb79073,this[_0x2ad601(0x1d3)]=_0xfc41e6,this[_0x2ad601(0x20c)]=_0x90350e,this['_injector']=_0x513b3b,this['_init'](),this[_0x2ad601(0x1e9)]();}[_0x111ef8(0x1e9)](){const _0x3b4db1=_0x111ef8;this[_0x3b4db1(0x1f6)](this[_0x3b4db1(0x1d3)][_0x3b4db1(0x1d6)][_0x3b4db1(0x1f9)](_0x5e5bab(0x10))[_0x3b4db1(0x209)](_0x35e6cc=>{const _0x5f1a6f=_0x3b4db1,_0x2b9c90=new Set();_0x35e6cc['forEach'](_0x2de3b6=>{const _0x5e1c20=_0x40ac;switch(_0x2de3b6[_0x5e1c20(0x1f8)]){case'add':{const _0x3aba05=_0x2de3b6['payload'][_0x5e1c20(0x1d7)];_0x2b9c90['add'](_0x3aba05);break;}}}),B(this[_0x5f1a6f(0x1e2)],_0x2b9c90);}));}[_0x111ef8(0x1cf)](){const _0x104f90=_0x111ef8;this['disposeWithMe'](this[_0x104f90(0x20d)][_0x104f90(0x1d6)][_0x104f90(0x209)](async _0x32100d=>{const _0xe1e1d5=_0x104f90;var _0x145f3b,_0x3882dc,_0x9b4bec,_0x3db239;const _0xc6dd3c=(_0x145f3b=this[_0xe1e1d5(0x1d3)]['getUnit'](_0x32100d['unitId'])[_0xe1e1d5(0x1c7)](_0x3c1d8b=>_0x3c1d8b[_0xe1e1d5(0x203)]===_0x32100d['threadId']))==null?void 0x0:_0x145f3b[_0xe1e1d5(0x22a)];if(!_0xc6dd3c)return;const {unitId:_0x5ee67e,subUnitId:_0x27a4ce}=_0xc6dd3c;switch(_0x32100d[_0xe1e1d5(0x21e)]&&this[_0xe1e1d5(0x20c)]['addUser'](_0x32100d[_0xe1e1d5(0x21e)]),_0x32100d[_0xe1e1d5(0x1f8)]){case v[_0xe1e1d5(0x1d9)]:break;case v[_0xe1e1d5(0x208)]:{this[_0xe1e1d5(0x1d3)][_0xe1e1d5(0x1e8)](_0x5ee67e,_0x27a4ce,{'unitId':_0x5ee67e,'subUnitId':_0x27a4ce,'ref':'','id':_0x32100d[_0xe1e1d5(0x1c8)],'dT':D(+_0x32100d[_0xe1e1d5(0x210)]),'threadId':_0x32100d[_0xe1e1d5(0x203)],'personId':(_0x9b4bec=(_0x3882dc=_0x32100d[_0xe1e1d5(0x21e)])==null?void 0x0:_0x3882dc[_0xe1e1d5(0x21c)])!=null?_0x9b4bec:_0x32100d[_0xe1e1d5(0x1e3)],'text':JSON[_0xe1e1d5(0x1fa)](_0x32100d[_0xe1e1d5(0x1cc)]),'parentId':_0xc6dd3c['id']});break;}case v[_0xe1e1d5(0x21d)]:{const _0x4ebfed=this[_0xe1e1d5(0x1d3)]['getComment'](_0x5ee67e,_0x27a4ce,_0x32100d['replyId']);_0x4ebfed&&_0x4ebfed[_0xe1e1d5(0x215)]&&this[_0xe1e1d5(0x1d3)][_0xe1e1d5(0x20e)](_0x5ee67e,_0x27a4ce,_0x32100d[_0xe1e1d5(0x1c8)]);break;}case v[_0xe1e1d5(0x1f7)]:{this[_0xe1e1d5(0x1d3)][_0xe1e1d5(0x1de)](_0x5ee67e,_0x27a4ce,{'commentId':_0x32100d[_0xe1e1d5(0x1c8)],'text':JSON['parse'](_0x32100d[_0xe1e1d5(0x1cc)])});break;}case v[_0xe1e1d5(0x1fd)]:{const _0x31f508=(_0x3db239=this[_0xe1e1d5(0x1d3)]['getUnit'](_0x32100d[_0xe1e1d5(0x219)])[_0xe1e1d5(0x1c7)](_0x3ba9e5=>_0x3ba9e5[_0xe1e1d5(0x203)]===_0x32100d['threadId']))==null?void 0x0:_0x3db239[_0xe1e1d5(0x22a)];_0x31f508&&this[_0xe1e1d5(0x1d3)][_0xe1e1d5(0x1db)](_0x5ee67e,_0x27a4ce,_0x31f508['id'],_0x32100d[_0xe1e1d5(0x214)]===I[_0xe1e1d5(0x20b)]);break;}}}));}};S=V([p(0x0,_0x3e7a72(_0x145aa8)),p(0x1,_0x3e7a72(_0x14b3ba)),p(0x2,_0x3e7a72(_0x3c56b0)),p(0x3,_0x3e7a72(_0x1656f9))],S);const z=_0x111ef8(0x1f0),M={};var k=Object[_0x111ef8(0x1cd)],Q=(_0x3ae82d,_0x5cbebc,_0x394b12,_0x28bcc7)=>{const _0x306dc1=_0x111ef8;for(var _0x5e2b8c=_0x28bcc7>0x1?void 0x0:_0x28bcc7?k(_0x5cbebc,_0x394b12):_0x5cbebc,_0x4966d9=_0x3ae82d[_0x306dc1(0x1cb)]-0x1,_0x599944;_0x4966d9>=0x0;_0x4966d9--)(_0x599944=_0x3ae82d[_0x4966d9])&&(_0x5e2b8c=_0x599944(_0x5e2b8c)||_0x5e2b8c);return _0x5e2b8c;},_=(_0x22e40d,_0x41c94f)=>(_0x5962f8,_0x3464af)=>_0x41c94f(_0x5962f8,_0x3464af,_0x22e40d);function X(_0x212b80,_0x348f7c){const _0x400ae8=_0x111ef8,_0x1c171d=_0x212b80[_0x400ae8(0x220)][0x0];return{..._0x348f7c,'id':_0x1c171d['replyId'],'resolved':_0x212b80[_0x400ae8(0x214)]===0x1,'dT':D(_0x1c171d[_0x400ae8(0x210)]),'personId':_0x1c171d['userId'],'threadId':_0x1c171d['threadId']};}function ee(_0x1f543c,_0x2b7d9b,_0x52b256){const _0x69ca85=_0x111ef8;var _0xd730b5,_0x433066;if(((_0x433066=(_0xd730b5=_0x1f543c==null?void 0x0:_0x1f543c[_0x69ca85(0x220)])==null?void 0x0:_0xd730b5[_0x69ca85(0x1cb)])!=null?_0x433066:0x0)>0x0){const _0x22b288=(_0x356817,_0x4f1983)=>({'id':_0x356817['replyId'],'threadId':_0x356817[_0x69ca85(0x203)],'dT':D(_0x356817[_0x69ca85(0x210)]),'personId':_0x356817[_0x69ca85(0x1e3)],'resolved':_0x1f543c['solved']===I[_0x69ca85(0x20b)],'unitId':_0x2b7d9b,'subUnitId':_0x52b256,'text':JSON[_0x69ca85(0x1fa)](_0x356817[_0x69ca85(0x1cc)]),'parentId':_0x4f1983}),_0x5d94c5=_0x22b288(_0x1f543c[_0x69ca85(0x220)][0x0]);return{..._0x5d94c5,'children':_0x1f543c[_0x69ca85(0x220)][_0x69ca85(0x21a)](0x1)[_0x69ca85(0x1ef)](_0x43799b=>_0x22b288(_0x43799b,_0x5d94c5['id']))};}return null;}let f=class{constructor(_0x2bedd0,_0x52f57c,_0x251596,_0x33441c){const _0x57911c=_0x111ef8;this['_httpService']=_0x2bedd0,this[_0x57911c(0x20c)]=_0x52f57c,this[_0x57911c(0x222)]=_0x251596,this['_injector']=_0x33441c;}async['addComment'](_0x273330){const _0x15b358=_0x111ef8;var _0x4d8d6a,_0x19b970;const {parentId:_0x192ccd,unitId:_0x58eb68,text:_0x1764ef,threadId:_0x1a3ebc}=_0x273330,_0x425109=(_0x19b970=(_0x4d8d6a=_0x1764ef[_0x15b358(0x204)])==null?void 0x0:_0x4d8d6a['filter'](_0x3388c8=>_0x3388c8[_0x15b358(0x1ce)]===_0x100cd8[_0x15b358(0x1e4)])[_0x15b358(0x1ef)](_0x29d5ab=>_0x29d5ab[_0x15b358(0x207)]))!=null?_0x19b970:[],_0x59ef87=JSON[_0x15b358(0x229)](_0x1764ef),_0x1d1c68=(await this[_0x15b358(0x222)][_0x15b358(0x20a)](_0x58eb68))[_0x15b358(0x1d4)]();if(_0x192ccd){const _0x4a2008={'memberId':_0x1d1c68,'unitId':_0x58eb68,'content':_0x59ef87,'mention':_0x425109,'threadId':_0x1a3ebc},_0x503683=(await this[_0x15b358(0x1d5)][_0x15b358(0x21f)](_0x15b358(0x225)+_0x58eb68+_0x15b358(0x226),{'body':_0x4a2008}))[_0x15b358(0x1da)]['reply'];return{..._0x273330,'id':_0x503683[_0x15b358(0x1c8)],'dT':_0x278344(+_0x503683[_0x15b358(0x210)])[_0x15b358(0x1fe)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x503683[_0x15b358(0x1e3)]};}else{const _0x182fb0={'memberId':_0x1d1c68,'unitId':_0x58eb68,'content':_0x59ef87,'mention':_0x425109},_0x5b2e0d=await this[_0x15b358(0x1d5)][_0x15b358(0x21f)](_0x15b358(0x225)+_0x58eb68+_0x15b358(0x20f),{'body':_0x182fb0});return X(_0x5b2e0d[_0x15b358(0x1da)][_0x15b358(0x1dd)],_0x273330);}}async['updateComment'](_0x3a1371){const _0x2398b8=_0x111ef8;var _0x3c0faf,_0x362a88;const {text:_0x2eb221,unitId:_0x3643a7}=_0x3a1371,_0xfebe97=(_0x362a88=(_0x3c0faf=_0x2eb221[_0x2398b8(0x204)])==null?void 0x0:_0x3c0faf[_0x2398b8(0x227)](_0x3d2d26=>_0x3d2d26[_0x2398b8(0x1ce)]===_0x100cd8[_0x2398b8(0x1e4)])[_0x2398b8(0x1ef)](_0x28e065=>_0x28e065[_0x2398b8(0x207)]))!=null?_0x362a88:[],_0x435d48=JSON['stringify'](_0x2eb221),_0x224642=_0x3a1371[_0x2398b8(0x203)],_0x213a62=_0x3a1371['id'],_0x25eeec={'memberId':(await this[_0x2398b8(0x222)][_0x2398b8(0x20a)](_0x3643a7))[_0x2398b8(0x1d4)](),'unitId':_0x3643a7,'threadId':_0x224642,'mention':_0xfebe97,'content':_0x435d48,'replyId':_0x213a62},_0x3250fd=await this[_0x2398b8(0x1d5)][_0x2398b8(0x21f)](_0x2398b8(0x225)+_0x3643a7+_0x2398b8(0x1ed),{'body':_0x25eeec});return!_0x3250fd[_0x2398b8(0x1da)][_0x2398b8(0x200)]||_0x3250fd[_0x2398b8(0x1da)][_0x2398b8(0x200)][_0x2398b8(0x1e5)]===0x1;}async['resolveComment'](_0xb7d56){const _0x45724a=_0x111ef8,{unitId:_0x3aaf3b}=_0xb7d56,_0x6a0350=_0xb7d56[_0x45724a(0x203)],_0x5c0e69={'memberId':this['_userService'][_0x45724a(0x21b)]()[_0x45724a(0x21c)],'unitId':_0x3aaf3b,'threadId':_0x6a0350,'solved':_0xb7d56['resolved']?I[_0x45724a(0x20b)]:I[_0x45724a(0x1e7)]},_0x1922a5=await this[_0x45724a(0x1d5)][_0x45724a(0x21f)](_0x45724a(0x225)+_0x3aaf3b+_0x45724a(0x1ec),{'body':_0x5c0e69});return!_0x1922a5[_0x45724a(0x1da)]['error']||_0x1922a5[_0x45724a(0x1da)][_0x45724a(0x200)][_0x45724a(0x1e5)]===0x1;}async['deleteComment'](_0xc1b93a,_0x30bb9e,_0x51b8a8,_0x56b8fb){const _0x461203=_0x111ef8,_0x133fab={'memberId':(await this[_0x461203(0x222)][_0x461203(0x20a)](_0xc1b93a))['getMemberID'](),'threadId':_0x51b8a8,'replyId':_0x56b8fb,'unitId':_0xc1b93a},_0x3f17c2=await this[_0x461203(0x1d5)][_0x461203(0x21f)](_0x461203(0x225)+_0xc1b93a+_0x461203(0x1ca),{'body':_0x133fab});return!_0x3f17c2[_0x461203(0x1da)][_0x461203(0x200)]||_0x3f17c2['body']['error'][_0x461203(0x1e5)]===0x1;}async[_0x111ef8(0x1ea)](_0x4169fa,_0x3164e1,_0x23f41d){const _0x55a2b1=_0x111ef8,_0x58b48b={'unitId':_0x4169fa,'threadId':_0x23f41d},_0x3ce209=await this[_0x55a2b1(0x1d5)][_0x55a2b1(0x21f)]('/universer-api/comment/unit/'+_0x4169fa+'/list',{'body':_0x58b48b}),_0x493be7=_0x23f41d['map'](_0x341007=>ee(_0x3ce209[_0x55a2b1(0x1da)][_0x55a2b1(0x1c6)][_0x341007],_0x4169fa,_0x3164e1))['filter'](Boolean);return Object[_0x55a2b1(0x221)](_0x3ce209[_0x55a2b1(0x1da)][_0x55a2b1(0x206)])[_0x55a2b1(0x223)](_0xf3d8b7=>{const _0x20c109=_0x55a2b1;this['_userService'][_0x20c109(0x1dc)](_0xf3d8b7);}),_0x493be7;}[_0x111ef8(0x1c9)](_0x5ca25a){const _0x25fefc=_0x111ef8;return{'id':_0x5ca25a['id'],'threadId':_0x5ca25a[_0x25fefc(0x203)],'ref':_0x5ca25a[_0x25fefc(0x1e0)]};}};function _0x4c95(){const _0x4290fa=['replies','values','_sessionService','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','/reply','filter','4424KfPshZ','stringify','root','845780jvwbmv','comments','find','replyId','saveCommentToSnapshot','/delete','length','content','getOwnPropertyDescriptor','rangeType','_init','_configService','1591816gKwQMm','/universer-api/user/list','_threadCommentModel','getMemberID','_httpService','commentUpdate$','personId','_threadCommentDataSourceService','Add','body','resolveComment','addUser','comment','updateComment','Unknown','ref','onReady','_injector','userId','COMMENT','code','UNRECOGNIZED','OpenOrReOpen','addComment','_initUserSync','listComments','_threadCommentDataSource','/solved','/edit','1505655lQGtmY','map','thread-comment-data-source.config','UNIVER_UNKNOWN','20wctKMj','size','setConfig','2708515NbcPHg','disposeWithMe','Edit','type','pipe','parse','568077QhsJoS','6FVRGvE','Solve','format','564prVAdL','error','YYYY/MM/DD\x20HH:mm','pluginName','threadId','customRanges','syncUpdateMutationToColla','users','rangeId','Reply','subscribe','requireSession','Solved','_userService','_commentService','deleteComment','/add','createTimestamp','628061FhHAoV','_config','onStarting','solved','parentId','get','_initDataSource','symbol','unitId','slice','getCurrentUser','userID','Delete','user','post'];_0x4c95=function(){return _0x4290fa;};return _0x4c95();}f=Q([_(0x0,_0x3e7a72(_0x1ca467)),_(0x1,_0x3e7a72(_0x3c56b0)),_(0x2,_0x3e7a72(_0x4162e7)),_(0x3,_0x3e7a72(_0x1656f9))],f);var re=Object[_0x111ef8(0x1cd)],te=(_0x531035,_0x3cb60c,_0x392826,_0x486a33)=>{const _0x399c90=_0x111ef8;for(var _0x106ed4=_0x486a33>0x1?void 0x0:_0x486a33?re(_0x3cb60c,_0x392826):_0x3cb60c,_0x1d5614=_0x531035[_0x399c90(0x1cb)]-0x1,_0x5e49f8;_0x1d5614>=0x0;_0x1d5614--)(_0x5e49f8=_0x531035[_0x1d5614])&&(_0x106ed4=_0x5e49f8(_0x106ed4)||_0x106ed4);return _0x106ed4;},N=(_0x471355,_0x4d5444)=>(_0x450bcd,_0x51a63f)=>_0x4d5444(_0x450bcd,_0x51a63f,_0x471355);let g=class extends _0x134f84{constructor(_0x51ef61,_0x4a7ee8){const _0x4fdd3b=_0x111ef8;super(),this['_threadCommentDataSourceService']=_0x51ef61,this[_0x4fdd3b(0x1eb)]=_0x4a7ee8,this[_0x4fdd3b(0x217)]();}['_initDataSource'](){const _0x27fe4a=_0x111ef8;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x27fe4a(0x1d8)][_0x27fe4a(0x205)]=!0x1;}};g=te([N(0x0,_0x5da8fd),N(0x1,_0x3e7a72(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x512085,_0x37742d,_0x1020e0)=>_0x37742d in _0x512085?se(_0x512085,_0x37742d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1020e0}):_0x512085[_0x37742d]=_0x1020e0,ie=(_0x5eb41d,_0x50898e,_0x4a56d7,_0x3fe97e)=>{const _0x219ac7=_0x111ef8;for(var _0x3b8bc3=_0x3fe97e>0x1?void 0x0:_0x3fe97e?oe(_0x50898e,_0x4a56d7):_0x50898e,_0xdef0ab=_0x5eb41d[_0x219ac7(0x1cb)]-0x1,_0x7c5a64;_0xdef0ab>=0x0;_0xdef0ab--)(_0x7c5a64=_0x5eb41d[_0xdef0ab])&&(_0x3b8bc3=_0x7c5a64(_0x3b8bc3)||_0x3b8bc3);return _0x3b8bc3;},w=(_0x5ee6b4,_0x507f8e)=>(_0x53bde2,_0x1df0e1)=>_0x507f8e(_0x53bde2,_0x1df0e1,_0x5ee6b4),$=(_0x582341,_0x490a39,_0x225d3f)=>ne(_0x582341,typeof _0x490a39!=_0x111ef8(0x218)?_0x490a39+'':_0x490a39,_0x225d3f);let b=class extends _0x56df68{constructor(_0x4bc582=M,_0x2d720c,_0x3060a1){const _0x59f52b=_0x111ef8;super(),this['_config']=_0x4bc582,this[_0x59f52b(0x1e2)]=_0x2d720c,this[_0x59f52b(0x1d0)]=_0x3060a1;const {..._0x328a3b}=_0x4b99cf({},M,this[_0x59f52b(0x212)]);this[_0x59f52b(0x1d0)][_0x59f52b(0x1f4)](z,_0x328a3b);}[_0x111ef8(0x213)](){const _0x5dd82a=_0x111ef8;[[f],[g],[S]][_0x5dd82a(0x223)](_0x2df023=>{const _0x44ef65=_0x5dd82a;this[_0x44ef65(0x1e2)]['add'](_0x2df023);});}[_0x111ef8(0x1e1)](){const _0x5e096d=_0x111ef8;this[_0x5e096d(0x1e2)][_0x5e096d(0x216)](g),this[_0x5e096d(0x1e2)]['get'](S);}};$(b,_0x111ef8(0x202),W),$(b,_0x111ef8(0x1f8),_0xf3ca23[_0x111ef8(0x1f1)]),b=ie([_0x5df789(_0x26e11c,_0x1b522a,_0x474023),w(0x1,_0x3e7a72(_0x1656f9)),w(0x2,_0x2ace32)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5d47f7=_0x224b;(function(_0x34b563,_0x5d1c36){const _0x2a423f=_0x224b,_0x4ce73e=_0x34b563();while(!![]){try{const _0x130ba2=-parseInt(_0x2a423f(0x1c8))/0x1+-parseInt(_0x2a423f(0x1c7))/0x2+parseInt(_0x2a423f(0x1fc))/0x3+parseInt(_0x2a423f(0x221))/0x4*(-parseInt(_0x2a423f(0x1d6))/0x5)+parseInt(_0x2a423f(0x1f9))/0x6+-parseInt(_0x2a423f(0x200))/0x7*(-parseInt(_0x2a423f(0x1fe))/0x8)+parseInt(_0x2a423f(0x1e4))/0x9*(parseInt(_0x2a423f(0x1c0))/0xa);if(_0x130ba2===_0x5d1c36)break;else _0x4ce73e['push'](_0x4ce73e['shift']());}catch(_0x2d12d8){_0x4ce73e['push'](_0x4ce73e['shift']());}}}(_0x4a97,0x63c31));import{CommentService as _0x5b5cb2,CollaborationSessionService as _0xff52e3,UniverCollaborationClientPlugin as _0x31a28b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x104cb6}from'@univerjs-pro/license';import{dayjs as _0x4892bc,UserManagerService as _0x4ec60f,Inject as _0x485985,Injector as _0x17ace1,Disposable as _0x3e4cea,CustomRangeType as _0x5108c3,UniverInstanceType as _0x5d649f,DependentOn as _0x5d59fb,IConfigService as _0x253407,Plugin as _0x28570a,merge as _0x43a2d8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x22014a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x508dd5,IThreadCommentDataSourceService as _0x596221}from'@univerjs/thread-comment';import{bufferTime as _0x38892e}from'rxjs';import{HTTPService as _0x166e15}from'@univerjs/network';const W=_0x5d47f7(0x205);var I=(_0x2ad048=>(_0x2ad048[_0x2ad048[_0x5d47f7(0x1e0)]=0x0]=_0x5d47f7(0x1e0),_0x2ad048[_0x2ad048['Solved']=0x1]=_0x5d47f7(0x1f5),_0x2ad048[_0x2ad048[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x2ad048))(I||{}),v=(_0x5893ba=>(_0x5893ba[_0x5893ba['Unknown']=0x0]=_0x5d47f7(0x21e),_0x5893ba[_0x5893ba[_0x5d47f7(0x216)]=0x1]=_0x5d47f7(0x216),_0x5893ba[_0x5893ba[_0x5d47f7(0x20d)]=0x2]=_0x5d47f7(0x20d),_0x5893ba[_0x5893ba[_0x5d47f7(0x1c1)]=0x3]='Edit',_0x5893ba[_0x5893ba[_0x5d47f7(0x1bc)]=0x4]=_0x5d47f7(0x1bc),_0x5893ba[_0x5893ba['Solve']=0x5]=_0x5d47f7(0x1e8),_0x5893ba[_0x5893ba[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x5893ba))(v||{});const D=_0xff3b01=>_0x4892bc(new Date(+_0xff3b01))[_0x5d47f7(0x1e6)](_0x5d47f7(0x1dd)),B=async(_0x18f1c4,_0x31ff46)=>{const _0x196e9e=_0x5d47f7,_0x3b0438=_0x18f1c4[_0x196e9e(0x206)](_0x4ec60f),_0x4256a7=_0x18f1c4[_0x196e9e(0x206)](_0x166e15);_0x31ff46[_0x196e9e(0x20a)](_0x2a8250=>{const _0xd01244=_0x196e9e;_0x3b0438[_0xd01244(0x1ef)](_0x2a8250)&&_0x31ff46['delete'](_0x2a8250);}),_0x31ff46[_0x196e9e(0x1ee)]&&(await _0x4256a7[_0x196e9e(0x206)](_0x196e9e(0x1f3),{'params':{'userIDs':[..._0x31ff46]}}))['body'][_0x196e9e(0x1de)]['forEach'](_0x3142f3=>{const _0x409850=_0x196e9e;_0x3142f3&&_0x3b0438[_0x409850(0x1d4)](_0x3142f3);});};var K=Object[_0x5d47f7(0x219)],V=(_0xe8b149,_0x27a239,_0x13da1c,_0x317ce8)=>{const _0x478706=_0x5d47f7;for(var _0x32e9db=_0x317ce8>0x1?void 0x0:_0x317ce8?K(_0x27a239,_0x13da1c):_0x27a239,_0x294f8c=_0xe8b149[_0x478706(0x1cc)]-0x1,_0x7c295b;_0x294f8c>=0x0;_0x294f8c--)(_0x7c295b=_0xe8b149[_0x294f8c])&&(_0x32e9db=_0x7c295b(_0x32e9db)||_0x32e9db);return _0x32e9db;},p=(_0x3e0ac1,_0x517b08)=>(_0x4e2493,_0x4c3d0a)=>_0x517b08(_0x4e2493,_0x4c3d0a,_0x3e0ac1);let S=class extends _0x3e4cea{constructor(_0x18558d,_0x46a022,_0x7ffe0f,_0x241782){const _0x2ad117=_0x5d47f7;super(),this[_0x2ad117(0x20e)]=_0x18558d,this[_0x2ad117(0x1c3)]=_0x46a022,this[_0x2ad117(0x1f4)]=_0x7ffe0f,this['_injector']=_0x241782,this[_0x2ad117(0x1f8)](),this[_0x2ad117(0x1e3)]();}[_0x5d47f7(0x1e3)](){const _0x389ee9=_0x5d47f7;this[_0x389ee9(0x21b)](this[_0x389ee9(0x1c3)][_0x389ee9(0x1dc)][_0x389ee9(0x211)](_0x38892e(0x10))[_0x389ee9(0x1cb)](_0x28e391=>{const _0x45d5e0=_0x389ee9,_0x588aa5=new Set();_0x28e391['forEach'](_0x2b74e8=>{const _0x2160b3=_0x224b;switch(_0x2b74e8['type']){case _0x2160b3(0x1bb):{const _0x9db2fb=_0x2b74e8[_0x2160b3(0x1ce)][_0x2160b3(0x213)];_0x588aa5[_0x2160b3(0x1bb)](_0x9db2fb);break;}}}),B(this[_0x45d5e0(0x1cd)],_0x588aa5);}));}[_0x5d47f7(0x1f8)](){const _0x43610f=_0x5d47f7;this[_0x43610f(0x21b)](this['_commentService']['commentUpdate$'][_0x43610f(0x1cb)](async _0xd954c1=>{const _0xea04b6=_0x43610f;var _0x2f3c75,_0x11a35b,_0x43385b,_0x3b40c3;const _0x4c3d57=(_0x2f3c75=this['_threadCommentModel']['getUnit'](_0xd954c1[_0xea04b6(0x1c2)])['find'](_0x13cd3d=>_0x13cd3d[_0xea04b6(0x1f2)]===_0xd954c1['threadId']))==null?void 0x0:_0x2f3c75[_0xea04b6(0x1c6)];if(!_0x4c3d57)return;const {unitId:_0x4d4990,subUnitId:_0x31a111}=_0x4c3d57;switch(_0xd954c1[_0xea04b6(0x1fb)]&&this['_userService'][_0xea04b6(0x1d4)](_0xd954c1['user']),_0xd954c1['type']){case v[_0xea04b6(0x216)]:break;case v[_0xea04b6(0x20d)]:{this[_0xea04b6(0x1c3)][_0xea04b6(0x1d2)](_0x4d4990,_0x31a111,{'unitId':_0x4d4990,'subUnitId':_0x31a111,'ref':'','id':_0xd954c1[_0xea04b6(0x1da)],'dT':D(+_0xd954c1[_0xea04b6(0x1ec)]),'threadId':_0xd954c1[_0xea04b6(0x1f2)],'personId':(_0x43385b=(_0x11a35b=_0xd954c1[_0xea04b6(0x1fb)])==null?void 0x0:_0x11a35b[_0xea04b6(0x212)])!=null?_0x43385b:_0xd954c1['userId'],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content']),'parentId':_0x4c3d57['id']});break;}case v[_0xea04b6(0x1bc)]:{const _0x25a717=this[_0xea04b6(0x1c3)][_0xea04b6(0x1c9)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);_0x25a717&&_0x25a717[_0xea04b6(0x21f)]&&this[_0xea04b6(0x1c3)][_0xea04b6(0x1f6)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);break;}case v[_0xea04b6(0x1c1)]:{this[_0xea04b6(0x1c3)]['updateComment'](_0x4d4990,_0x31a111,{'commentId':_0xd954c1[_0xea04b6(0x1da)],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content'])});break;}case v[_0xea04b6(0x1e8)]:{const _0xc9187=(_0x3b40c3=this[_0xea04b6(0x1c3)][_0xea04b6(0x1ea)](_0xd954c1['unitId'])[_0xea04b6(0x207)](_0x2f12ec=>_0x2f12ec[_0xea04b6(0x1f2)]===_0xd954c1[_0xea04b6(0x1f2)]))==null?void 0x0:_0x3b40c3[_0xea04b6(0x1c6)];_0xc9187&&this[_0xea04b6(0x1c3)][_0xea04b6(0x202)](_0x4d4990,_0x31a111,_0xc9187['id'],_0xd954c1['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x485985(_0x5b5cb2)),p(0x1,_0x485985(_0x508dd5)),p(0x2,_0x485985(_0x4ec60f)),p(0x3,_0x485985(_0x17ace1))],S);const z=_0x5d47f7(0x1ca),M={};var k=Object[_0x5d47f7(0x219)],Q=(_0x2fa068,_0x31385a,_0x47307f,_0x1cb765)=>{const _0x168d28=_0x5d47f7;for(var _0x49129c=_0x1cb765>0x1?void 0x0:_0x1cb765?k(_0x31385a,_0x47307f):_0x31385a,_0x1127c9=_0x2fa068[_0x168d28(0x1cc)]-0x1,_0x364bf5;_0x1127c9>=0x0;_0x1127c9--)(_0x364bf5=_0x2fa068[_0x1127c9])&&(_0x49129c=_0x364bf5(_0x49129c)||_0x49129c);return _0x49129c;},_=(_0x202aea,_0x19ed85)=>(_0x58949b,_0x580c04)=>_0x19ed85(_0x58949b,_0x580c04,_0x202aea);function _0x4a97(){const _0x23bda0=['setConfig','requireSession','listComments','70yCuEHH','Edit','unitId','_threadCommentModel','rangeId','_config','root','1489384LJXPSo','743096EoCseq','getComment','thread-comment-data-source.config','subscribe','length','_injector','payload','_configService','code','COMMENT','addComment','error','addUser','dataSource','8815uzAPHn','UNRECOGNIZED','_threadCommentDataSource','parse','replyId','symbol','commentUpdate$','YYYY/MM/DD\x20HH:mm','users','solved','OpenOrReOpen','getMemberID','UNIVER_UNKNOWN','_initUserSync','1422585MeTzuE','defineProperty','format','userId','Solve','values','getUnit','map','createTimestamp','_httpService','size','getUser','filter','syncUpdateMutationToColla','threadId','/universer-api/user/list','_userService','Solved','deleteComment','rangeType','_init','2356656YijQem','saveCommentToSnapshot','user','1963389OFDTFN','/delete','16rVwNjf','content','808745NVGwig','/solved','resolveComment','pluginName','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','find','/edit','type','forEach','_sessionService','customRanges','Reply','_commentService','/reply','/universer-api/comment/unit/','pipe','userID','personId','ref','resolved','Add','/list','stringify','getOwnPropertyDescriptor','replies','disposeWithMe','post','_threadCommentDataSourceService','Unknown','parentId','/add','1108oisWBF','body','add','Delete'];_0x4a97=function(){return _0x23bda0;};return _0x4a97();}function X(_0x2853ff,_0x4efc93){const _0x39877e=_0x5d47f7,_0x1ad1dd=_0x2853ff[_0x39877e(0x21a)][0x0];return{..._0x4efc93,'id':_0x1ad1dd[_0x39877e(0x1da)],'resolved':_0x2853ff[_0x39877e(0x1df)]===0x1,'dT':D(_0x1ad1dd[_0x39877e(0x1ec)]),'personId':_0x1ad1dd[_0x39877e(0x1e7)],'threadId':_0x1ad1dd[_0x39877e(0x1f2)]};}function ee(_0x161cf9,_0x104e35,_0x33390b){const _0x4e3082=_0x5d47f7;var _0x52b2c2,_0x2e7d0c;if(((_0x2e7d0c=(_0x52b2c2=_0x161cf9==null?void 0x0:_0x161cf9[_0x4e3082(0x21a)])==null?void 0x0:_0x52b2c2['length'])!=null?_0x2e7d0c:0x0)>0x0){const _0x5c1f53=(_0x843475,_0xc7a9b5)=>({'id':_0x843475[_0x4e3082(0x1da)],'threadId':_0x843475[_0x4e3082(0x1f2)],'dT':D(_0x843475[_0x4e3082(0x1ec)]),'personId':_0x843475['userId'],'resolved':_0x161cf9[_0x4e3082(0x1df)]===I['Solved'],'unitId':_0x104e35,'subUnitId':_0x33390b,'text':JSON[_0x4e3082(0x1d9)](_0x843475[_0x4e3082(0x1ff)]),'parentId':_0xc7a9b5}),_0xd4ae6f=_0x5c1f53(_0x161cf9[_0x4e3082(0x21a)][0x0]);return{..._0xd4ae6f,'children':_0x161cf9[_0x4e3082(0x21a)]['slice'](0x1)[_0x4e3082(0x1eb)](_0x4108fe=>_0x5c1f53(_0x4108fe,_0xd4ae6f['id']))};}return null;}let f=class{constructor(_0x5f578d,_0x4fd9fe,_0x45f46e,_0x586ae3){const _0x3e06e9=_0x5d47f7;this[_0x3e06e9(0x1ed)]=_0x5f578d,this[_0x3e06e9(0x1f4)]=_0x4fd9fe,this['_sessionService']=_0x45f46e,this[_0x3e06e9(0x1cd)]=_0x586ae3;}async[_0x5d47f7(0x1d2)](_0x517c38){const _0x300896=_0x5d47f7;var _0x1d5f83,_0x2302dc;const {parentId:_0x59487b,unitId:_0x5b6976,text:_0x1d06c8,threadId:_0x515c10}=_0x517c38,_0x14de92=(_0x2302dc=(_0x1d5f83=_0x1d06c8[_0x300896(0x20c)])==null?void 0x0:_0x1d5f83[_0x300896(0x1f0)](_0x57cab6=>_0x57cab6[_0x300896(0x1f7)]===_0x5108c3[_0x300896(0x1d1)])[_0x300896(0x1eb)](_0x2be1de=>_0x2be1de[_0x300896(0x1c4)]))!=null?_0x2302dc:[],_0x2a1650=JSON[_0x300896(0x218)](_0x1d06c8),_0x50a64d=(await this[_0x300896(0x20b)][_0x300896(0x1be)](_0x5b6976))[_0x300896(0x1e1)]();if(_0x59487b){const _0xfa2b35={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92,'threadId':_0x515c10},_0x1bb879=(await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x20f),{'body':_0xfa2b35}))[_0x300896(0x222)]['reply'];return{..._0x517c38,'id':_0x1bb879['replyId'],'dT':_0x4892bc(+_0x1bb879[_0x300896(0x1ec)])[_0x300896(0x1e6)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1bb879[_0x300896(0x1e7)]};}else{const _0x230492={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92},_0x4593bc=await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x220),{'body':_0x230492});return X(_0x4593bc[_0x300896(0x222)]['comment'],_0x517c38);}}async['updateComment'](_0x1d667a){const _0xe37e36=_0x5d47f7;var _0x2152b5,_0x25abb1;const {text:_0x4d99a3,unitId:_0x57573e}=_0x1d667a,_0x2c8c74=(_0x25abb1=(_0x2152b5=_0x4d99a3[_0xe37e36(0x20c)])==null?void 0x0:_0x2152b5[_0xe37e36(0x1f0)](_0xf05851=>_0xf05851[_0xe37e36(0x1f7)]===_0x5108c3[_0xe37e36(0x1d1)])[_0xe37e36(0x1eb)](_0x287918=>_0x287918[_0xe37e36(0x1c4)]))!=null?_0x25abb1:[],_0x3be6e3=JSON[_0xe37e36(0x218)](_0x4d99a3),_0x314092=_0x1d667a[_0xe37e36(0x1f2)],_0x40d215=_0x1d667a['id'],_0x3da70f={'memberId':(await this[_0xe37e36(0x20b)]['requireSession'](_0x57573e))[_0xe37e36(0x1e1)](),'unitId':_0x57573e,'threadId':_0x314092,'mention':_0x2c8c74,'content':_0x3be6e3,'replyId':_0x40d215},_0x2a8f82=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x57573e+_0xe37e36(0x208),{'body':_0x3da70f});return!_0x2a8f82[_0xe37e36(0x222)]['error']||_0x2a8f82[_0xe37e36(0x222)][_0xe37e36(0x1d3)][_0xe37e36(0x1d0)]===0x1;}async['resolveComment'](_0x253ac0){const _0x1f870a=_0x5d47f7,{unitId:_0x4ed73d}=_0x253ac0,_0x4a0286=_0x253ac0[_0x1f870a(0x1f2)],_0x14d47d={'memberId':this[_0x1f870a(0x1f4)]['getCurrentUser']()[_0x1f870a(0x212)],'unitId':_0x4ed73d,'threadId':_0x4a0286,'solved':_0x253ac0[_0x1f870a(0x215)]?I['Solved']:I[_0x1f870a(0x1e0)]},_0x2db48f=await this[_0x1f870a(0x1ed)][_0x1f870a(0x21c)](_0x1f870a(0x210)+_0x4ed73d+_0x1f870a(0x201),{'body':_0x14d47d});return!_0x2db48f['body'][_0x1f870a(0x1d3)]||_0x2db48f[_0x1f870a(0x222)][_0x1f870a(0x1d3)][_0x1f870a(0x1d0)]===0x1;}async[_0x5d47f7(0x1f6)](_0x59f5c7,_0x69c44a,_0x1d96a0,_0x4d92dc){const _0xb5c3f6=_0x5d47f7,_0x49f40e={'memberId':(await this[_0xb5c3f6(0x20b)][_0xb5c3f6(0x1be)](_0x59f5c7))[_0xb5c3f6(0x1e1)](),'threadId':_0x1d96a0,'replyId':_0x4d92dc,'unitId':_0x59f5c7},_0x167d5e=await this['_httpService'][_0xb5c3f6(0x21c)](_0xb5c3f6(0x210)+_0x59f5c7+_0xb5c3f6(0x1fd),{'body':_0x49f40e});return!_0x167d5e[_0xb5c3f6(0x222)]['error']||_0x167d5e[_0xb5c3f6(0x222)][_0xb5c3f6(0x1d3)][_0xb5c3f6(0x1d0)]===0x1;}async[_0x5d47f7(0x1bf)](_0x43e237,_0x4df04e,_0xda9039){const _0x3615fc=_0x5d47f7,_0x3fcdda={'unitId':_0x43e237,'threadId':_0xda9039},_0x1245d0=await this[_0x3615fc(0x1ed)][_0x3615fc(0x21c)](_0x3615fc(0x210)+_0x43e237+_0x3615fc(0x217),{'body':_0x3fcdda}),_0x4ebe4f=_0xda9039[_0x3615fc(0x1eb)](_0x5aa8b4=>ee(_0x1245d0[_0x3615fc(0x222)][_0x3615fc(0x204)][_0x5aa8b4],_0x43e237,_0x4df04e))[_0x3615fc(0x1f0)](Boolean);return Object[_0x3615fc(0x1e9)](_0x1245d0[_0x3615fc(0x222)]['users'])[_0x3615fc(0x20a)](_0xd59a04=>{const _0x136ac4=_0x3615fc;this[_0x136ac4(0x1f4)]['addUser'](_0xd59a04);}),_0x4ebe4f;}[_0x5d47f7(0x1fa)](_0x140357){const _0x2f3ba3=_0x5d47f7;return{'id':_0x140357['id'],'threadId':_0x140357[_0x2f3ba3(0x1f2)],'ref':_0x140357[_0x2f3ba3(0x214)]};}};f=Q([_(0x0,_0x485985(_0x166e15)),_(0x1,_0x485985(_0x4ec60f)),_(0x2,_0x485985(_0xff52e3)),_(0x3,_0x485985(_0x17ace1))],f);var re=Object[_0x5d47f7(0x219)],te=(_0x350f38,_0x57aaa4,_0x1003f5,_0x442795)=>{for(var _0x44c311=_0x442795>0x1?void 0x0:_0x442795?re(_0x57aaa4,_0x1003f5):_0x57aaa4,_0x363e11=_0x350f38['length']-0x1,_0x41c654;_0x363e11>=0x0;_0x363e11--)(_0x41c654=_0x350f38[_0x363e11])&&(_0x44c311=_0x41c654(_0x44c311)||_0x44c311);return _0x44c311;},N=(_0x1e6260,_0x5d7b47)=>(_0x4caee4,_0x59fb72)=>_0x5d7b47(_0x4caee4,_0x59fb72,_0x1e6260);function _0x224b(_0x1bfbe0,_0x324bfb){const _0x4a975f=_0x4a97();return _0x224b=function(_0x224b7e,_0x1aa131){_0x224b7e=_0x224b7e-0x1bb;let _0x1c5243=_0x4a975f[_0x224b7e];return _0x1c5243;},_0x224b(_0x1bfbe0,_0x324bfb);}let g=class extends _0x3e4cea{constructor(_0x32c99c,_0xa2b5c3){const _0x2cb612=_0x5d47f7;super(),this['_threadCommentDataSourceService']=_0x32c99c,this[_0x2cb612(0x1d8)]=_0xa2b5c3,this['_initDataSource']();}['_initDataSource'](){const _0x301852=_0x5d47f7;this[_0x301852(0x21d)][_0x301852(0x1d5)]=this[_0x301852(0x1d8)],this[_0x301852(0x21d)][_0x301852(0x1f1)]=!0x1;}};g=te([N(0x0,_0x596221),N(0x1,_0x485985(f))],g);var se=Object[_0x5d47f7(0x1e5)],oe=Object[_0x5d47f7(0x219)],ne=(_0x667073,_0x4b235e,_0x3f9984)=>_0x4b235e in _0x667073?se(_0x667073,_0x4b235e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f9984}):_0x667073[_0x4b235e]=_0x3f9984,ie=(_0x3a53f7,_0x2f87f1,_0x1065a5,_0x4e2ab)=>{const _0x2cc0ff=_0x5d47f7;for(var _0xb72658=_0x4e2ab>0x1?void 0x0:_0x4e2ab?oe(_0x2f87f1,_0x1065a5):_0x2f87f1,_0x531771=_0x3a53f7[_0x2cc0ff(0x1cc)]-0x1,_0x549758;_0x531771>=0x0;_0x531771--)(_0x549758=_0x3a53f7[_0x531771])&&(_0xb72658=_0x549758(_0xb72658)||_0xb72658);return _0xb72658;},w=(_0x77fef1,_0x2e63b6)=>(_0x4a806f,_0x3e6a5b)=>_0x2e63b6(_0x4a806f,_0x3e6a5b,_0x77fef1),$=(_0x37545b,_0x33f974,_0x59e734)=>ne(_0x37545b,typeof _0x33f974!=_0x5d47f7(0x1db)?_0x33f974+'':_0x33f974,_0x59e734);let b=class extends _0x28570a{constructor(_0x924144=M,_0x3994e0,_0x366957){const _0x1c068d=_0x5d47f7;super(),this[_0x1c068d(0x1c5)]=_0x924144,this[_0x1c068d(0x1cd)]=_0x3994e0,this['_configService']=_0x366957;const {..._0x4d7eef}=_0x43a2d8({},M,this[_0x1c068d(0x1c5)]);this[_0x1c068d(0x1cf)][_0x1c068d(0x1bd)](z,_0x4d7eef);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x116fd0=>{const _0x37d78d=_0x224b;this[_0x37d78d(0x1cd)][_0x37d78d(0x1bb)](_0x116fd0);});}['onReady'](){const _0x4ba9b8=_0x5d47f7;this[_0x4ba9b8(0x1cd)]['get'](g),this[_0x4ba9b8(0x1cd)][_0x4ba9b8(0x206)](S);}};$(b,_0x5d47f7(0x203),W),$(b,_0x5d47f7(0x209),_0x5d649f[_0x5d47f7(0x1e2)]),b=ie([_0x5d59fb(_0x22014a,_0x31a28b,_0x104cb6),w(0x1,_0x485985(_0x17ace1)),w(0x2,_0x253407)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x111ef8=_0x40ac;(function(_0x2a22c9,_0x1902d4){const _0x57437b=_0x40ac,_0x343186=_0x2a22c9();while(!![]){try{const _0x5ac478=parseInt(_0x57437b(0x211))/0x1+parseInt(_0x57437b(0x1fc))/0x2*(-parseInt(_0x57437b(0x1fb))/0x3)+parseInt(_0x57437b(0x1c5))/0x4+-parseInt(_0x57437b(0x1f5))/0x5+parseInt(_0x57437b(0x1ff))/0x6*(parseInt(_0x57437b(0x228))/0x7)+parseInt(_0x57437b(0x1d1))/0x8+-parseInt(_0x57437b(0x1ee))/0x9*(-parseInt(_0x57437b(0x1f2))/0xa);if(_0x5ac478===_0x1902d4)break;else _0x343186['push'](_0x343186['shift']());}catch(_0x56ce1d){_0x343186['push'](_0x343186['shift']());}}}(_0x4c95,0x4ec8d));import{CommentService as _0x145aa8,CollaborationSessionService as _0x4162e7,UniverCollaborationClientPlugin as _0x1b522a}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x474023}from'@univerjs-pro/license';import{dayjs as _0x278344,UserManagerService as _0x3c56b0,Inject as _0x3e7a72,Injector as _0x1656f9,Disposable as _0x134f84,CustomRangeType as _0x100cd8,UniverInstanceType as _0xf3ca23,DependentOn as _0x5df789,IConfigService as _0x2ace32,Plugin as _0x56df68,merge as _0x4b99cf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x26e11c}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x14b3ba,IThreadCommentDataSourceService as _0x5da8fd}from'@univerjs/thread-comment';import{bufferTime as _0x5e5bab}from'rxjs';import{HTTPService as _0x1ca467}from'@univerjs/network';const W=_0x111ef8(0x224);var I=(_0x3f96e3=>(_0x3f96e3[_0x3f96e3[_0x111ef8(0x1e7)]=0x0]=_0x111ef8(0x1e7),_0x3f96e3[_0x3f96e3[_0x111ef8(0x20b)]=0x1]='Solved',_0x3f96e3[_0x3f96e3[_0x111ef8(0x1e6)]=-0x1]=_0x111ef8(0x1e6),_0x3f96e3))(I||{}),v=(_0x85f333=>(_0x85f333[_0x85f333['Unknown']=0x0]=_0x111ef8(0x1df),_0x85f333[_0x85f333[_0x111ef8(0x1d9)]=0x1]=_0x111ef8(0x1d9),_0x85f333[_0x85f333[_0x111ef8(0x208)]=0x2]=_0x111ef8(0x208),_0x85f333[_0x85f333[_0x111ef8(0x1f7)]=0x3]='Edit',_0x85f333[_0x85f333[_0x111ef8(0x21d)]=0x4]=_0x111ef8(0x21d),_0x85f333[_0x85f333[_0x111ef8(0x1fd)]=0x5]=_0x111ef8(0x1fd),_0x85f333[_0x85f333[_0x111ef8(0x1e6)]=-0x1]='UNRECOGNIZED',_0x85f333))(v||{});function _0x40ac(_0x39b5b6,_0x1bc55e){const _0x4c95a0=_0x4c95();return _0x40ac=function(_0x40ac06,_0x401b21){_0x40ac06=_0x40ac06-0x1c5;let _0x200125=_0x4c95a0[_0x40ac06];return _0x200125;},_0x40ac(_0x39b5b6,_0x1bc55e);}const D=_0xa06bba=>_0x278344(new Date(+_0xa06bba))[_0x111ef8(0x1fe)](_0x111ef8(0x201)),B=async(_0x560fab,_0x4f5511)=>{const _0x20f461=_0x111ef8,_0x3bcc39=_0x560fab['get'](_0x3c56b0),_0x1722c8=_0x560fab[_0x20f461(0x216)](_0x1ca467);_0x4f5511[_0x20f461(0x223)](_0x112343=>{_0x3bcc39['getUser'](_0x112343)&&_0x4f5511['delete'](_0x112343);}),_0x4f5511[_0x20f461(0x1f3)]&&(await _0x1722c8[_0x20f461(0x216)](_0x20f461(0x1d2),{'params':{'userIDs':[..._0x4f5511]}}))[_0x20f461(0x1da)][_0x20f461(0x206)][_0x20f461(0x223)](_0x328850=>{const _0x58778a=_0x20f461;_0x328850&&_0x3bcc39[_0x58778a(0x1dc)](_0x328850);});};var K=Object[_0x111ef8(0x1cd)],V=(_0x1c240a,_0x322168,_0xe43a1f,_0x191b48)=>{const _0x1f3997=_0x111ef8;for(var _0x33955f=_0x191b48>0x1?void 0x0:_0x191b48?K(_0x322168,_0xe43a1f):_0x322168,_0x5b0b44=_0x1c240a[_0x1f3997(0x1cb)]-0x1,_0x346b49;_0x5b0b44>=0x0;_0x5b0b44--)(_0x346b49=_0x1c240a[_0x5b0b44])&&(_0x33955f=_0x346b49(_0x33955f)||_0x33955f);return _0x33955f;},p=(_0x525a27,_0x23cbd8)=>(_0x6caa3e,_0x1ec775)=>_0x23cbd8(_0x6caa3e,_0x1ec775,_0x525a27);let S=class extends _0x134f84{constructor(_0xb79073,_0xfc41e6,_0x90350e,_0x513b3b){const _0x2ad601=_0x111ef8;super(),this[_0x2ad601(0x20d)]=_0xb79073,this[_0x2ad601(0x1d3)]=_0xfc41e6,this[_0x2ad601(0x20c)]=_0x90350e,this['_injector']=_0x513b3b,this['_init'](),this[_0x2ad601(0x1e9)]();}[_0x111ef8(0x1e9)](){const _0x3b4db1=_0x111ef8;this[_0x3b4db1(0x1f6)](this[_0x3b4db1(0x1d3)][_0x3b4db1(0x1d6)][_0x3b4db1(0x1f9)](_0x5e5bab(0x10))[_0x3b4db1(0x209)](_0x35e6cc=>{const _0x5f1a6f=_0x3b4db1,_0x2b9c90=new Set();_0x35e6cc['forEach'](_0x2de3b6=>{const _0x5e1c20=_0x40ac;switch(_0x2de3b6[_0x5e1c20(0x1f8)]){case'add':{const _0x3aba05=_0x2de3b6['payload'][_0x5e1c20(0x1d7)];_0x2b9c90['add'](_0x3aba05);break;}}}),B(this[_0x5f1a6f(0x1e2)],_0x2b9c90);}));}[_0x111ef8(0x1cf)](){const _0x104f90=_0x111ef8;this['disposeWithMe'](this[_0x104f90(0x20d)][_0x104f90(0x1d6)][_0x104f90(0x209)](async _0x32100d=>{const _0xe1e1d5=_0x104f90;var _0x145f3b,_0x3882dc,_0x9b4bec,_0x3db239;const _0xc6dd3c=(_0x145f3b=this[_0xe1e1d5(0x1d3)]['getUnit'](_0x32100d['unitId'])[_0xe1e1d5(0x1c7)](_0x3c1d8b=>_0x3c1d8b[_0xe1e1d5(0x203)]===_0x32100d['threadId']))==null?void 0x0:_0x145f3b[_0xe1e1d5(0x22a)];if(!_0xc6dd3c)return;const {unitId:_0x5ee67e,subUnitId:_0x27a4ce}=_0xc6dd3c;switch(_0x32100d[_0xe1e1d5(0x21e)]&&this[_0xe1e1d5(0x20c)]['addUser'](_0x32100d[_0xe1e1d5(0x21e)]),_0x32100d[_0xe1e1d5(0x1f8)]){case v[_0xe1e1d5(0x1d9)]:break;case v[_0xe1e1d5(0x208)]:{this[_0xe1e1d5(0x1d3)][_0xe1e1d5(0x1e8)](_0x5ee67e,_0x27a4ce,{'unitId':_0x5ee67e,'subUnitId':_0x27a4ce,'ref':'','id':_0x32100d[_0xe1e1d5(0x1c8)],'dT':D(+_0x32100d[_0xe1e1d5(0x210)]),'threadId':_0x32100d[_0xe1e1d5(0x203)],'personId':(_0x9b4bec=(_0x3882dc=_0x32100d[_0xe1e1d5(0x21e)])==null?void 0x0:_0x3882dc[_0xe1e1d5(0x21c)])!=null?_0x9b4bec:_0x32100d[_0xe1e1d5(0x1e3)],'text':JSON[_0xe1e1d5(0x1fa)](_0x32100d[_0xe1e1d5(0x1cc)]),'parentId':_0xc6dd3c['id']});break;}case v[_0xe1e1d5(0x21d)]:{const _0x4ebfed=this[_0xe1e1d5(0x1d3)]['getComment'](_0x5ee67e,_0x27a4ce,_0x32100d['replyId']);_0x4ebfed&&_0x4ebfed[_0xe1e1d5(0x215)]&&this[_0xe1e1d5(0x1d3)][_0xe1e1d5(0x20e)](_0x5ee67e,_0x27a4ce,_0x32100d[_0xe1e1d5(0x1c8)]);break;}case v[_0xe1e1d5(0x1f7)]:{this[_0xe1e1d5(0x1d3)][_0xe1e1d5(0x1de)](_0x5ee67e,_0x27a4ce,{'commentId':_0x32100d[_0xe1e1d5(0x1c8)],'text':JSON['parse'](_0x32100d[_0xe1e1d5(0x1cc)])});break;}case v[_0xe1e1d5(0x1fd)]:{const _0x31f508=(_0x3db239=this[_0xe1e1d5(0x1d3)]['getUnit'](_0x32100d[_0xe1e1d5(0x219)])[_0xe1e1d5(0x1c7)](_0x3ba9e5=>_0x3ba9e5[_0xe1e1d5(0x203)]===_0x32100d['threadId']))==null?void 0x0:_0x3db239[_0xe1e1d5(0x22a)];_0x31f508&&this[_0xe1e1d5(0x1d3)][_0xe1e1d5(0x1db)](_0x5ee67e,_0x27a4ce,_0x31f508['id'],_0x32100d[_0xe1e1d5(0x214)]===I[_0xe1e1d5(0x20b)]);break;}}}));}};S=V([p(0x0,_0x3e7a72(_0x145aa8)),p(0x1,_0x3e7a72(_0x14b3ba)),p(0x2,_0x3e7a72(_0x3c56b0)),p(0x3,_0x3e7a72(_0x1656f9))],S);const z=_0x111ef8(0x1f0),M={};var k=Object[_0x111ef8(0x1cd)],Q=(_0x3ae82d,_0x5cbebc,_0x394b12,_0x28bcc7)=>{const _0x306dc1=_0x111ef8;for(var _0x5e2b8c=_0x28bcc7>0x1?void 0x0:_0x28bcc7?k(_0x5cbebc,_0x394b12):_0x5cbebc,_0x4966d9=_0x3ae82d[_0x306dc1(0x1cb)]-0x1,_0x599944;_0x4966d9>=0x0;_0x4966d9--)(_0x599944=_0x3ae82d[_0x4966d9])&&(_0x5e2b8c=_0x599944(_0x5e2b8c)||_0x5e2b8c);return _0x5e2b8c;},_=(_0x22e40d,_0x41c94f)=>(_0x5962f8,_0x3464af)=>_0x41c94f(_0x5962f8,_0x3464af,_0x22e40d);function X(_0x212b80,_0x348f7c){const _0x400ae8=_0x111ef8,_0x1c171d=_0x212b80[_0x400ae8(0x220)][0x0];return{..._0x348f7c,'id':_0x1c171d['replyId'],'resolved':_0x212b80[_0x400ae8(0x214)]===0x1,'dT':D(_0x1c171d[_0x400ae8(0x210)]),'personId':_0x1c171d['userId'],'threadId':_0x1c171d['threadId']};}function ee(_0x1f543c,_0x2b7d9b,_0x52b256){const _0x69ca85=_0x111ef8;var _0xd730b5,_0x433066;if(((_0x433066=(_0xd730b5=_0x1f543c==null?void 0x0:_0x1f543c[_0x69ca85(0x220)])==null?void 0x0:_0xd730b5[_0x69ca85(0x1cb)])!=null?_0x433066:0x0)>0x0){const _0x22b288=(_0x356817,_0x4f1983)=>({'id':_0x356817['replyId'],'threadId':_0x356817[_0x69ca85(0x203)],'dT':D(_0x356817[_0x69ca85(0x210)]),'personId':_0x356817[_0x69ca85(0x1e3)],'resolved':_0x1f543c['solved']===I[_0x69ca85(0x20b)],'unitId':_0x2b7d9b,'subUnitId':_0x52b256,'text':JSON[_0x69ca85(0x1fa)](_0x356817[_0x69ca85(0x1cc)]),'parentId':_0x4f1983}),_0x5d94c5=_0x22b288(_0x1f543c[_0x69ca85(0x220)][0x0]);return{..._0x5d94c5,'children':_0x1f543c[_0x69ca85(0x220)][_0x69ca85(0x21a)](0x1)[_0x69ca85(0x1ef)](_0x43799b=>_0x22b288(_0x43799b,_0x5d94c5['id']))};}return null;}let f=class{constructor(_0x2bedd0,_0x52f57c,_0x251596,_0x33441c){const _0x57911c=_0x111ef8;this['_httpService']=_0x2bedd0,this[_0x57911c(0x20c)]=_0x52f57c,this[_0x57911c(0x222)]=_0x251596,this['_injector']=_0x33441c;}async['addComment'](_0x273330){const _0x15b358=_0x111ef8;var _0x4d8d6a,_0x19b970;const {parentId:_0x192ccd,unitId:_0x58eb68,text:_0x1764ef,threadId:_0x1a3ebc}=_0x273330,_0x425109=(_0x19b970=(_0x4d8d6a=_0x1764ef[_0x15b358(0x204)])==null?void 0x0:_0x4d8d6a['filter'](_0x3388c8=>_0x3388c8[_0x15b358(0x1ce)]===_0x100cd8[_0x15b358(0x1e4)])[_0x15b358(0x1ef)](_0x29d5ab=>_0x29d5ab[_0x15b358(0x207)]))!=null?_0x19b970:[],_0x59ef87=JSON[_0x15b358(0x229)](_0x1764ef),_0x1d1c68=(await this[_0x15b358(0x222)][_0x15b358(0x20a)](_0x58eb68))[_0x15b358(0x1d4)]();if(_0x192ccd){const _0x4a2008={'memberId':_0x1d1c68,'unitId':_0x58eb68,'content':_0x59ef87,'mention':_0x425109,'threadId':_0x1a3ebc},_0x503683=(await this[_0x15b358(0x1d5)][_0x15b358(0x21f)](_0x15b358(0x225)+_0x58eb68+_0x15b358(0x226),{'body':_0x4a2008}))[_0x15b358(0x1da)]['reply'];return{..._0x273330,'id':_0x503683[_0x15b358(0x1c8)],'dT':_0x278344(+_0x503683[_0x15b358(0x210)])[_0x15b358(0x1fe)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x503683[_0x15b358(0x1e3)]};}else{const _0x182fb0={'memberId':_0x1d1c68,'unitId':_0x58eb68,'content':_0x59ef87,'mention':_0x425109},_0x5b2e0d=await this[_0x15b358(0x1d5)][_0x15b358(0x21f)](_0x15b358(0x225)+_0x58eb68+_0x15b358(0x20f),{'body':_0x182fb0});return X(_0x5b2e0d[_0x15b358(0x1da)][_0x15b358(0x1dd)],_0x273330);}}async['updateComment'](_0x3a1371){const _0x2398b8=_0x111ef8;var _0x3c0faf,_0x362a88;const {text:_0x2eb221,unitId:_0x3643a7}=_0x3a1371,_0xfebe97=(_0x362a88=(_0x3c0faf=_0x2eb221[_0x2398b8(0x204)])==null?void 0x0:_0x3c0faf[_0x2398b8(0x227)](_0x3d2d26=>_0x3d2d26[_0x2398b8(0x1ce)]===_0x100cd8[_0x2398b8(0x1e4)])[_0x2398b8(0x1ef)](_0x28e065=>_0x28e065[_0x2398b8(0x207)]))!=null?_0x362a88:[],_0x435d48=JSON['stringify'](_0x2eb221),_0x224642=_0x3a1371[_0x2398b8(0x203)],_0x213a62=_0x3a1371['id'],_0x25eeec={'memberId':(await this[_0x2398b8(0x222)][_0x2398b8(0x20a)](_0x3643a7))[_0x2398b8(0x1d4)](),'unitId':_0x3643a7,'threadId':_0x224642,'mention':_0xfebe97,'content':_0x435d48,'replyId':_0x213a62},_0x3250fd=await this[_0x2398b8(0x1d5)][_0x2398b8(0x21f)](_0x2398b8(0x225)+_0x3643a7+_0x2398b8(0x1ed),{'body':_0x25eeec});return!_0x3250fd[_0x2398b8(0x1da)][_0x2398b8(0x200)]||_0x3250fd[_0x2398b8(0x1da)][_0x2398b8(0x200)][_0x2398b8(0x1e5)]===0x1;}async['resolveComment'](_0xb7d56){const _0x45724a=_0x111ef8,{unitId:_0x3aaf3b}=_0xb7d56,_0x6a0350=_0xb7d56[_0x45724a(0x203)],_0x5c0e69={'memberId':this['_userService'][_0x45724a(0x21b)]()[_0x45724a(0x21c)],'unitId':_0x3aaf3b,'threadId':_0x6a0350,'solved':_0xb7d56['resolved']?I[_0x45724a(0x20b)]:I[_0x45724a(0x1e7)]},_0x1922a5=await this[_0x45724a(0x1d5)][_0x45724a(0x21f)](_0x45724a(0x225)+_0x3aaf3b+_0x45724a(0x1ec),{'body':_0x5c0e69});return!_0x1922a5[_0x45724a(0x1da)]['error']||_0x1922a5[_0x45724a(0x1da)][_0x45724a(0x200)][_0x45724a(0x1e5)]===0x1;}async['deleteComment'](_0xc1b93a,_0x30bb9e,_0x51b8a8,_0x56b8fb){const _0x461203=_0x111ef8,_0x133fab={'memberId':(await this[_0x461203(0x222)][_0x461203(0x20a)](_0xc1b93a))['getMemberID'](),'threadId':_0x51b8a8,'replyId':_0x56b8fb,'unitId':_0xc1b93a},_0x3f17c2=await this[_0x461203(0x1d5)][_0x461203(0x21f)](_0x461203(0x225)+_0xc1b93a+_0x461203(0x1ca),{'body':_0x133fab});return!_0x3f17c2[_0x461203(0x1da)][_0x461203(0x200)]||_0x3f17c2['body']['error'][_0x461203(0x1e5)]===0x1;}async[_0x111ef8(0x1ea)](_0x4169fa,_0x3164e1,_0x23f41d){const _0x55a2b1=_0x111ef8,_0x58b48b={'unitId':_0x4169fa,'threadId':_0x23f41d},_0x3ce209=await this[_0x55a2b1(0x1d5)][_0x55a2b1(0x21f)]('/universer-api/comment/unit/'+_0x4169fa+'/list',{'body':_0x58b48b}),_0x493be7=_0x23f41d['map'](_0x341007=>ee(_0x3ce209[_0x55a2b1(0x1da)][_0x55a2b1(0x1c6)][_0x341007],_0x4169fa,_0x3164e1))['filter'](Boolean);return Object[_0x55a2b1(0x221)](_0x3ce209[_0x55a2b1(0x1da)][_0x55a2b1(0x206)])[_0x55a2b1(0x223)](_0xf3d8b7=>{const _0x20c109=_0x55a2b1;this['_userService'][_0x20c109(0x1dc)](_0xf3d8b7);}),_0x493be7;}[_0x111ef8(0x1c9)](_0x5ca25a){const _0x25fefc=_0x111ef8;return{'id':_0x5ca25a['id'],'threadId':_0x5ca25a[_0x25fefc(0x203)],'ref':_0x5ca25a[_0x25fefc(0x1e0)]};}};function _0x4c95(){const _0x4290fa=['replies','values','_sessionService','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/universer-api/comment/unit/','/reply','filter','4424KfPshZ','stringify','root','845780jvwbmv','comments','find','replyId','saveCommentToSnapshot','/delete','length','content','getOwnPropertyDescriptor','rangeType','_init','_configService','1591816gKwQMm','/universer-api/user/list','_threadCommentModel','getMemberID','_httpService','commentUpdate$','personId','_threadCommentDataSourceService','Add','body','resolveComment','addUser','comment','updateComment','Unknown','ref','onReady','_injector','userId','COMMENT','code','UNRECOGNIZED','OpenOrReOpen','addComment','_initUserSync','listComments','_threadCommentDataSource','/solved','/edit','1505655lQGtmY','map','thread-comment-data-source.config','UNIVER_UNKNOWN','20wctKMj','size','setConfig','2708515NbcPHg','disposeWithMe','Edit','type','pipe','parse','568077QhsJoS','6FVRGvE','Solve','format','564prVAdL','error','YYYY/MM/DD\x20HH:mm','pluginName','threadId','customRanges','syncUpdateMutationToColla','users','rangeId','Reply','subscribe','requireSession','Solved','_userService','_commentService','deleteComment','/add','createTimestamp','628061FhHAoV','_config','onStarting','solved','parentId','get','_initDataSource','symbol','unitId','slice','getCurrentUser','userID','Delete','user','post'];_0x4c95=function(){return _0x4290fa;};return _0x4c95();}f=Q([_(0x0,_0x3e7a72(_0x1ca467)),_(0x1,_0x3e7a72(_0x3c56b0)),_(0x2,_0x3e7a72(_0x4162e7)),_(0x3,_0x3e7a72(_0x1656f9))],f);var re=Object[_0x111ef8(0x1cd)],te=(_0x531035,_0x3cb60c,_0x392826,_0x486a33)=>{const _0x399c90=_0x111ef8;for(var _0x106ed4=_0x486a33>0x1?void 0x0:_0x486a33?re(_0x3cb60c,_0x392826):_0x3cb60c,_0x1d5614=_0x531035[_0x399c90(0x1cb)]-0x1,_0x5e49f8;_0x1d5614>=0x0;_0x1d5614--)(_0x5e49f8=_0x531035[_0x1d5614])&&(_0x106ed4=_0x5e49f8(_0x106ed4)||_0x106ed4);return _0x106ed4;},N=(_0x471355,_0x4d5444)=>(_0x450bcd,_0x51a63f)=>_0x4d5444(_0x450bcd,_0x51a63f,_0x471355);let g=class extends _0x134f84{constructor(_0x51ef61,_0x4a7ee8){const _0x4fdd3b=_0x111ef8;super(),this['_threadCommentDataSourceService']=_0x51ef61,this[_0x4fdd3b(0x1eb)]=_0x4a7ee8,this[_0x4fdd3b(0x217)]();}['_initDataSource'](){const _0x27fe4a=_0x111ef8;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x27fe4a(0x1d8)][_0x27fe4a(0x205)]=!0x1;}};g=te([N(0x0,_0x5da8fd),N(0x1,_0x3e7a72(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x512085,_0x37742d,_0x1020e0)=>_0x37742d in _0x512085?se(_0x512085,_0x37742d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1020e0}):_0x512085[_0x37742d]=_0x1020e0,ie=(_0x5eb41d,_0x50898e,_0x4a56d7,_0x3fe97e)=>{const _0x219ac7=_0x111ef8;for(var _0x3b8bc3=_0x3fe97e>0x1?void 0x0:_0x3fe97e?oe(_0x50898e,_0x4a56d7):_0x50898e,_0xdef0ab=_0x5eb41d[_0x219ac7(0x1cb)]-0x1,_0x7c5a64;_0xdef0ab>=0x0;_0xdef0ab--)(_0x7c5a64=_0x5eb41d[_0xdef0ab])&&(_0x3b8bc3=_0x7c5a64(_0x3b8bc3)||_0x3b8bc3);return _0x3b8bc3;},w=(_0x5ee6b4,_0x507f8e)=>(_0x53bde2,_0x1df0e1)=>_0x507f8e(_0x53bde2,_0x1df0e1,_0x5ee6b4),$=(_0x582341,_0x490a39,_0x225d3f)=>ne(_0x582341,typeof _0x490a39!=_0x111ef8(0x218)?_0x490a39+'':_0x490a39,_0x225d3f);let b=class extends _0x56df68{constructor(_0x4bc582=M,_0x2d720c,_0x3060a1){const _0x59f52b=_0x111ef8;super(),this['_config']=_0x4bc582,this[_0x59f52b(0x1e2)]=_0x2d720c,this[_0x59f52b(0x1d0)]=_0x3060a1;const {..._0x328a3b}=_0x4b99cf({},M,this[_0x59f52b(0x212)]);this[_0x59f52b(0x1d0)][_0x59f52b(0x1f4)](z,_0x328a3b);}[_0x111ef8(0x213)](){const _0x5dd82a=_0x111ef8;[[f],[g],[S]][_0x5dd82a(0x223)](_0x2df023=>{const _0x44ef65=_0x5dd82a;this[_0x44ef65(0x1e2)]['add'](_0x2df023);});}[_0x111ef8(0x1e1)](){const _0x5e096d=_0x111ef8;this[_0x5e096d(0x1e2)][_0x5e096d(0x216)](g),this[_0x5e096d(0x1e2)]['get'](S);}};$(b,_0x111ef8(0x202),W),$(b,_0x111ef8(0x1f8),_0xf3ca23[_0x111ef8(0x1f1)]),b=ie([_0x5df789(_0x26e11c,_0x1b522a,_0x474023),w(0x1,_0x3e7a72(_0x1656f9)),w(0x2,_0x2ace32)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x5d47f7=_0x224b;(function(_0x34b563,_0x5d1c36){const _0x2a423f=_0x224b,_0x4ce73e=_0x34b563();while(!![]){try{const _0x130ba2=-parseInt(_0x2a423f(0x1c8))/0x1+-parseInt(_0x2a423f(0x1c7))/0x2+parseInt(_0x2a423f(0x1fc))/0x3+parseInt(_0x2a423f(0x221))/0x4*(-parseInt(_0x2a423f(0x1d6))/0x5)+parseInt(_0x2a423f(0x1f9))/0x6+-parseInt(_0x2a423f(0x200))/0x7*(-parseInt(_0x2a423f(0x1fe))/0x8)+parseInt(_0x2a423f(0x1e4))/0x9*(parseInt(_0x2a423f(0x1c0))/0xa);if(_0x130ba2===_0x5d1c36)break;else _0x4ce73e['push'](_0x4ce73e['shift']());}catch(_0x2d12d8){_0x4ce73e['push'](_0x4ce73e['shift']());}}}(_0x4a97,0x63c31));import{CommentService as _0x5b5cb2,CollaborationSessionService as _0xff52e3,UniverCollaborationClientPlugin as _0x31a28b}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x104cb6}from'@univerjs-pro/license';import{dayjs as _0x4892bc,UserManagerService as _0x4ec60f,Inject as _0x485985,Injector as _0x17ace1,Disposable as _0x3e4cea,CustomRangeType as _0x5108c3,UniverInstanceType as _0x5d649f,DependentOn as _0x5d59fb,IConfigService as _0x253407,Plugin as _0x28570a,merge as _0x43a2d8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x22014a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x508dd5,IThreadCommentDataSourceService as _0x596221}from'@univerjs/thread-comment';import{bufferTime as _0x38892e}from'rxjs';import{HTTPService as _0x166e15}from'@univerjs/network';const W=_0x5d47f7(0x205);var I=(_0x2ad048=>(_0x2ad048[_0x2ad048[_0x5d47f7(0x1e0)]=0x0]=_0x5d47f7(0x1e0),_0x2ad048[_0x2ad048['Solved']=0x1]=_0x5d47f7(0x1f5),_0x2ad048[_0x2ad048[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x2ad048))(I||{}),v=(_0x5893ba=>(_0x5893ba[_0x5893ba['Unknown']=0x0]=_0x5d47f7(0x21e),_0x5893ba[_0x5893ba[_0x5d47f7(0x216)]=0x1]=_0x5d47f7(0x216),_0x5893ba[_0x5893ba[_0x5d47f7(0x20d)]=0x2]=_0x5d47f7(0x20d),_0x5893ba[_0x5893ba[_0x5d47f7(0x1c1)]=0x3]='Edit',_0x5893ba[_0x5893ba[_0x5d47f7(0x1bc)]=0x4]=_0x5d47f7(0x1bc),_0x5893ba[_0x5893ba['Solve']=0x5]=_0x5d47f7(0x1e8),_0x5893ba[_0x5893ba[_0x5d47f7(0x1d7)]=-0x1]=_0x5d47f7(0x1d7),_0x5893ba))(v||{});const D=_0xff3b01=>_0x4892bc(new Date(+_0xff3b01))[_0x5d47f7(0x1e6)](_0x5d47f7(0x1dd)),B=async(_0x18f1c4,_0x31ff46)=>{const _0x196e9e=_0x5d47f7,_0x3b0438=_0x18f1c4[_0x196e9e(0x206)](_0x4ec60f),_0x4256a7=_0x18f1c4[_0x196e9e(0x206)](_0x166e15);_0x31ff46[_0x196e9e(0x20a)](_0x2a8250=>{const _0xd01244=_0x196e9e;_0x3b0438[_0xd01244(0x1ef)](_0x2a8250)&&_0x31ff46['delete'](_0x2a8250);}),_0x31ff46[_0x196e9e(0x1ee)]&&(await _0x4256a7[_0x196e9e(0x206)](_0x196e9e(0x1f3),{'params':{'userIDs':[..._0x31ff46]}}))['body'][_0x196e9e(0x1de)]['forEach'](_0x3142f3=>{const _0x409850=_0x196e9e;_0x3142f3&&_0x3b0438[_0x409850(0x1d4)](_0x3142f3);});};var K=Object[_0x5d47f7(0x219)],V=(_0xe8b149,_0x27a239,_0x13da1c,_0x317ce8)=>{const _0x478706=_0x5d47f7;for(var _0x32e9db=_0x317ce8>0x1?void 0x0:_0x317ce8?K(_0x27a239,_0x13da1c):_0x27a239,_0x294f8c=_0xe8b149[_0x478706(0x1cc)]-0x1,_0x7c295b;_0x294f8c>=0x0;_0x294f8c--)(_0x7c295b=_0xe8b149[_0x294f8c])&&(_0x32e9db=_0x7c295b(_0x32e9db)||_0x32e9db);return _0x32e9db;},p=(_0x3e0ac1,_0x517b08)=>(_0x4e2493,_0x4c3d0a)=>_0x517b08(_0x4e2493,_0x4c3d0a,_0x3e0ac1);let S=class extends _0x3e4cea{constructor(_0x18558d,_0x46a022,_0x7ffe0f,_0x241782){const _0x2ad117=_0x5d47f7;super(),this[_0x2ad117(0x20e)]=_0x18558d,this[_0x2ad117(0x1c3)]=_0x46a022,this[_0x2ad117(0x1f4)]=_0x7ffe0f,this['_injector']=_0x241782,this[_0x2ad117(0x1f8)](),this[_0x2ad117(0x1e3)]();}[_0x5d47f7(0x1e3)](){const _0x389ee9=_0x5d47f7;this[_0x389ee9(0x21b)](this[_0x389ee9(0x1c3)][_0x389ee9(0x1dc)][_0x389ee9(0x211)](_0x38892e(0x10))[_0x389ee9(0x1cb)](_0x28e391=>{const _0x45d5e0=_0x389ee9,_0x588aa5=new Set();_0x28e391['forEach'](_0x2b74e8=>{const _0x2160b3=_0x224b;switch(_0x2b74e8['type']){case _0x2160b3(0x1bb):{const _0x9db2fb=_0x2b74e8[_0x2160b3(0x1ce)][_0x2160b3(0x213)];_0x588aa5[_0x2160b3(0x1bb)](_0x9db2fb);break;}}}),B(this[_0x45d5e0(0x1cd)],_0x588aa5);}));}[_0x5d47f7(0x1f8)](){const _0x43610f=_0x5d47f7;this[_0x43610f(0x21b)](this['_commentService']['commentUpdate$'][_0x43610f(0x1cb)](async _0xd954c1=>{const _0xea04b6=_0x43610f;var _0x2f3c75,_0x11a35b,_0x43385b,_0x3b40c3;const _0x4c3d57=(_0x2f3c75=this['_threadCommentModel']['getUnit'](_0xd954c1[_0xea04b6(0x1c2)])['find'](_0x13cd3d=>_0x13cd3d[_0xea04b6(0x1f2)]===_0xd954c1['threadId']))==null?void 0x0:_0x2f3c75[_0xea04b6(0x1c6)];if(!_0x4c3d57)return;const {unitId:_0x4d4990,subUnitId:_0x31a111}=_0x4c3d57;switch(_0xd954c1[_0xea04b6(0x1fb)]&&this['_userService'][_0xea04b6(0x1d4)](_0xd954c1['user']),_0xd954c1['type']){case v[_0xea04b6(0x216)]:break;case v[_0xea04b6(0x20d)]:{this[_0xea04b6(0x1c3)][_0xea04b6(0x1d2)](_0x4d4990,_0x31a111,{'unitId':_0x4d4990,'subUnitId':_0x31a111,'ref':'','id':_0xd954c1[_0xea04b6(0x1da)],'dT':D(+_0xd954c1[_0xea04b6(0x1ec)]),'threadId':_0xd954c1[_0xea04b6(0x1f2)],'personId':(_0x43385b=(_0x11a35b=_0xd954c1[_0xea04b6(0x1fb)])==null?void 0x0:_0x11a35b[_0xea04b6(0x212)])!=null?_0x43385b:_0xd954c1['userId'],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content']),'parentId':_0x4c3d57['id']});break;}case v[_0xea04b6(0x1bc)]:{const _0x25a717=this[_0xea04b6(0x1c3)][_0xea04b6(0x1c9)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);_0x25a717&&_0x25a717[_0xea04b6(0x21f)]&&this[_0xea04b6(0x1c3)][_0xea04b6(0x1f6)](_0x4d4990,_0x31a111,_0xd954c1['replyId']);break;}case v[_0xea04b6(0x1c1)]:{this[_0xea04b6(0x1c3)]['updateComment'](_0x4d4990,_0x31a111,{'commentId':_0xd954c1[_0xea04b6(0x1da)],'text':JSON[_0xea04b6(0x1d9)](_0xd954c1['content'])});break;}case v[_0xea04b6(0x1e8)]:{const _0xc9187=(_0x3b40c3=this[_0xea04b6(0x1c3)][_0xea04b6(0x1ea)](_0xd954c1['unitId'])[_0xea04b6(0x207)](_0x2f12ec=>_0x2f12ec[_0xea04b6(0x1f2)]===_0xd954c1[_0xea04b6(0x1f2)]))==null?void 0x0:_0x3b40c3[_0xea04b6(0x1c6)];_0xc9187&&this[_0xea04b6(0x1c3)][_0xea04b6(0x202)](_0x4d4990,_0x31a111,_0xc9187['id'],_0xd954c1['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x485985(_0x5b5cb2)),p(0x1,_0x485985(_0x508dd5)),p(0x2,_0x485985(_0x4ec60f)),p(0x3,_0x485985(_0x17ace1))],S);const z=_0x5d47f7(0x1ca),M={};var k=Object[_0x5d47f7(0x219)],Q=(_0x2fa068,_0x31385a,_0x47307f,_0x1cb765)=>{const _0x168d28=_0x5d47f7;for(var _0x49129c=_0x1cb765>0x1?void 0x0:_0x1cb765?k(_0x31385a,_0x47307f):_0x31385a,_0x1127c9=_0x2fa068[_0x168d28(0x1cc)]-0x1,_0x364bf5;_0x1127c9>=0x0;_0x1127c9--)(_0x364bf5=_0x2fa068[_0x1127c9])&&(_0x49129c=_0x364bf5(_0x49129c)||_0x49129c);return _0x49129c;},_=(_0x202aea,_0x19ed85)=>(_0x58949b,_0x580c04)=>_0x19ed85(_0x58949b,_0x580c04,_0x202aea);function _0x4a97(){const _0x23bda0=['setConfig','requireSession','listComments','70yCuEHH','Edit','unitId','_threadCommentModel','rangeId','_config','root','1489384LJXPSo','743096EoCseq','getComment','thread-comment-data-source.config','subscribe','length','_injector','payload','_configService','code','COMMENT','addComment','error','addUser','dataSource','8815uzAPHn','UNRECOGNIZED','_threadCommentDataSource','parse','replyId','symbol','commentUpdate$','YYYY/MM/DD\x20HH:mm','users','solved','OpenOrReOpen','getMemberID','UNIVER_UNKNOWN','_initUserSync','1422585MeTzuE','defineProperty','format','userId','Solve','values','getUnit','map','createTimestamp','_httpService','size','getUser','filter','syncUpdateMutationToColla','threadId','/universer-api/user/list','_userService','Solved','deleteComment','rangeType','_init','2356656YijQem','saveCommentToSnapshot','user','1963389OFDTFN','/delete','16rVwNjf','content','808745NVGwig','/solved','resolveComment','pluginName','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','find','/edit','type','forEach','_sessionService','customRanges','Reply','_commentService','/reply','/universer-api/comment/unit/','pipe','userID','personId','ref','resolved','Add','/list','stringify','getOwnPropertyDescriptor','replies','disposeWithMe','post','_threadCommentDataSourceService','Unknown','parentId','/add','1108oisWBF','body','add','Delete'];_0x4a97=function(){return _0x23bda0;};return _0x4a97();}function X(_0x2853ff,_0x4efc93){const _0x39877e=_0x5d47f7,_0x1ad1dd=_0x2853ff[_0x39877e(0x21a)][0x0];return{..._0x4efc93,'id':_0x1ad1dd[_0x39877e(0x1da)],'resolved':_0x2853ff[_0x39877e(0x1df)]===0x1,'dT':D(_0x1ad1dd[_0x39877e(0x1ec)]),'personId':_0x1ad1dd[_0x39877e(0x1e7)],'threadId':_0x1ad1dd[_0x39877e(0x1f2)]};}function ee(_0x161cf9,_0x104e35,_0x33390b){const _0x4e3082=_0x5d47f7;var _0x52b2c2,_0x2e7d0c;if(((_0x2e7d0c=(_0x52b2c2=_0x161cf9==null?void 0x0:_0x161cf9[_0x4e3082(0x21a)])==null?void 0x0:_0x52b2c2['length'])!=null?_0x2e7d0c:0x0)>0x0){const _0x5c1f53=(_0x843475,_0xc7a9b5)=>({'id':_0x843475[_0x4e3082(0x1da)],'threadId':_0x843475[_0x4e3082(0x1f2)],'dT':D(_0x843475[_0x4e3082(0x1ec)]),'personId':_0x843475['userId'],'resolved':_0x161cf9[_0x4e3082(0x1df)]===I['Solved'],'unitId':_0x104e35,'subUnitId':_0x33390b,'text':JSON[_0x4e3082(0x1d9)](_0x843475[_0x4e3082(0x1ff)]),'parentId':_0xc7a9b5}),_0xd4ae6f=_0x5c1f53(_0x161cf9[_0x4e3082(0x21a)][0x0]);return{..._0xd4ae6f,'children':_0x161cf9[_0x4e3082(0x21a)]['slice'](0x1)[_0x4e3082(0x1eb)](_0x4108fe=>_0x5c1f53(_0x4108fe,_0xd4ae6f['id']))};}return null;}let f=class{constructor(_0x5f578d,_0x4fd9fe,_0x45f46e,_0x586ae3){const _0x3e06e9=_0x5d47f7;this[_0x3e06e9(0x1ed)]=_0x5f578d,this[_0x3e06e9(0x1f4)]=_0x4fd9fe,this['_sessionService']=_0x45f46e,this[_0x3e06e9(0x1cd)]=_0x586ae3;}async[_0x5d47f7(0x1d2)](_0x517c38){const _0x300896=_0x5d47f7;var _0x1d5f83,_0x2302dc;const {parentId:_0x59487b,unitId:_0x5b6976,text:_0x1d06c8,threadId:_0x515c10}=_0x517c38,_0x14de92=(_0x2302dc=(_0x1d5f83=_0x1d06c8[_0x300896(0x20c)])==null?void 0x0:_0x1d5f83[_0x300896(0x1f0)](_0x57cab6=>_0x57cab6[_0x300896(0x1f7)]===_0x5108c3[_0x300896(0x1d1)])[_0x300896(0x1eb)](_0x2be1de=>_0x2be1de[_0x300896(0x1c4)]))!=null?_0x2302dc:[],_0x2a1650=JSON[_0x300896(0x218)](_0x1d06c8),_0x50a64d=(await this[_0x300896(0x20b)][_0x300896(0x1be)](_0x5b6976))[_0x300896(0x1e1)]();if(_0x59487b){const _0xfa2b35={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92,'threadId':_0x515c10},_0x1bb879=(await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x20f),{'body':_0xfa2b35}))[_0x300896(0x222)]['reply'];return{..._0x517c38,'id':_0x1bb879['replyId'],'dT':_0x4892bc(+_0x1bb879[_0x300896(0x1ec)])[_0x300896(0x1e6)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x1bb879[_0x300896(0x1e7)]};}else{const _0x230492={'memberId':_0x50a64d,'unitId':_0x5b6976,'content':_0x2a1650,'mention':_0x14de92},_0x4593bc=await this[_0x300896(0x1ed)][_0x300896(0x21c)](_0x300896(0x210)+_0x5b6976+_0x300896(0x220),{'body':_0x230492});return X(_0x4593bc[_0x300896(0x222)]['comment'],_0x517c38);}}async['updateComment'](_0x1d667a){const _0xe37e36=_0x5d47f7;var _0x2152b5,_0x25abb1;const {text:_0x4d99a3,unitId:_0x57573e}=_0x1d667a,_0x2c8c74=(_0x25abb1=(_0x2152b5=_0x4d99a3[_0xe37e36(0x20c)])==null?void 0x0:_0x2152b5[_0xe37e36(0x1f0)](_0xf05851=>_0xf05851[_0xe37e36(0x1f7)]===_0x5108c3[_0xe37e36(0x1d1)])[_0xe37e36(0x1eb)](_0x287918=>_0x287918[_0xe37e36(0x1c4)]))!=null?_0x25abb1:[],_0x3be6e3=JSON[_0xe37e36(0x218)](_0x4d99a3),_0x314092=_0x1d667a[_0xe37e36(0x1f2)],_0x40d215=_0x1d667a['id'],_0x3da70f={'memberId':(await this[_0xe37e36(0x20b)]['requireSession'](_0x57573e))[_0xe37e36(0x1e1)](),'unitId':_0x57573e,'threadId':_0x314092,'mention':_0x2c8c74,'content':_0x3be6e3,'replyId':_0x40d215},_0x2a8f82=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x57573e+_0xe37e36(0x208),{'body':_0x3da70f});return!_0x2a8f82[_0xe37e36(0x222)]['error']||_0x2a8f82[_0xe37e36(0x222)][_0xe37e36(0x1d3)][_0xe37e36(0x1d0)]===0x1;}async['resolveComment'](_0x253ac0){const _0x1f870a=_0x5d47f7,{unitId:_0x4ed73d}=_0x253ac0,_0x4a0286=_0x253ac0[_0x1f870a(0x1f2)],_0x14d47d={'memberId':this[_0x1f870a(0x1f4)]['getCurrentUser']()[_0x1f870a(0x212)],'unitId':_0x4ed73d,'threadId':_0x4a0286,'solved':_0x253ac0[_0x1f870a(0x215)]?I['Solved']:I[_0x1f870a(0x1e0)]},_0x2db48f=await this[_0x1f870a(0x1ed)][_0x1f870a(0x21c)](_0x1f870a(0x210)+_0x4ed73d+_0x1f870a(0x201),{'body':_0x14d47d});return!_0x2db48f['body'][_0x1f870a(0x1d3)]||_0x2db48f[_0x1f870a(0x222)][_0x1f870a(0x1d3)][_0x1f870a(0x1d0)]===0x1;}async[_0x5d47f7(0x1f6)](_0x59f5c7,_0x69c44a,_0x1d96a0,_0x4d92dc){const _0xb5c3f6=_0x5d47f7,_0x49f40e={'memberId':(await this[_0xb5c3f6(0x20b)][_0xb5c3f6(0x1be)](_0x59f5c7))[_0xb5c3f6(0x1e1)](),'threadId':_0x1d96a0,'replyId':_0x4d92dc,'unitId':_0x59f5c7},_0x167d5e=await this['_httpService'][_0xb5c3f6(0x21c)](_0xb5c3f6(0x210)+_0x59f5c7+_0xb5c3f6(0x1fd),{'body':_0x49f40e});return!_0x167d5e[_0xb5c3f6(0x222)]['error']||_0x167d5e[_0xb5c3f6(0x222)][_0xb5c3f6(0x1d3)][_0xb5c3f6(0x1d0)]===0x1;}async[_0x5d47f7(0x1bf)](_0x43e237,_0x4df04e,_0xda9039){const _0x3615fc=_0x5d47f7,_0x3fcdda={'unitId':_0x43e237,'threadId':_0xda9039},_0x1245d0=await this[_0x3615fc(0x1ed)][_0x3615fc(0x21c)](_0x3615fc(0x210)+_0x43e237+_0x3615fc(0x217),{'body':_0x3fcdda}),_0x4ebe4f=_0xda9039[_0x3615fc(0x1eb)](_0x5aa8b4=>ee(_0x1245d0[_0x3615fc(0x222)][_0x3615fc(0x204)][_0x5aa8b4],_0x43e237,_0x4df04e))[_0x3615fc(0x1f0)](Boolean);return Object[_0x3615fc(0x1e9)](_0x1245d0[_0x3615fc(0x222)]['users'])[_0x3615fc(0x20a)](_0xd59a04=>{const _0x136ac4=_0x3615fc;this[_0x136ac4(0x1f4)]['addUser'](_0xd59a04);}),_0x4ebe4f;}[_0x5d47f7(0x1fa)](_0x140357){const _0x2f3ba3=_0x5d47f7;return{'id':_0x140357['id'],'threadId':_0x140357[_0x2f3ba3(0x1f2)],'ref':_0x140357[_0x2f3ba3(0x214)]};}};f=Q([_(0x0,_0x485985(_0x166e15)),_(0x1,_0x485985(_0x4ec60f)),_(0x2,_0x485985(_0xff52e3)),_(0x3,_0x485985(_0x17ace1))],f);var re=Object[_0x5d47f7(0x219)],te=(_0x350f38,_0x57aaa4,_0x1003f5,_0x442795)=>{for(var _0x44c311=_0x442795>0x1?void 0x0:_0x442795?re(_0x57aaa4,_0x1003f5):_0x57aaa4,_0x363e11=_0x350f38['length']-0x1,_0x41c654;_0x363e11>=0x0;_0x363e11--)(_0x41c654=_0x350f38[_0x363e11])&&(_0x44c311=_0x41c654(_0x44c311)||_0x44c311);return _0x44c311;},N=(_0x1e6260,_0x5d7b47)=>(_0x4caee4,_0x59fb72)=>_0x5d7b47(_0x4caee4,_0x59fb72,_0x1e6260);function _0x224b(_0x1bfbe0,_0x324bfb){const _0x4a975f=_0x4a97();return _0x224b=function(_0x224b7e,_0x1aa131){_0x224b7e=_0x224b7e-0x1bb;let _0x1c5243=_0x4a975f[_0x224b7e];return _0x1c5243;},_0x224b(_0x1bfbe0,_0x324bfb);}let g=class extends _0x3e4cea{constructor(_0x32c99c,_0xa2b5c3){const _0x2cb612=_0x5d47f7;super(),this['_threadCommentDataSourceService']=_0x32c99c,this[_0x2cb612(0x1d8)]=_0xa2b5c3,this['_initDataSource']();}['_initDataSource'](){const _0x301852=_0x5d47f7;this[_0x301852(0x21d)][_0x301852(0x1d5)]=this[_0x301852(0x1d8)],this[_0x301852(0x21d)][_0x301852(0x1f1)]=!0x1;}};g=te([N(0x0,_0x596221),N(0x1,_0x485985(f))],g);var se=Object[_0x5d47f7(0x1e5)],oe=Object[_0x5d47f7(0x219)],ne=(_0x667073,_0x4b235e,_0x3f9984)=>_0x4b235e in _0x667073?se(_0x667073,_0x4b235e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f9984}):_0x667073[_0x4b235e]=_0x3f9984,ie=(_0x3a53f7,_0x2f87f1,_0x1065a5,_0x4e2ab)=>{const _0x2cc0ff=_0x5d47f7;for(var _0xb72658=_0x4e2ab>0x1?void 0x0:_0x4e2ab?oe(_0x2f87f1,_0x1065a5):_0x2f87f1,_0x531771=_0x3a53f7[_0x2cc0ff(0x1cc)]-0x1,_0x549758;_0x531771>=0x0;_0x531771--)(_0x549758=_0x3a53f7[_0x531771])&&(_0xb72658=_0x549758(_0xb72658)||_0xb72658);return _0xb72658;},w=(_0x77fef1,_0x2e63b6)=>(_0x4a806f,_0x3e6a5b)=>_0x2e63b6(_0x4a806f,_0x3e6a5b,_0x77fef1),$=(_0x37545b,_0x33f974,_0x59e734)=>ne(_0x37545b,typeof _0x33f974!=_0x5d47f7(0x1db)?_0x33f974+'':_0x33f974,_0x59e734);let b=class extends _0x28570a{constructor(_0x924144=M,_0x3994e0,_0x366957){const _0x1c068d=_0x5d47f7;super(),this[_0x1c068d(0x1c5)]=_0x924144,this[_0x1c068d(0x1cd)]=_0x3994e0,this['_configService']=_0x366957;const {..._0x4d7eef}=_0x43a2d8({},M,this[_0x1c068d(0x1c5)]);this[_0x1c068d(0x1cf)][_0x1c068d(0x1bd)](z,_0x4d7eef);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x116fd0=>{const _0x37d78d=_0x224b;this[_0x37d78d(0x1cd)][_0x37d78d(0x1bb)](_0x116fd0);});}['onReady'](){const _0x4ba9b8=_0x5d47f7;this[_0x4ba9b8(0x1cd)]['get'](g),this[_0x4ba9b8(0x1cd)][_0x4ba9b8(0x206)](S);}};$(b,_0x5d47f7(0x203),W),$(b,_0x5d47f7(0x209),_0x5d649f[_0x5d47f7(0x1e2)]),b=ie([_0x5d59fb(_0x22014a,_0x31a28b,_0x104cb6),w(0x1,_0x485985(_0x17ace1)),w(0x2,_0x253407)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x77b1(_0x4ceee9,_0x51e7b6){const _0x327209=_0x3272();return _0x77b1=function(_0x77b1e3,_0x3f1675){_0x77b1e3=_0x77b1e3-0x1ec;let _0x9a744f=_0x327209[_0x77b1e3];return _0x9a744f;},_0x77b1(_0x4ceee9,_0x51e7b6);}function _0x3272(){const _0x202b9e=['Delete','YYYY/MM/DD\x20HH:mm','Solved','13mPhMgt','60pAcuQw','@univerjs-pro/license','HTTPService','pluginName','Add','Unknown','merge','@univerjs/thread-comment-ui','_injector','dayjs','CustomRangeType','syncUpdateMutationToColla','44753748NHwTRb','_threadCommentDataSource','@univerjs/network','rangeType','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','5238793IOIJHQ','pipe','@univerjs-pro/collaboration-client','_sessionService','UniverThreadCommentUi','COMMENT','stringify','slice','_config','user','/universer-api/comment/unit/','values','/edit','40678eJkRVg','UniverThreadCommentUIPlugin','parse','UNRECOGNIZED','_httpService','userId','body','UniverInstanceType','_configService','listComments','getOwnPropertyDescriptor','/add','CommentService','type','content','saveCommentToSnapshot','rangeId','map','48ZojqCX','6103732hQyqKp','requireSession','addUser','ref','function','Inject','_init','post','code','replies','reply','subscribe','/list','Edit','UniverCore','@univerjs/core','format','payload','customRanges','replyId','Module','_initUserSync','forEach','root','Plugin','OpenOrReOpen','updateComment','resolveComment','add','error','UniverProCollaborationClient','object','createTimestamp','symbol','getUnit','get','Disposable','bufferTime','personId','disposeWithMe','UniverThreadComment','1118277DGAjMv','UNIVER_UNKNOWN','UniverThreadCommentDataSourcePlugin','length','_userService','resolved','rxjs','UniverProLicense','268885eLKFwI','ThreadCommentModel','unitId','_threadCommentModel','928FwvMdG','defineProperty','Reply','_initDataSource','solved','UserManagerService','getMemberID','getUser','_threadCommentDataSourceService','addComment','exports','filter','threadId','_commentService','4220kXMqFS','Solve','commentUpdate$','comments','3BCSfvC','users','757anVBKp','Injector','DependentOn'];_0x3272=function(){return _0x202b9e;};return _0x3272();}(function(_0x217b32,_0x418d73){const _0x52ca72=_0x77b1,_0xee889=_0x217b32();while(!![]){try{const _0x4b360b=-parseInt(_0x52ca72(0x235))/0x1*(parseInt(_0x52ca72(0x221))/0x2)+parseInt(_0x52ca72(0x233))/0x3*(-parseInt(_0x52ca72(0x1ec))/0x4)+parseInt(_0x52ca72(0x21d))/0x5*(parseInt(_0x52ca72(0x23c))/0x6)+-parseInt(_0x52ca72(0x24d))/0x7+parseInt(_0x52ca72(0x26c))/0x8*(parseInt(_0x52ca72(0x215))/0x9)+-parseInt(_0x52ca72(0x22f))/0xa*(parseInt(_0x52ca72(0x25a))/0xb)+-parseInt(_0x52ca72(0x248))/0xc*(-parseInt(_0x52ca72(0x23b))/0xd);if(_0x4b360b===_0x418d73)break;else _0xee889['push'](_0xee889['shift']());}catch(_0x5cb045){_0xee889['push'](_0xee889['shift']());}}}(_0x3272,0xc9d07),function(_0x112ae2,_0x53b637){const _0x5c7a97=_0x77b1;typeof exports==_0x5c7a97(0x20b)&&typeof module<'u'?_0x53b637(exports,require(_0x5c7a97(0x24f)),require(_0x5c7a97(0x23d)),require(_0x5c7a97(0x1fb)),require(_0x5c7a97(0x243)),require('@univerjs/thread-comment'),require('rxjs'),require(_0x5c7a97(0x24a))):typeof define==_0x5c7a97(0x1f0)&&define['amd']?define([_0x5c7a97(0x22b),'@univerjs-pro/collaboration-client',_0x5c7a97(0x23d),_0x5c7a97(0x1fb),_0x5c7a97(0x243),'@univerjs/thread-comment',_0x5c7a97(0x21b),_0x5c7a97(0x24a)],_0x53b637):(_0x112ae2=typeof globalThis<'u'?globalThis:_0x112ae2||self,_0x53b637(_0x112ae2['UniverProThreadCommentDatasource']={},_0x112ae2[_0x5c7a97(0x20a)],_0x112ae2[_0x5c7a97(0x21c)],_0x112ae2[_0x5c7a97(0x1fa)],_0x112ae2[_0x5c7a97(0x251)],_0x112ae2[_0x5c7a97(0x214)],_0x112ae2[_0x5c7a97(0x21b)],_0x112ae2['UniverNetwork']));}(this,function(_0x54b163,_0x47842b,_0x81ce2f,_0x54db0d,_0xcff9f3,_0x84266c,_0x435890,_0x39c981){'use strict';const _0x467ed1=_0x77b1;const _0x2f27b1=_0x467ed1(0x24c);var _0x567e8b=(_0x10dce9=>(_0x10dce9[_0x10dce9['OpenOrReOpen']=0x0]=_0x467ed1(0x205),_0x10dce9[_0x10dce9[_0x467ed1(0x23a)]=0x1]=_0x467ed1(0x23a),_0x10dce9[_0x10dce9['UNRECOGNIZED']=-0x1]=_0x467ed1(0x25d),_0x10dce9))(_0x567e8b||{}),_0x1b60e4=(_0x15dac1=>(_0x15dac1[_0x15dac1[_0x467ed1(0x241)]=0x0]=_0x467ed1(0x241),_0x15dac1[_0x15dac1['Add']=0x1]=_0x467ed1(0x240),_0x15dac1[_0x15dac1[_0x467ed1(0x223)]=0x2]=_0x467ed1(0x223),_0x15dac1[_0x15dac1[_0x467ed1(0x1f9)]=0x3]=_0x467ed1(0x1f9),_0x15dac1[_0x15dac1[_0x467ed1(0x238)]=0x4]=_0x467ed1(0x238),_0x15dac1[_0x15dac1['Solve']=0x5]='Solve',_0x15dac1[_0x15dac1[_0x467ed1(0x25d)]=-0x1]=_0x467ed1(0x25d),_0x15dac1))(_0x1b60e4||{});const _0x2bdfd1=_0x40f879=>_0x54db0d[_0x467ed1(0x245)](new Date(+_0x40f879))[_0x467ed1(0x1fc)](_0x467ed1(0x239)),_0x5018f5=async(_0xe31a37,_0x3e0f01)=>{const _0x10ecf5=_0x467ed1,_0x4c8d1e=_0xe31a37[_0x10ecf5(0x20f)](_0x54db0d[_0x10ecf5(0x226)]),_0xc902d4=_0xe31a37[_0x10ecf5(0x20f)](_0x39c981[_0x10ecf5(0x23e)]);_0x3e0f01[_0x10ecf5(0x202)](_0x36636b=>{const _0x45cae5=_0x10ecf5;_0x4c8d1e[_0x45cae5(0x228)](_0x36636b)&&_0x3e0f01['delete'](_0x36636b);}),_0x3e0f01['size']&&(await _0xc902d4['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x3e0f01]}}))[_0x10ecf5(0x260)][_0x10ecf5(0x234)][_0x10ecf5(0x202)](_0x495237=>{const _0x1e32c5=_0x10ecf5;_0x495237&&_0x4c8d1e[_0x1e32c5(0x1ee)](_0x495237);});};var _0x282aab=Object[_0x467ed1(0x264)],_0x5ebf28=(_0x4ad3a3,_0x1bec1f,_0x3cbaf3,_0x244e34)=>{for(var _0x2d9f08=_0x244e34>0x1?void 0x0:_0x244e34?_0x282aab(_0x1bec1f,_0x3cbaf3):_0x1bec1f,_0x8a5945=_0x4ad3a3['length']-0x1,_0x5f2c53;_0x8a5945>=0x0;_0x8a5945--)(_0x5f2c53=_0x4ad3a3[_0x8a5945])&&(_0x2d9f08=_0x5f2c53(_0x2d9f08)||_0x2d9f08);return _0x2d9f08;},_0x56c63f=(_0x45a91e,_0x59bde1)=>(_0xf5e47e,_0x165ed5)=>_0x59bde1(_0xf5e47e,_0x165ed5,_0x45a91e);let _0x306ddd=class extends _0x54db0d[_0x467ed1(0x210)]{constructor(_0x59cdd1,_0x237ed2,_0x2c8d45,_0x3ef57b){const _0x22ecd6=_0x467ed1;super(),this['_commentService']=_0x59cdd1,this[_0x22ecd6(0x220)]=_0x237ed2,this[_0x22ecd6(0x219)]=_0x2c8d45,this['_injector']=_0x3ef57b,this['_init'](),this[_0x22ecd6(0x201)]();}[_0x467ed1(0x201)](){const _0x130dec=_0x467ed1;this[_0x130dec(0x213)](this['_threadCommentModel'][_0x130dec(0x231)][_0x130dec(0x24e)](_0x435890[_0x130dec(0x211)](0x10))['subscribe'](_0x5691b3=>{const _0x1b3004=_0x130dec,_0x2953e1=new Set();_0x5691b3['forEach'](_0x14f0c7=>{const _0x4ca26b=_0x77b1;switch(_0x14f0c7[_0x4ca26b(0x267)]){case _0x4ca26b(0x208):{const _0x3add56=_0x14f0c7[_0x4ca26b(0x1fd)][_0x4ca26b(0x212)];_0x2953e1[_0x4ca26b(0x208)](_0x3add56);break;}}}),_0x5018f5(this[_0x1b3004(0x244)],_0x2953e1);}));}[_0x467ed1(0x1f2)](){const _0x4cb2f6=_0x467ed1;this[_0x4cb2f6(0x213)](this[_0x4cb2f6(0x22e)][_0x4cb2f6(0x231)][_0x4cb2f6(0x1f7)](async _0x28b2cf=>{const _0x521f14=_0x4cb2f6;var _0x4e232b,_0x42c019,_0x5366db,_0x51eadd;const _0x4e2b78=(_0x4e232b=this[_0x521f14(0x220)][_0x521f14(0x20e)](_0x28b2cf['unitId'])['find'](_0x5914ca=>_0x5914ca[_0x521f14(0x22d)]===_0x28b2cf[_0x521f14(0x22d)]))==null?void 0x0:_0x4e232b[_0x521f14(0x203)];if(!_0x4e2b78)return;const {unitId:_0x125d2a,subUnitId:_0x1fc4fe}=_0x4e2b78;switch(_0x28b2cf[_0x521f14(0x256)]&&this[_0x521f14(0x219)]['addUser'](_0x28b2cf['user']),_0x28b2cf[_0x521f14(0x267)]){case _0x1b60e4[_0x521f14(0x240)]:break;case _0x1b60e4['Reply']:{this[_0x521f14(0x220)][_0x521f14(0x22a)](_0x125d2a,_0x1fc4fe,{'unitId':_0x125d2a,'subUnitId':_0x1fc4fe,'ref':'','id':_0x28b2cf[_0x521f14(0x1ff)],'dT':_0x2bdfd1(+_0x28b2cf[_0x521f14(0x20c)]),'threadId':_0x28b2cf['threadId'],'personId':(_0x5366db=(_0x42c019=_0x28b2cf[_0x521f14(0x256)])==null?void 0x0:_0x42c019['userID'])!=null?_0x5366db:_0x28b2cf[_0x521f14(0x25f)],'text':JSON['parse'](_0x28b2cf[_0x521f14(0x268)]),'parentId':_0x4e2b78['id']});break;}case _0x1b60e4[_0x521f14(0x238)]:{const _0x17de7b=this[_0x521f14(0x220)]['getComment'](_0x125d2a,_0x1fc4fe,_0x28b2cf['replyId']);_0x17de7b&&_0x17de7b['parentId']&&this[_0x521f14(0x220)]['deleteComment'](_0x125d2a,_0x1fc4fe,_0x28b2cf[_0x521f14(0x1ff)]);break;}case _0x1b60e4[_0x521f14(0x1f9)]:{this[_0x521f14(0x220)][_0x521f14(0x206)](_0x125d2a,_0x1fc4fe,{'commentId':_0x28b2cf[_0x521f14(0x1ff)],'text':JSON['parse'](_0x28b2cf[_0x521f14(0x268)])});break;}case _0x1b60e4[_0x521f14(0x230)]:{const _0x440424=(_0x51eadd=this['_threadCommentModel'][_0x521f14(0x20e)](_0x28b2cf[_0x521f14(0x21f)])['find'](_0x511d4e=>_0x511d4e[_0x521f14(0x22d)]===_0x28b2cf[_0x521f14(0x22d)]))==null?void 0x0:_0x51eadd[_0x521f14(0x203)];_0x440424&&this[_0x521f14(0x220)][_0x521f14(0x207)](_0x125d2a,_0x1fc4fe,_0x440424['id'],_0x28b2cf[_0x521f14(0x225)]===_0x567e8b[_0x521f14(0x23a)]);break;}}}));}};_0x306ddd=_0x5ebf28([_0x56c63f(0x0,_0x54db0d[_0x467ed1(0x1f1)](_0x47842b[_0x467ed1(0x266)])),_0x56c63f(0x1,_0x54db0d['Inject'](_0x84266c[_0x467ed1(0x21e)])),_0x56c63f(0x2,_0x54db0d['Inject'](_0x54db0d['UserManagerService'])),_0x56c63f(0x3,_0x54db0d[_0x467ed1(0x1f1)](_0x54db0d[_0x467ed1(0x236)]))],_0x306ddd);const _0x406fae='thread-comment-data-source.config',_0x228d91={};var _0x352e08=Object[_0x467ed1(0x264)],_0x294852=(_0x4bb37d,_0x22bd06,_0x54bc44,_0x43e657)=>{for(var _0x12451c=_0x43e657>0x1?void 0x0:_0x43e657?_0x352e08(_0x22bd06,_0x54bc44):_0x22bd06,_0x5f4e28=_0x4bb37d['length']-0x1,_0x2f087d;_0x5f4e28>=0x0;_0x5f4e28--)(_0x2f087d=_0x4bb37d[_0x5f4e28])&&(_0x12451c=_0x2f087d(_0x12451c)||_0x12451c);return _0x12451c;},_0x4774f9=(_0x243baf,_0x57f520)=>(_0x53bf4b,_0x15dfc3)=>_0x57f520(_0x53bf4b,_0x15dfc3,_0x243baf);function _0x5c6fd0(_0x323f24,_0x3f57b9){const _0x4a3233=_0x467ed1,_0x357834=_0x323f24[_0x4a3233(0x1f5)][0x0];return{..._0x3f57b9,'id':_0x357834[_0x4a3233(0x1ff)],'resolved':_0x323f24[_0x4a3233(0x225)]===0x1,'dT':_0x2bdfd1(_0x357834[_0x4a3233(0x20c)]),'personId':_0x357834[_0x4a3233(0x25f)],'threadId':_0x357834[_0x4a3233(0x22d)]};}function _0x4646d2(_0x5e986d,_0x4572b8,_0x5a2192){const _0x3902e1=_0x467ed1;var _0xaaa5c3,_0x547338;if(((_0x547338=(_0xaaa5c3=_0x5e986d==null?void 0x0:_0x5e986d['replies'])==null?void 0x0:_0xaaa5c3[_0x3902e1(0x218)])!=null?_0x547338:0x0)>0x0){const _0x4e9d95=(_0x106e44,_0x5cb2bb)=>({'id':_0x106e44[_0x3902e1(0x1ff)],'threadId':_0x106e44[_0x3902e1(0x22d)],'dT':_0x2bdfd1(_0x106e44[_0x3902e1(0x20c)]),'personId':_0x106e44[_0x3902e1(0x25f)],'resolved':_0x5e986d[_0x3902e1(0x225)]===_0x567e8b['Solved'],'unitId':_0x4572b8,'subUnitId':_0x5a2192,'text':JSON[_0x3902e1(0x25c)](_0x106e44[_0x3902e1(0x268)]),'parentId':_0x5cb2bb}),_0xe7dc34=_0x4e9d95(_0x5e986d[_0x3902e1(0x1f5)][0x0]);return{..._0xe7dc34,'children':_0x5e986d[_0x3902e1(0x1f5)][_0x3902e1(0x254)](0x1)[_0x3902e1(0x26b)](_0x4293e5=>_0x4e9d95(_0x4293e5,_0xe7dc34['id']))};}return null;}let _0x32dfdf=class{constructor(_0x2b1207,_0x3fbf60,_0x294ad3,_0x70f85){const _0xc5e2aa=_0x467ed1;this[_0xc5e2aa(0x25e)]=_0x2b1207,this[_0xc5e2aa(0x219)]=_0x3fbf60,this[_0xc5e2aa(0x250)]=_0x294ad3,this[_0xc5e2aa(0x244)]=_0x70f85;}async[_0x467ed1(0x22a)](_0x2c4a02){const _0x3de848=_0x467ed1;var _0x5b1402,_0x5f07a0;const {parentId:_0x1b1b3a,unitId:_0x19a498,text:_0x1fc1aa,threadId:_0x46b1f9}=_0x2c4a02,_0x2aae7e=(_0x5f07a0=(_0x5b1402=_0x1fc1aa[_0x3de848(0x1fe)])==null?void 0x0:_0x5b1402[_0x3de848(0x22c)](_0x42770e=>_0x42770e[_0x3de848(0x24b)]===_0x54db0d[_0x3de848(0x246)]['COMMENT'])['map'](_0x487c12=>_0x487c12[_0x3de848(0x26a)]))!=null?_0x5f07a0:[],_0x29bb2b=JSON['stringify'](_0x1fc1aa),_0x1a48b7=(await this[_0x3de848(0x250)][_0x3de848(0x1ed)](_0x19a498))[_0x3de848(0x227)]();if(_0x1b1b3a){const _0x37e096={'memberId':_0x1a48b7,'unitId':_0x19a498,'content':_0x29bb2b,'mention':_0x2aae7e,'threadId':_0x46b1f9},_0x370ed4=(await this[_0x3de848(0x25e)][_0x3de848(0x1f3)]('/universer-api/comment/unit/'+_0x19a498+'/reply',{'body':_0x37e096}))['body'][_0x3de848(0x1f6)];return{..._0x2c4a02,'id':_0x370ed4['replyId'],'dT':_0x54db0d[_0x3de848(0x245)](+_0x370ed4['createTimestamp'])[_0x3de848(0x1fc)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x370ed4['userId']};}else{const _0x2972e9={'memberId':_0x1a48b7,'unitId':_0x19a498,'content':_0x29bb2b,'mention':_0x2aae7e},_0x2dadfa=await this[_0x3de848(0x25e)][_0x3de848(0x1f3)](_0x3de848(0x257)+_0x19a498+_0x3de848(0x265),{'body':_0x2972e9});return _0x5c6fd0(_0x2dadfa[_0x3de848(0x260)]['comment'],_0x2c4a02);}}async['updateComment'](_0xff286d){const _0x2b22cd=_0x467ed1;var _0x846d36,_0x4c223b;const {text:_0x1088d8,unitId:_0x3141a4}=_0xff286d,_0x5addc2=(_0x4c223b=(_0x846d36=_0x1088d8[_0x2b22cd(0x1fe)])==null?void 0x0:_0x846d36['filter'](_0x2173bb=>_0x2173bb[_0x2b22cd(0x24b)]===_0x54db0d[_0x2b22cd(0x246)][_0x2b22cd(0x252)])['map'](_0xc1f673=>_0xc1f673[_0x2b22cd(0x26a)]))!=null?_0x4c223b:[],_0xc69e9d=JSON[_0x2b22cd(0x253)](_0x1088d8),_0x69e0b4=_0xff286d[_0x2b22cd(0x22d)],_0x5c155d=_0xff286d['id'],_0x3afc5c={'memberId':(await this[_0x2b22cd(0x250)][_0x2b22cd(0x1ed)](_0x3141a4))['getMemberID'](),'unitId':_0x3141a4,'threadId':_0x69e0b4,'mention':_0x5addc2,'content':_0xc69e9d,'replyId':_0x5c155d},_0x1ecd86=await this[_0x2b22cd(0x25e)]['post'](_0x2b22cd(0x257)+_0x3141a4+_0x2b22cd(0x259),{'body':_0x3afc5c});return!_0x1ecd86[_0x2b22cd(0x260)][_0x2b22cd(0x209)]||_0x1ecd86['body'][_0x2b22cd(0x209)]['code']===0x1;}async[_0x467ed1(0x207)](_0x11d804){const _0x31fe62=_0x467ed1,{unitId:_0x4b6099}=_0x11d804,_0x33b696=_0x11d804[_0x31fe62(0x22d)],_0x9bc2c8={'memberId':this[_0x31fe62(0x219)]['getCurrentUser']()['userID'],'unitId':_0x4b6099,'threadId':_0x33b696,'solved':_0x11d804[_0x31fe62(0x21a)]?_0x567e8b[_0x31fe62(0x23a)]:_0x567e8b[_0x31fe62(0x205)]},_0x3f73e3=await this[_0x31fe62(0x25e)][_0x31fe62(0x1f3)](_0x31fe62(0x257)+_0x4b6099+'/solved',{'body':_0x9bc2c8});return!_0x3f73e3[_0x31fe62(0x260)]['error']||_0x3f73e3[_0x31fe62(0x260)][_0x31fe62(0x209)][_0x31fe62(0x1f4)]===0x1;}async['deleteComment'](_0x3de8c7,_0x56237d,_0x15eb64,_0x30d175){const _0x329cc3=_0x467ed1,_0x469750={'memberId':(await this[_0x329cc3(0x250)][_0x329cc3(0x1ed)](_0x3de8c7))[_0x329cc3(0x227)](),'threadId':_0x15eb64,'replyId':_0x30d175,'unitId':_0x3de8c7},_0x267794=await this[_0x329cc3(0x25e)][_0x329cc3(0x1f3)](_0x329cc3(0x257)+_0x3de8c7+'/delete',{'body':_0x469750});return!_0x267794[_0x329cc3(0x260)][_0x329cc3(0x209)]||_0x267794[_0x329cc3(0x260)]['error']['code']===0x1;}async[_0x467ed1(0x263)](_0x156e72,_0x5d94a8,_0x4f0aa7){const _0x4bddb4=_0x467ed1,_0x5d8b05={'unitId':_0x156e72,'threadId':_0x4f0aa7},_0x4818bd=await this[_0x4bddb4(0x25e)][_0x4bddb4(0x1f3)](_0x4bddb4(0x257)+_0x156e72+_0x4bddb4(0x1f8),{'body':_0x5d8b05}),_0x83fc5b=_0x4f0aa7['map'](_0xd49fb=>_0x4646d2(_0x4818bd[_0x4bddb4(0x260)][_0x4bddb4(0x232)][_0xd49fb],_0x156e72,_0x5d94a8))[_0x4bddb4(0x22c)](Boolean);return Object[_0x4bddb4(0x258)](_0x4818bd[_0x4bddb4(0x260)][_0x4bddb4(0x234)])[_0x4bddb4(0x202)](_0x5f1e6d=>{const _0x1fb5ee=_0x4bddb4;this[_0x1fb5ee(0x219)]['addUser'](_0x5f1e6d);}),_0x83fc5b;}[_0x467ed1(0x269)](_0x59fe4a){const _0x2bfc3c=_0x467ed1;return{'id':_0x59fe4a['id'],'threadId':_0x59fe4a['threadId'],'ref':_0x59fe4a[_0x2bfc3c(0x1ef)]};}};_0x32dfdf=_0x294852([_0x4774f9(0x0,_0x54db0d[_0x467ed1(0x1f1)](_0x39c981[_0x467ed1(0x23e)])),_0x4774f9(0x1,_0x54db0d['Inject'](_0x54db0d[_0x467ed1(0x226)])),_0x4774f9(0x2,_0x54db0d[_0x467ed1(0x1f1)](_0x47842b['CollaborationSessionService'])),_0x4774f9(0x3,_0x54db0d[_0x467ed1(0x1f1)](_0x54db0d[_0x467ed1(0x236)]))],_0x32dfdf);var _0x4cc0b0=Object[_0x467ed1(0x264)],_0x2d6579=(_0x5826ec,_0x1c646e,_0x325c4c,_0x379f69)=>{const _0x707cad=_0x467ed1;for(var _0x2ac526=_0x379f69>0x1?void 0x0:_0x379f69?_0x4cc0b0(_0x1c646e,_0x325c4c):_0x1c646e,_0x18db6f=_0x5826ec[_0x707cad(0x218)]-0x1,_0x23feb1;_0x18db6f>=0x0;_0x18db6f--)(_0x23feb1=_0x5826ec[_0x18db6f])&&(_0x2ac526=_0x23feb1(_0x2ac526)||_0x2ac526);return _0x2ac526;},_0x41c9f9=(_0x4d9cb4,_0x5dcb29)=>(_0x2bc80c,_0x4b4766)=>_0x5dcb29(_0x2bc80c,_0x4b4766,_0x4d9cb4);let _0x88dcce=class extends _0x54db0d[_0x467ed1(0x210)]{constructor(_0x372b04,_0x286f6d){const _0x30a732=_0x467ed1;super(),this['_threadCommentDataSourceService']=_0x372b04,this['_threadCommentDataSource']=_0x286f6d,this[_0x30a732(0x224)]();}['_initDataSource'](){const _0xdfa078=_0x467ed1;this[_0xdfa078(0x229)]['dataSource']=this[_0xdfa078(0x249)],this['_threadCommentDataSourceService'][_0xdfa078(0x247)]=!0x1;}};_0x88dcce=_0x2d6579([_0x41c9f9(0x0,_0x84266c['IThreadCommentDataSourceService']),_0x41c9f9(0x1,_0x54db0d['Inject'](_0x32dfdf))],_0x88dcce);var _0x48d5c6=Object[_0x467ed1(0x222)],_0x25199d=Object['getOwnPropertyDescriptor'],_0x4f6d75=(_0x20d042,_0x5ea6a8,_0x25b1e4)=>_0x5ea6a8 in _0x20d042?_0x48d5c6(_0x20d042,_0x5ea6a8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x25b1e4}):_0x20d042[_0x5ea6a8]=_0x25b1e4,_0x45956b=(_0x4c259a,_0x4f6a75,_0x2a2e67,_0x544957)=>{for(var _0x29c187=_0x544957>0x1?void 0x0:_0x544957?_0x25199d(_0x4f6a75,_0x2a2e67):_0x4f6a75,_0x452cab=_0x4c259a['length']-0x1,_0x1313cd;_0x452cab>=0x0;_0x452cab--)(_0x1313cd=_0x4c259a[_0x452cab])&&(_0x29c187=_0x1313cd(_0x29c187)||_0x29c187);return _0x29c187;},_0x12c954=(_0x3888b6,_0x6c219f)=>(_0x5decfd,_0x493ce9)=>_0x6c219f(_0x5decfd,_0x493ce9,_0x3888b6),_0x49c95a=(_0x52c379,_0x395dee,_0xd552bc)=>_0x4f6d75(_0x52c379,typeof _0x395dee!=_0x467ed1(0x20d)?_0x395dee+'':_0x395dee,_0xd552bc);_0x54b163[_0x467ed1(0x217)]=class extends _0x54db0d[_0x467ed1(0x204)]{constructor(_0x145e91=_0x228d91,_0x5ee9f3,_0x5a323e){const _0x46b68d=_0x467ed1;super(),this['_config']=_0x145e91,this[_0x46b68d(0x244)]=_0x5ee9f3,this[_0x46b68d(0x262)]=_0x5a323e;const {..._0x399bfe}=_0x54db0d[_0x46b68d(0x242)]({},_0x228d91,this[_0x46b68d(0x255)]);this[_0x46b68d(0x262)]['setConfig'](_0x406fae,_0x399bfe);}['onStarting'](){const _0x1d7f70=_0x467ed1;[[_0x32dfdf],[_0x88dcce],[_0x306ddd]][_0x1d7f70(0x202)](_0x4697d1=>{const _0x211dfe=_0x1d7f70;this['_injector'][_0x211dfe(0x208)](_0x4697d1);});}['onReady'](){const _0x243ea4=_0x467ed1;this['_injector'][_0x243ea4(0x20f)](_0x88dcce),this[_0x243ea4(0x244)][_0x243ea4(0x20f)](_0x306ddd);}},_0x49c95a(_0x54b163[_0x467ed1(0x217)],_0x467ed1(0x23f),_0x2f27b1),_0x49c95a(_0x54b163[_0x467ed1(0x217)],_0x467ed1(0x267),_0x54db0d[_0x467ed1(0x261)][_0x467ed1(0x216)]),_0x54b163['UniverThreadCommentDataSourcePlugin']=_0x45956b([_0x54db0d[_0x467ed1(0x237)](_0xcff9f3[_0x467ed1(0x25b)],_0x47842b['UniverCollaborationClientPlugin'],_0x81ce2f['UniverLicensePlugin']),_0x12c954(0x1,_0x54db0d['Inject'](_0x54db0d['Injector'])),_0x12c954(0x2,_0x54db0d['IConfigService'])],_0x54b163[_0x467ed1(0x217)]),Object[_0x467ed1(0x222)](_0x54b163,Symbol['toStringTag'],{'value':_0x467ed1(0x200)});}));
1
+ function _0xa04d(_0x727bc9,_0x2d04b2){const _0x357e69=_0x357e();return _0xa04d=function(_0xa04d17,_0x383b2c){_0xa04d17=_0xa04d17-0xcc;let _0x435e0b=_0x357e69[_0xa04d17];return _0x435e0b;},_0xa04d(_0x727bc9,_0x2d04b2);}function _0x357e(){const _0x418fc7=['object','root','UniverCollaborationClientPlugin','_threadCommentDataSourceService','COMMENT','UNRECOGNIZED','amd','Inject','IConfigService','getMemberID','values','threadId','/reply','Reply','get','reply','getOwnPropertyDescriptor','getUnit','UniverThreadCommentDataSourcePlugin','_threadCommentModel','_threadCommentDataSource','deleteComment','UniverInstanceType','getComment','length','symbol','Unknown','CommentService','code','_initDataSource','4043165zDxdhf','body','_config','merge','find','_httpService','rangeId','Edit','_userService','8374492LLDBkV','error','ThreadCommentModel','/universer-api/user/list','defineProperty','Module','requireSession','userId','replyId','Solve','_injector','unitId','_commentService','users','@univerjs/core','21625911UtBsnQ','/edit','Delete','rxjs','forEach','UniverCore','2114508FERiar','getUser','type','Solved','/list','_initUserSync','@univerjs/thread-comment','_sessionService','7628088qxuMBV','map','_init','@univerjs-pro/collaboration-client','@univerjs/thread-comment-ui','function','user','solved','/universer-api/comment/unit/','OpenOrReOpen','dayjs','UniverProCollaborationClient','content','_configService','UniverThreadCommentUi','UNIVER_UNKNOWN','userID','exports','resolveComment','stringify','CustomRangeType','filter','parse','size','CollaborationSessionService','addUser','YYYY/MM/DD\x20HH:mm','Disposable','UniverProThreadCommentDatasource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4YaHWZk','Injector','pluginName','onStarting','ref','replies','createTimestamp','pipe','dataSource','getCurrentUser','add','post','UserManagerService','addComment','slice','IThreadCommentDataSourceService','customRanges','rangeType','setConfig','@univerjs-pro/license','comments','commentUpdate$','UniverNetwork','Add','updateComment','subscribe','/add','disposeWithMe','6718VBunGD','/solved','HTTPService','591VWIBZx','toStringTag','DependentOn','1022309XewAjY','comment','syncUpdateMutationToColla'];_0x357e=function(){return _0x418fc7;};return _0x357e();}(function(_0x1b86c1,_0x12409b){const _0x234e25=_0xa04d,_0x26d87d=_0x1b86c1();while(!![]){try{const _0x2c7d1f=-parseInt(_0x234e25(0x111))/0x1+parseInt(_0x234e25(0x10b))/0x2*(parseInt(_0x234e25(0x10e))/0x3)+parseInt(_0x234e25(0xef))/0x4*(-parseInt(_0x234e25(0x132))/0x5)+-parseInt(_0x234e25(0x150))/0x6+-parseInt(_0x234e25(0x13b))/0x7+parseInt(_0x234e25(0xd1))/0x8+parseInt(_0x234e25(0x14a))/0x9;if(_0x2c7d1f===_0x12409b)break;else _0x26d87d['push'](_0x26d87d['shift']());}catch(_0x55ea62){_0x26d87d['push'](_0x26d87d['shift']());}}}(_0x357e,0x9bdbd),function(_0x209042,_0x334779){const _0x23533d=_0xa04d;typeof exports==_0x23533d(0x114)&&typeof module<'u'?_0x334779(exports,require(_0x23533d(0xd4)),require('@univerjs-pro/license'),require(_0x23533d(0x149)),require('@univerjs/thread-comment-ui'),require(_0x23533d(0xcf)),require(_0x23533d(0x14d)),require('@univerjs/network')):typeof define==_0x23533d(0xd6)&&define[_0x23533d(0x11a)]?define([_0x23533d(0xe2),'@univerjs-pro/collaboration-client',_0x23533d(0x102),_0x23533d(0x149),_0x23533d(0xd5),'@univerjs/thread-comment',_0x23533d(0x14d),'@univerjs/network'],_0x334779):(_0x209042=typeof globalThis<'u'?globalThis:_0x209042||self,_0x334779(_0x209042[_0x23533d(0xed)]={},_0x209042[_0x23533d(0xdc)],_0x209042['UniverProLicense'],_0x209042[_0x23533d(0x14f)],_0x209042[_0x23533d(0xdf)],_0x209042['UniverThreadComment'],_0x209042[_0x23533d(0x14d)],_0x209042[_0x23533d(0x105)]));}(this,function(_0x3ae3d6,_0x2c01e0,_0x4323d6,_0x54c82a,_0x54976b,_0x1be2bb,_0x27359c,_0x573540){'use strict';const _0xdda779=_0xa04d;const _0x21e95b=_0xdda779(0xee);var _0xe043cf=(_0x3b14f5=>(_0x3b14f5[_0x3b14f5[_0xdda779(0xda)]=0x0]=_0xdda779(0xda),_0x3b14f5[_0x3b14f5[_0xdda779(0xcc)]=0x1]=_0xdda779(0xcc),_0x3b14f5[_0x3b14f5[_0xdda779(0x119)]=-0x1]=_0xdda779(0x119),_0x3b14f5))(_0xe043cf||{}),_0x51340d=(_0x18b3ff=>(_0x18b3ff[_0x18b3ff[_0xdda779(0x12e)]=0x0]=_0xdda779(0x12e),_0x18b3ff[_0x18b3ff[_0xdda779(0x106)]=0x1]=_0xdda779(0x106),_0x18b3ff[_0x18b3ff[_0xdda779(0x121)]=0x2]='Reply',_0x18b3ff[_0x18b3ff[_0xdda779(0x139)]=0x3]=_0xdda779(0x139),_0x18b3ff[_0x18b3ff[_0xdda779(0x14c)]=0x4]=_0xdda779(0x14c),_0x18b3ff[_0x18b3ff[_0xdda779(0x144)]=0x5]='Solve',_0x18b3ff[_0x18b3ff[_0xdda779(0x119)]=-0x1]=_0xdda779(0x119),_0x18b3ff))(_0x51340d||{});const _0xbb1a12=_0xd0d61e=>_0x54c82a[_0xdda779(0xdb)](new Date(+_0xd0d61e))['format']('YYYY/MM/DD\x20HH:mm'),_0x3a385a=async(_0x41382b,_0x4568bb)=>{const _0x5f86e8=_0xdda779,_0x7880d5=_0x41382b[_0x5f86e8(0x122)](_0x54c82a[_0x5f86e8(0xfb)]),_0x19e680=_0x41382b[_0x5f86e8(0x122)](_0x573540[_0x5f86e8(0x10d)]);_0x4568bb['forEach'](_0x56a64c=>{const _0x750581=_0x5f86e8;_0x7880d5[_0x750581(0x151)](_0x56a64c)&&_0x4568bb['delete'](_0x56a64c);}),_0x4568bb[_0x5f86e8(0xe8)]&&(await _0x19e680[_0x5f86e8(0x122)](_0x5f86e8(0x13e),{'params':{'userIDs':[..._0x4568bb]}}))['body'][_0x5f86e8(0x148)][_0x5f86e8(0x14e)](_0x2bc19d=>{const _0x224984=_0x5f86e8;_0x2bc19d&&_0x7880d5[_0x224984(0xea)](_0x2bc19d);});};var _0x23bfef=Object[_0xdda779(0x124)],_0x16eefa=(_0xc028f4,_0x58f2fa,_0x5d4b1f,_0x3cbb65)=>{const _0x218adf=_0xdda779;for(var _0x799fea=_0x3cbb65>0x1?void 0x0:_0x3cbb65?_0x23bfef(_0x58f2fa,_0x5d4b1f):_0x58f2fa,_0x570859=_0xc028f4[_0x218adf(0x12c)]-0x1,_0x4b18d1;_0x570859>=0x0;_0x570859--)(_0x4b18d1=_0xc028f4[_0x570859])&&(_0x799fea=_0x4b18d1(_0x799fea)||_0x799fea);return _0x799fea;},_0x2bfff2=(_0x289a60,_0x115d01)=>(_0x2ed513,_0x2de0aa)=>_0x115d01(_0x2ed513,_0x2de0aa,_0x289a60);let _0x406192=class extends _0x54c82a[_0xdda779(0xec)]{constructor(_0x423259,_0x414766,_0x11b87f,_0x56fdf7){const _0x50bac5=_0xdda779;super(),this[_0x50bac5(0x147)]=_0x423259,this[_0x50bac5(0x127)]=_0x414766,this['_userService']=_0x11b87f,this[_0x50bac5(0x145)]=_0x56fdf7,this['_init'](),this['_initUserSync']();}[_0xdda779(0xce)](){const _0xaa52b5=_0xdda779;this[_0xaa52b5(0x10a)](this[_0xaa52b5(0x127)][_0xaa52b5(0x104)][_0xaa52b5(0xf6)](_0x27359c['bufferTime'](0x10))[_0xaa52b5(0x108)](_0x15d759=>{const _0x5b69a1=_0xaa52b5,_0x4733a5=new Set();_0x15d759[_0x5b69a1(0x14e)](_0x2b746f=>{const _0x4a0209=_0x5b69a1;switch(_0x2b746f[_0x4a0209(0x152)]){case _0x4a0209(0xf9):{const _0x1494e7=_0x2b746f['payload']['personId'];_0x4733a5[_0x4a0209(0xf9)](_0x1494e7);break;}}}),_0x3a385a(this[_0x5b69a1(0x145)],_0x4733a5);}));}[_0xdda779(0xd3)](){const _0x26e1c7=_0xdda779;this[_0x26e1c7(0x10a)](this[_0x26e1c7(0x147)]['commentUpdate$'][_0x26e1c7(0x108)](async _0x49b598=>{const _0x42e908=_0x26e1c7;var _0x3ffed9,_0x2ac449,_0x8ad659,_0x4d6938;const _0x4c23a3=(_0x3ffed9=this[_0x42e908(0x127)][_0x42e908(0x125)](_0x49b598[_0x42e908(0x146)])[_0x42e908(0x136)](_0x236905=>_0x236905['threadId']===_0x49b598['threadId']))==null?void 0x0:_0x3ffed9['root'];if(!_0x4c23a3)return;const {unitId:_0x14c550,subUnitId:_0x539d36}=_0x4c23a3;switch(_0x49b598['user']&&this[_0x42e908(0x13a)]['addUser'](_0x49b598[_0x42e908(0xd7)]),_0x49b598[_0x42e908(0x152)]){case _0x51340d[_0x42e908(0x106)]:break;case _0x51340d[_0x42e908(0x121)]:{this[_0x42e908(0x127)][_0x42e908(0xfc)](_0x14c550,_0x539d36,{'unitId':_0x14c550,'subUnitId':_0x539d36,'ref':'','id':_0x49b598[_0x42e908(0x143)],'dT':_0xbb1a12(+_0x49b598['createTimestamp']),'threadId':_0x49b598['threadId'],'personId':(_0x8ad659=(_0x2ac449=_0x49b598['user'])==null?void 0x0:_0x2ac449[_0x42e908(0xe1)])!=null?_0x8ad659:_0x49b598[_0x42e908(0x142)],'text':JSON['parse'](_0x49b598[_0x42e908(0xdd)]),'parentId':_0x4c23a3['id']});break;}case _0x51340d[_0x42e908(0x14c)]:{const _0x5166a5=this[_0x42e908(0x127)][_0x42e908(0x12b)](_0x14c550,_0x539d36,_0x49b598[_0x42e908(0x143)]);_0x5166a5&&_0x5166a5['parentId']&&this['_threadCommentModel']['deleteComment'](_0x14c550,_0x539d36,_0x49b598[_0x42e908(0x143)]);break;}case _0x51340d[_0x42e908(0x139)]:{this[_0x42e908(0x127)][_0x42e908(0x107)](_0x14c550,_0x539d36,{'commentId':_0x49b598[_0x42e908(0x143)],'text':JSON['parse'](_0x49b598[_0x42e908(0xdd)])});break;}case _0x51340d[_0x42e908(0x144)]:{const _0x37d9cc=(_0x4d6938=this[_0x42e908(0x127)]['getUnit'](_0x49b598[_0x42e908(0x146)])['find'](_0x5d896a=>_0x5d896a[_0x42e908(0x11f)]===_0x49b598[_0x42e908(0x11f)]))==null?void 0x0:_0x4d6938[_0x42e908(0x115)];_0x37d9cc&&this[_0x42e908(0x127)][_0x42e908(0xe3)](_0x14c550,_0x539d36,_0x37d9cc['id'],_0x49b598[_0x42e908(0xd8)]===_0xe043cf[_0x42e908(0xcc)]);break;}}}));}};_0x406192=_0x16eefa([_0x2bfff2(0x0,_0x54c82a[_0xdda779(0x11b)](_0x2c01e0[_0xdda779(0x12f)])),_0x2bfff2(0x1,_0x54c82a[_0xdda779(0x11b)](_0x1be2bb[_0xdda779(0x13d)])),_0x2bfff2(0x2,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xfb)])),_0x2bfff2(0x3,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xf0)]))],_0x406192);const _0x314522='thread-comment-data-source.config',_0x404da1={};var _0x2e5077=Object[_0xdda779(0x124)],_0x14e704=(_0x5859b7,_0x578c9f,_0x2686a9,_0x2d89d)=>{const _0x5f490e=_0xdda779;for(var _0x3f8327=_0x2d89d>0x1?void 0x0:_0x2d89d?_0x2e5077(_0x578c9f,_0x2686a9):_0x578c9f,_0x246d8c=_0x5859b7[_0x5f490e(0x12c)]-0x1,_0x1d59d4;_0x246d8c>=0x0;_0x246d8c--)(_0x1d59d4=_0x5859b7[_0x246d8c])&&(_0x3f8327=_0x1d59d4(_0x3f8327)||_0x3f8327);return _0x3f8327;},_0x55e75a=(_0x4a1c76,_0x584d08)=>(_0x112df,_0xb6b51)=>_0x584d08(_0x112df,_0xb6b51,_0x4a1c76);function _0x112527(_0x3df793,_0x50d184){const _0x41db75=_0xdda779,_0x336071=_0x3df793['replies'][0x0];return{..._0x50d184,'id':_0x336071[_0x41db75(0x143)],'resolved':_0x3df793[_0x41db75(0xd8)]===0x1,'dT':_0xbb1a12(_0x336071[_0x41db75(0xf5)]),'personId':_0x336071['userId'],'threadId':_0x336071[_0x41db75(0x11f)]};}function _0x504e7f(_0x1a4679,_0x1307a2,_0x374ee0){const _0x16a472=_0xdda779;var _0xec86b5,_0x2a2257;if(((_0x2a2257=(_0xec86b5=_0x1a4679==null?void 0x0:_0x1a4679[_0x16a472(0xf4)])==null?void 0x0:_0xec86b5[_0x16a472(0x12c)])!=null?_0x2a2257:0x0)>0x0){const _0x13042a=(_0x553513,_0x733dc5)=>({'id':_0x553513['replyId'],'threadId':_0x553513[_0x16a472(0x11f)],'dT':_0xbb1a12(_0x553513['createTimestamp']),'personId':_0x553513[_0x16a472(0x142)],'resolved':_0x1a4679[_0x16a472(0xd8)]===_0xe043cf[_0x16a472(0xcc)],'unitId':_0x1307a2,'subUnitId':_0x374ee0,'text':JSON[_0x16a472(0xe7)](_0x553513[_0x16a472(0xdd)]),'parentId':_0x733dc5}),_0x15bc8a=_0x13042a(_0x1a4679[_0x16a472(0xf4)][0x0]);return{..._0x15bc8a,'children':_0x1a4679[_0x16a472(0xf4)][_0x16a472(0xfd)](0x1)['map'](_0x52dba7=>_0x13042a(_0x52dba7,_0x15bc8a['id']))};}return null;}let _0x154654=class{constructor(_0x4f9233,_0x42d2dc,_0x5e85e2,_0x43c87a){const _0x303576=_0xdda779;this[_0x303576(0x137)]=_0x4f9233,this['_userService']=_0x42d2dc,this[_0x303576(0xd0)]=_0x5e85e2,this[_0x303576(0x145)]=_0x43c87a;}async[_0xdda779(0xfc)](_0x1e4d8b){const _0xd05d64=_0xdda779;var _0x2e6f72,_0x775167;const {parentId:_0x1460c6,unitId:_0x2698b2,text:_0x5ae46d,threadId:_0x3420fa}=_0x1e4d8b,_0x22642a=(_0x775167=(_0x2e6f72=_0x5ae46d[_0xd05d64(0xff)])==null?void 0x0:_0x2e6f72[_0xd05d64(0xe6)](_0xb2f033=>_0xb2f033[_0xd05d64(0x100)]===_0x54c82a[_0xd05d64(0xe5)][_0xd05d64(0x118)])[_0xd05d64(0xd2)](_0x280603=>_0x280603[_0xd05d64(0x138)]))!=null?_0x775167:[],_0x558b4e=JSON[_0xd05d64(0xe4)](_0x5ae46d),_0x41dc07=(await this['_sessionService'][_0xd05d64(0x141)](_0x2698b2))[_0xd05d64(0x11d)]();if(_0x1460c6){const _0x367775={'memberId':_0x41dc07,'unitId':_0x2698b2,'content':_0x558b4e,'mention':_0x22642a,'threadId':_0x3420fa},_0x100968=(await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2698b2+_0xd05d64(0x120),{'body':_0x367775}))[_0xd05d64(0x133)][_0xd05d64(0x123)];return{..._0x1e4d8b,'id':_0x100968[_0xd05d64(0x143)],'dT':_0x54c82a[_0xd05d64(0xdb)](+_0x100968['createTimestamp'])['format'](_0xd05d64(0xeb)),'personId':_0x100968[_0xd05d64(0x142)]};}else{const _0x2dabe1={'memberId':_0x41dc07,'unitId':_0x2698b2,'content':_0x558b4e,'mention':_0x22642a},_0x437175=await this[_0xd05d64(0x137)][_0xd05d64(0xfa)](_0xd05d64(0xd9)+_0x2698b2+_0xd05d64(0x109),{'body':_0x2dabe1});return _0x112527(_0x437175[_0xd05d64(0x133)][_0xd05d64(0x112)],_0x1e4d8b);}}async[_0xdda779(0x107)](_0x3db6b6){const _0x1c6d12=_0xdda779;var _0x37f1e2,_0x12ca8f;const {text:_0x2fa5d7,unitId:_0xc5c3de}=_0x3db6b6,_0x5c22b8=(_0x12ca8f=(_0x37f1e2=_0x2fa5d7[_0x1c6d12(0xff)])==null?void 0x0:_0x37f1e2[_0x1c6d12(0xe6)](_0x4d537c=>_0x4d537c[_0x1c6d12(0x100)]===_0x54c82a[_0x1c6d12(0xe5)][_0x1c6d12(0x118)])['map'](_0x388e17=>_0x388e17[_0x1c6d12(0x138)]))!=null?_0x12ca8f:[],_0x1153bd=JSON[_0x1c6d12(0xe4)](_0x2fa5d7),_0x24a503=_0x3db6b6[_0x1c6d12(0x11f)],_0x413180=_0x3db6b6['id'],_0x2342ff={'memberId':(await this[_0x1c6d12(0xd0)]['requireSession'](_0xc5c3de))[_0x1c6d12(0x11d)](),'unitId':_0xc5c3de,'threadId':_0x24a503,'mention':_0x5c22b8,'content':_0x1153bd,'replyId':_0x413180},_0x1a44ea=await this['_httpService'][_0x1c6d12(0xfa)](_0x1c6d12(0xd9)+_0xc5c3de+_0x1c6d12(0x14b),{'body':_0x2342ff});return!_0x1a44ea['body']['error']||_0x1a44ea[_0x1c6d12(0x133)][_0x1c6d12(0x13c)][_0x1c6d12(0x130)]===0x1;}async['resolveComment'](_0x6c223b){const _0x4b8ca5=_0xdda779,{unitId:_0x1e40a8}=_0x6c223b,_0xfecd7a=_0x6c223b['threadId'],_0x4e8d23={'memberId':this[_0x4b8ca5(0x13a)][_0x4b8ca5(0xf8)]()[_0x4b8ca5(0xe1)],'unitId':_0x1e40a8,'threadId':_0xfecd7a,'solved':_0x6c223b['resolved']?_0xe043cf[_0x4b8ca5(0xcc)]:_0xe043cf[_0x4b8ca5(0xda)]},_0x1117c5=await this[_0x4b8ca5(0x137)]['post'](_0x4b8ca5(0xd9)+_0x1e40a8+_0x4b8ca5(0x10c),{'body':_0x4e8d23});return!_0x1117c5['body']['error']||_0x1117c5['body'][_0x4b8ca5(0x13c)][_0x4b8ca5(0x130)]===0x1;}async[_0xdda779(0x129)](_0xcbad8,_0xb2e2e3,_0x4713e9,_0x9d05c3){const _0x22b311=_0xdda779,_0x4297d6={'memberId':(await this[_0x22b311(0xd0)][_0x22b311(0x141)](_0xcbad8))[_0x22b311(0x11d)](),'threadId':_0x4713e9,'replyId':_0x9d05c3,'unitId':_0xcbad8},_0x1264f4=await this[_0x22b311(0x137)]['post'](_0x22b311(0xd9)+_0xcbad8+'/delete',{'body':_0x4297d6});return!_0x1264f4[_0x22b311(0x133)][_0x22b311(0x13c)]||_0x1264f4[_0x22b311(0x133)][_0x22b311(0x13c)][_0x22b311(0x130)]===0x1;}async['listComments'](_0x158496,_0x3feb58,_0x5a21f6){const _0x282cae=_0xdda779,_0xf27c62={'unitId':_0x158496,'threadId':_0x5a21f6},_0x4bd29f=await this[_0x282cae(0x137)]['post'](_0x282cae(0xd9)+_0x158496+_0x282cae(0xcd),{'body':_0xf27c62}),_0x474d50=_0x5a21f6[_0x282cae(0xd2)](_0x5ed25f=>_0x504e7f(_0x4bd29f[_0x282cae(0x133)][_0x282cae(0x103)][_0x5ed25f],_0x158496,_0x3feb58))[_0x282cae(0xe6)](Boolean);return Object[_0x282cae(0x11e)](_0x4bd29f[_0x282cae(0x133)]['users'])[_0x282cae(0x14e)](_0x16bf56=>{const _0x5711b8=_0x282cae;this[_0x5711b8(0x13a)]['addUser'](_0x16bf56);}),_0x474d50;}['saveCommentToSnapshot'](_0x28d497){const _0x1616c1=_0xdda779;return{'id':_0x28d497['id'],'threadId':_0x28d497[_0x1616c1(0x11f)],'ref':_0x28d497[_0x1616c1(0xf3)]};}};_0x154654=_0x14e704([_0x55e75a(0x0,_0x54c82a[_0xdda779(0x11b)](_0x573540[_0xdda779(0x10d)])),_0x55e75a(0x1,_0x54c82a[_0xdda779(0x11b)](_0x54c82a['UserManagerService'])),_0x55e75a(0x2,_0x54c82a[_0xdda779(0x11b)](_0x2c01e0[_0xdda779(0xe9)])),_0x55e75a(0x3,_0x54c82a['Inject'](_0x54c82a[_0xdda779(0xf0)]))],_0x154654);var _0xd5ab24=Object[_0xdda779(0x124)],_0x1e1e28=(_0x20c302,_0x3c990b,_0x3a34f1,_0x89def5)=>{const _0x3f0192=_0xdda779;for(var _0x4ae8d3=_0x89def5>0x1?void 0x0:_0x89def5?_0xd5ab24(_0x3c990b,_0x3a34f1):_0x3c990b,_0xb0b380=_0x20c302[_0x3f0192(0x12c)]-0x1,_0x28e1bb;_0xb0b380>=0x0;_0xb0b380--)(_0x28e1bb=_0x20c302[_0xb0b380])&&(_0x4ae8d3=_0x28e1bb(_0x4ae8d3)||_0x4ae8d3);return _0x4ae8d3;},_0x367747=(_0x4e53f2,_0x5d10c4)=>(_0x38f53d,_0x56d522)=>_0x5d10c4(_0x38f53d,_0x56d522,_0x4e53f2);let _0x124c7f=class extends _0x54c82a['Disposable']{constructor(_0x3ff869,_0x1c94ff){const _0x38d738=_0xdda779;super(),this[_0x38d738(0x117)]=_0x3ff869,this[_0x38d738(0x128)]=_0x1c94ff,this[_0x38d738(0x131)]();}[_0xdda779(0x131)](){const _0x330f0b=_0xdda779;this[_0x330f0b(0x117)][_0x330f0b(0xf7)]=this[_0x330f0b(0x128)],this[_0x330f0b(0x117)][_0x330f0b(0x113)]=!0x1;}};_0x124c7f=_0x1e1e28([_0x367747(0x0,_0x1be2bb[_0xdda779(0xfe)]),_0x367747(0x1,_0x54c82a[_0xdda779(0x11b)](_0x154654))],_0x124c7f);var _0x563cf7=Object[_0xdda779(0x13f)],_0x30e153=Object[_0xdda779(0x124)],_0x4d06d3=(_0xeafac1,_0x12d10c,_0x1be874)=>_0x12d10c in _0xeafac1?_0x563cf7(_0xeafac1,_0x12d10c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1be874}):_0xeafac1[_0x12d10c]=_0x1be874,_0xd9b7bc=(_0x2feefc,_0x3ae689,_0x229c67,_0x321ca6)=>{for(var _0x123038=_0x321ca6>0x1?void 0x0:_0x321ca6?_0x30e153(_0x3ae689,_0x229c67):_0x3ae689,_0x14e81c=_0x2feefc['length']-0x1,_0x2d61fa;_0x14e81c>=0x0;_0x14e81c--)(_0x2d61fa=_0x2feefc[_0x14e81c])&&(_0x123038=_0x2d61fa(_0x123038)||_0x123038);return _0x123038;},_0x287ed3=(_0x573a83,_0x1d53f2)=>(_0x254245,_0xffa3bc)=>_0x1d53f2(_0x254245,_0xffa3bc,_0x573a83),_0x276f2a=(_0x5069be,_0x36f1b4,_0x3b8187)=>_0x4d06d3(_0x5069be,typeof _0x36f1b4!=_0xdda779(0x12d)?_0x36f1b4+'':_0x36f1b4,_0x3b8187);_0x3ae3d6[_0xdda779(0x126)]=class extends _0x54c82a['Plugin']{constructor(_0x432ac7=_0x404da1,_0x465d9d,_0x5d47cc){const _0x4e549f=_0xdda779;super(),this[_0x4e549f(0x134)]=_0x432ac7,this[_0x4e549f(0x145)]=_0x465d9d,this[_0x4e549f(0xde)]=_0x5d47cc;const {..._0x4d3501}=_0x54c82a[_0x4e549f(0x135)]({},_0x404da1,this[_0x4e549f(0x134)]);this[_0x4e549f(0xde)][_0x4e549f(0x101)](_0x314522,_0x4d3501);}[_0xdda779(0xf2)](){const _0xe20973=_0xdda779;[[_0x154654],[_0x124c7f],[_0x406192]][_0xe20973(0x14e)](_0x4650b6=>{const _0x5c3168=_0xe20973;this[_0x5c3168(0x145)][_0x5c3168(0xf9)](_0x4650b6);});}['onReady'](){const _0x27e6d4=_0xdda779;this[_0x27e6d4(0x145)]['get'](_0x124c7f),this[_0x27e6d4(0x145)][_0x27e6d4(0x122)](_0x406192);}},_0x276f2a(_0x3ae3d6[_0xdda779(0x126)],_0xdda779(0xf1),_0x21e95b),_0x276f2a(_0x3ae3d6['UniverThreadCommentDataSourcePlugin'],'type',_0x54c82a[_0xdda779(0x12a)][_0xdda779(0xe0)]),_0x3ae3d6[_0xdda779(0x126)]=_0xd9b7bc([_0x54c82a[_0xdda779(0x110)](_0x54976b['UniverThreadCommentUIPlugin'],_0x2c01e0[_0xdda779(0x116)],_0x4323d6['UniverLicensePlugin']),_0x287ed3(0x1,_0x54c82a[_0xdda779(0x11b)](_0x54c82a[_0xdda779(0xf0)])),_0x287ed3(0x2,_0x54c82a[_0xdda779(0x11c)])],_0x3ae3d6[_0xdda779(0x126)]),Object[_0xdda779(0x13f)](_0x3ae3d6,Symbol[_0xdda779(0x10f)],{'value':_0xdda779(0x140)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.9-experimental.20250408-da421ca",
3
+ "version": "0.6.9-experimental.20250409-e08c696",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.9-experimental.20250408-da421ca",
49
- "@univerjs-pro/license": "0.6.9-experimental.20250408-da421ca",
50
- "@univerjs/core": "0.6.9-experimental.20250408-da421ca",
51
- "@univerjs/network": "0.6.9-experimental.20250408-da421ca",
52
- "@univerjs/thread-comment": "0.6.9-experimental.20250408-da421ca",
48
+ "@univerjs/core": "0.6.9-experimental.20250409-e08c696",
49
+ "@univerjs-pro/collaboration-client": "0.6.9-experimental.20250409-e08c696",
50
+ "@univerjs/network": "0.6.9-experimental.20250409-e08c696",
51
+ "@univerjs-pro/license": "0.6.9-experimental.20250409-e08c696",
53
52
  "@univerjs/protocol": "0.1.46-alpha.3",
54
- "@univerjs/thread-comment-ui": "0.6.9-experimental.20250408-da421ca"
53
+ "@univerjs/thread-comment-ui": "0.6.9-experimental.20250409-e08c696",
54
+ "@univerjs/thread-comment": "0.6.9-experimental.20250409-e08c696"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",